# Purpose: makefile for thread example (TWIN)
# Created: 2000-03-15

WXDIR = ../..

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

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

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

wx:

$(OBJDIR):
	mkdir $(OBJDIR)

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

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

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

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

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

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