# Purpose: makefile for calendar example (TWIN)
# Created: 2000-01-03

WXDIR = ../..

# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/maketwin.env

OBJECTS = $(OBJDIR)/calendar.$(OBJSUFF) $(OBJDIR)/calendar.$(OBJSUFF)

all:    $(OBJDIR) calendar$(GUISUFFIX)$(EXESUFF)

wx:

$(OBJDIR):
	mkdir $(OBJDIR)

calendar$(GUISUFFIX)$(EXESUFF):	$(OBJECTS) $(WXLIB)
	$(CC) $(LDFLAGS) -o calendar$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)

$(OBJDIR)/calendar.$(OBJSUFF):	calendar.$(SRCSUFF)
	$(CC) -c $(CPPFLAGS) -o $@ calendar.$(SRCSUFF)

calendar.c:  calendar.rc
	$(RESCOMP) $(RCINPUTSWITCH) calendar.rc $(RCOUTPUTSWITCH) calendar.c $(RESFLAGS)

$(OBJDIR)/calendar.$(OBJSUFF):	calendar.c
	$(CC) -c $(CPPFLAGS) -o $@ calendar.c

#$(OBJDIR)/calendar.o:  calendar.rc
#	$(RESCOMP) $(RCINPUTSWITCH) calendar.rc $(RCOUTPUTSWITCH) $(OBJDIR)/calendar.o $(RESFLAGS)

clean:
	rm -f $(OBJECTS) calendar$(GUISUFFIX).exe core *.rsc *.res
