ccdemos: put the common code to header files, common_ply.h and common_sdl.h
move all ccdemos on octree and make them all realtime (-i argument)
ifndef $(ROOT)
ROOT=$(shell pwd)/..
endif
include $(ROOT)/config.mk
### Rules ###
%.o: %.cc
$(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $< $(DEFS) -DPYRIT_DOUBLE
%: %.o
$(CXX) -o $@ $(ROOT)/bin/libs-double/*.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.o: realtime.cc
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
libs-float:
$(MAKE) -C ../src libs-float
libs-double:
$(MAKE) -C ../src libs-double
image.o: image.c
$(CXX) -c -o $@ $*.c
clean:
rm -f spheres_shadow realtime realtime_dragon realtime_bunny *.o