--- a/ccdemos/Makefile Fri Dec 14 16:51:22 2007 +0100
+++ b/ccdemos/Makefile Mon Dec 17 22:03:50 2007 +0100
@@ -4,26 +4,29 @@
include $(ROOT)/config.mk
+RTLIBS=libs-double
+DEFS+=-DPYRIT_DOUBLE
+
### Rules ###
%.o: %.cc
- $(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $< $(DEFS) -DPYRIT_DOUBLE
+ $(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $< $(DEFS)
%: %.o
- $(CXX) -o $@ $(ROOT)/bin/libs-double/*.o $< image.o $(LDFLAGS) $(SDL_LDFLAGS) -lpng
+ $(CXX) -o $@ $(ROOT)/bin/$(RTLIBS)/*.o $< image.o $(LDFLAGS) $(SDL_LDFLAGS) -lpng
### Targets ###
all: realtime realtime_dragon realtime_bunny spheres_shadow
-realtime: realtime.o libs-double image.o
-realtime_dragon: realtime_dragon.o libs-double image.o
-realtime_bunny: realtime_bunny.o libs-double image.o
-spheres_shadow: spheres_shadow.o libs-double image.o
+realtime: realtime.o $(RTLIBS) image.o
+realtime_dragon: realtime_dragon.o $(RTLIBS) image.o
+realtime_bunny: realtime_bunny.o $(RTLIBS) image.o
+spheres_shadow: spheres_shadow.o $(RTLIBS) image.o
-realtime.o: realtime.cc
+realtime.o: realtime.cc common_sdl.h
realtime_dragon.o: realtime_dragon.cc common_sdl.h common_ply.h
realtime_bunny.o: realtime_bunny.cc common_sdl.h common_ply.h
-spheres_shadow.o: spheres_shadow.cc
+spheres_shadow.o: spheres_shadow.cc common_sdl.h
libs-float:
$(MAKE) -C ../src libs-float
@@ -36,3 +39,6 @@
clean:
rm -f spheres_shadow realtime realtime_dragon realtime_bunny *.o
+
+distclean: clean
+ rm -rf *.png