3 endif |
3 endif |
4 |
4 |
5 include $(ROOT)/config.mk |
5 include $(ROOT)/config.mk |
6 |
6 |
7 |
7 |
|
8 ### Rules ### |
|
9 %.o: %.cc |
|
10 $(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $< $(DEFS) -DPYRIT_DOUBLE |
|
11 |
|
12 %: %.o |
|
13 $(CXX) -o $@ $(ROOT)/bin/libs-double/*.o $< image.o $(LDFLAGS) $(SDL_LDFLAGS) -lpng |
|
14 |
8 ### Targets ### |
15 ### Targets ### |
9 all: realtime realtime_dragon realtime_bunny spheres_shadow |
16 all: realtime realtime_dragon realtime_bunny spheres_shadow |
10 |
17 |
11 realtime: realtime.o libs-double |
18 realtime: realtime.o libs-double image.o |
12 $(CXX) -o $@ $(ROOT)/bin/libs-double/*.o $< $(LDFLAGS) $(SDL_LDFLAGS) |
19 realtime_dragon: realtime_dragon.o libs-double image.o |
|
20 realtime_bunny: realtime_bunny.o libs-double image.o |
|
21 spheres_shadow: spheres_shadow.o libs-double image.o |
13 |
22 |
14 realtime_dragon: realtime_dragon.o libs-double |
23 realtime.o: realtime.cc |
15 $(CXX) -o $@ $(ROOT)/bin/libs-double/*.o $< $(LDFLAGS) $(SDL_LDFLAGS) |
24 realtime_dragon.o: realtime_dragon.cc common_sdl.h common_ply.h |
16 |
25 realtime_bunny.o: realtime_bunny.cc common_sdl.h common_ply.h |
17 realtime_bunny: realtime_bunny.o libs-double |
26 spheres_shadow.o: spheres_shadow.cc |
18 $(CXX) -o $@ $(ROOT)/bin/libs-double/*.o $< $(LDFLAGS) $(SDL_LDFLAGS) |
|
19 |
|
20 spheres_shadow: spheres_shadow.o image.o libs-float |
|
21 $(CXX) -o $@ $(ROOT)/bin/libs-float/*.o $< image.o $(LDFLAGS) -lpng |
|
22 |
27 |
23 libs-float: |
28 libs-float: |
24 $(MAKE) -C ../src libs-float |
29 $(MAKE) -C ../src libs-float |
25 |
30 |
26 libs-double: |
31 libs-double: |
27 $(MAKE) -C ../src libs-double |
32 $(MAKE) -C ../src libs-double |
28 |
33 |
29 realtime.o: realtime.cc |
|
30 $(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $< $(DEFS) -DPYRIT_DOUBLE |
|
31 |
|
32 realtime_dragon.o: realtime_dragon.cc |
|
33 $(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $< $(DEFS) -DPYRIT_DOUBLE |
|
34 |
|
35 realtime_bunny.o: realtime_bunny.cc |
|
36 $(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $< $(DEFS) -DPYRIT_DOUBLE |
|
37 |
|
38 image.o: image.c |
34 image.o: image.c |
39 $(CXX) -c -o $@ $*.c |
35 $(CXX) -c -o $@ $*.c |
40 |
36 |
41 spheres_shadow.o: spheres_shadow.cc |
|
42 $(CXX) -c -o $@ $*.cc $(CCFLAGS) $(DEFS) |
|
43 |
|
44 clean: |
37 clean: |
45 rm -f spheres_shadow realtime realtime_dragon realtime_bunny *.o |
38 rm -f spheres_shadow realtime realtime_dragon realtime_bunny *.o |