ccdemos/Makefile
branchpyrit
changeset 40 929aad02c5f2
parent 39 7079dcc3bd74
child 41 c1080cb5bd6d
equal deleted inserted replaced
39:7079dcc3bd74 40:929aad02c5f2
     2 	ROOT=$(shell pwd)/..
     2 	ROOT=$(shell pwd)/..
     3 endif
     3 endif
     4 
     4 
     5 include $(ROOT)/config.mk
     5 include $(ROOT)/config.mk
     6 
     6 
       
     7 RTLIBS=libs-double
       
     8 DEFS+=-DPYRIT_DOUBLE
       
     9 
     7 
    10 
     8 ### Rules ###
    11 ### Rules ###
     9 %.o: %.cc
    12 %.o: %.cc
    10 	$(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $< $(DEFS) -DPYRIT_DOUBLE
    13 	$(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $< $(DEFS)
    11 
    14 
    12 %: %.o
    15 %: %.o
    13 	$(CXX) -o $@ $(ROOT)/bin/libs-double/*.o $< image.o $(LDFLAGS) $(SDL_LDFLAGS) -lpng
    16 	$(CXX) -o $@ $(ROOT)/bin/$(RTLIBS)/*.o $< image.o $(LDFLAGS) $(SDL_LDFLAGS) -lpng
    14 
    17 
    15 ### Targets ###
    18 ### Targets ###
    16 all: realtime realtime_dragon realtime_bunny spheres_shadow
    19 all: realtime realtime_dragon realtime_bunny spheres_shadow
    17 
    20 
    18 realtime: realtime.o libs-double image.o
    21 realtime: realtime.o $(RTLIBS) image.o
    19 realtime_dragon: realtime_dragon.o libs-double image.o
    22 realtime_dragon: realtime_dragon.o $(RTLIBS) image.o
    20 realtime_bunny: realtime_bunny.o libs-double image.o
    23 realtime_bunny: realtime_bunny.o $(RTLIBS) image.o
    21 spheres_shadow: spheres_shadow.o libs-double image.o
    24 spheres_shadow: spheres_shadow.o $(RTLIBS) image.o
    22 
    25 
    23 realtime.o: realtime.cc
    26 realtime.o: realtime.cc common_sdl.h
    24 realtime_dragon.o: realtime_dragon.cc common_sdl.h common_ply.h
    27 realtime_dragon.o: realtime_dragon.cc common_sdl.h common_ply.h
    25 realtime_bunny.o: realtime_bunny.cc common_sdl.h common_ply.h
    28 realtime_bunny.o: realtime_bunny.cc common_sdl.h common_ply.h
    26 spheres_shadow.o: spheres_shadow.cc
    29 spheres_shadow.o: spheres_shadow.cc common_sdl.h
    27 
    30 
    28 libs-float:
    31 libs-float:
    29 	$(MAKE) -C ../src libs-float
    32 	$(MAKE) -C ../src libs-float
    30 
    33 
    31 libs-double:
    34 libs-double:
    34 image.o: image.c
    37 image.o: image.c
    35 	$(CXX) -c -o $@ $*.c
    38 	$(CXX) -c -o $@ $*.c
    36 
    39 
    37 clean:
    40 clean:
    38 	rm -f spheres_shadow realtime realtime_dragon realtime_bunny *.o
    41 	rm -f spheres_shadow realtime realtime_dragon realtime_bunny *.o
       
    42 
       
    43 distclean: clean
       
    44 	rm -rf *.png