# This Makefile is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. CPP = @CPP@ CC = @CC@ AWK = @AWK@ CXXCPP = @CXXCPP@ CXX = @CXX@ LIBS = ../../mysnprintf.o ../lib/libswt.a @LIBS@ INCDIRS = -I../include # WARNINGS = -Wall -Wwrite-strings CFLAGS = @CFLAGS@ $(WARNINGS) $(INCDIRS) CXXFLAGS = @CXXFLAGS@ $(WARNINGS) $(INCDIRS) TARGETS = swTest text buttons doodle drawing tree restest draw1 OBJS= \ swTest.o \ text.o \ buttons.o \ doodle.o \ drawing.o \ tree.o \ restest.o OBJSCXX= \ draw1.o .SUFFIXES: .cpp .cpp.o: $(CXX) -g $(INCDIRS) $(CXXFLAGS) -c $< SRCS= $(OBJS:o=c) $(OBJSCXX:o=cpp) DISTFILES= $(SRCS) Makefile.in res.rc bitmap1.bmp resource.h targets: $(TARGETS) swTest: swTest.o ../lib/libswt.a $(CC) swTest.o $(LIBS) -o swTest text: text.o ../lib/libswt.a $(CC) text.o $(LIBS) -o text buttons: buttons.o ../lib/libswt.a $(CC) buttons.o $(LIBS) -o buttons doodle: doodle.o ../lib/libswt.a $(CC) doodle.o $(LIBS) -o doodle drawing: drawing.o ../lib/libswt.a $(CC) drawing.o $(LIBS) -o drawing tree: tree.o ../lib/libswt.a $(CC) tree.o $(LIBS) -o tree draw1: draw1.o ../lib/libswt.a $(CXX) draw1.o $(LIBS) -o draw1 resource.c: res.rc bitmap1.bmp sed 's.\\\\./.' < res.rc > res.rc.c $(CXXCPP) res.rc.c | grep -v '//' | ../rc/rc > resource.c rm res.rc.c restest: restest.o resource.o ../lib/libswt.a $(CC) restest.o resource.o $(LIBS) -o restest clean: rm -f $(OBJS) $(OBJSCXX) \ resource.c resource.o \ drawing swTest doodle restest tree buttons text draw1 clobber: rm -f $(TARGETS) dname: $(DISTFILES) mkdir ../../`cat ../../.dname`/swt/tests ln $(DISTFILES) ../../`cat ../../.dname`/swt/tests depend: cp Makefile Makefile.bak $(AWK) "{ print; } /^# DO NOT DELETE/ { exit; }" < Makefile.bak > Makefile gcc -MM $(INCDIRS) $(SRCS) >> Makefile # DO NOT DELETE this line -- it's make depend food swTest.o: swTest.c ../include/swt.h ../include/keycodes.h text.o: text.c ../include/swt.h ../include/keycodes.h buttons.o: buttons.c ../include/swt.h ../include/keycodes.h doodle.o: doodle.c ../include/swt.h ../include/keycodes.h drawing.o: drawing.c ../include/swt.h ../include/keycodes.h tree.o: tree.c ../include/swt.h ../include/keycodes.h ../include/res.h restest.o: restest.c ../include/swt.h ../include/keycodes.h \ ../include/res.h resource.h