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: |