| author | Radek Brich <radek.brich@devl.cz> | 
| Mon, 17 Dec 2007 22:03:50 +0100 | |
| branch | pyrit | 
| changeset 40 | 929aad02c5f2 | 
| parent 39 | 7079dcc3bd74 | 
| child 41 | c1080cb5bd6d | 
| permissions | -rw-r--r-- | 
| 22 | 1  | 
ifndef $(ROOT)  | 
2  | 
ROOT=$(shell pwd)/..  | 
|
3  | 
endif  | 
|
4  | 
||
5  | 
include $(ROOT)/config.mk  | 
|
6  | 
||
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
7  | 
RTLIBS=libs-double  | 
| 
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
8  | 
DEFS+=-DPYRIT_DOUBLE  | 
| 
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
9  | 
|
| 22 | 10  | 
|
| 
39
 
7079dcc3bd74
ccdemos: put the common code to header files, common_ply.h and common_sdl.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
29 
diff
changeset
 | 
11  | 
### Rules ###  | 
| 
 
7079dcc3bd74
ccdemos: put the common code to header files, common_ply.h and common_sdl.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
29 
diff
changeset
 | 
12  | 
%.o: %.cc  | 
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
13  | 
$(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $< $(DEFS)  | 
| 
39
 
7079dcc3bd74
ccdemos: put the common code to header files, common_ply.h and common_sdl.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
29 
diff
changeset
 | 
14  | 
|
| 
 
7079dcc3bd74
ccdemos: put the common code to header files, common_ply.h and common_sdl.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
29 
diff
changeset
 | 
15  | 
%: %.o  | 
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
16  | 
$(CXX) -o $@ $(ROOT)/bin/$(RTLIBS)/*.o $< image.o $(LDFLAGS) $(SDL_LDFLAGS) -lpng  | 
| 
39
 
7079dcc3bd74
ccdemos: put the common code to header files, common_ply.h and common_sdl.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
29 
diff
changeset
 | 
17  | 
|
| 22 | 18  | 
### Targets ###  | 
| 
29
 
574c34441a1c
new C++ demo: realtime_bunny
 
Radek Brich <radek.brich@devl.cz> 
parents: 
25 
diff
changeset
 | 
19  | 
all: realtime realtime_dragon realtime_bunny spheres_shadow  | 
| 22 | 20  | 
|
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
21  | 
realtime: realtime.o $(RTLIBS) image.o  | 
| 
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
22  | 
realtime_dragon: realtime_dragon.o $(RTLIBS) image.o  | 
| 
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
23  | 
realtime_bunny: realtime_bunny.o $(RTLIBS) image.o  | 
| 
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
24  | 
spheres_shadow: spheres_shadow.o $(RTLIBS) image.o  | 
| 
24
 
d0d76e8a5203
new C++ demo: realtime_dragon.cc
 
Radek Brich <radek.brich@devl.cz> 
parents: 
22 
diff
changeset
 | 
25  | 
|
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
26  | 
realtime.o: realtime.cc common_sdl.h  | 
| 
39
 
7079dcc3bd74
ccdemos: put the common code to header files, common_ply.h and common_sdl.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
29 
diff
changeset
 | 
27  | 
realtime_dragon.o: realtime_dragon.cc common_sdl.h common_ply.h  | 
| 
 
7079dcc3bd74
ccdemos: put the common code to header files, common_ply.h and common_sdl.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
29 
diff
changeset
 | 
28  | 
realtime_bunny.o: realtime_bunny.cc common_sdl.h common_ply.h  | 
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
29  | 
spheres_shadow.o: spheres_shadow.cc common_sdl.h  | 
| 22 | 30  | 
|
31  | 
libs-float:  | 
|
32  | 
$(MAKE) -C ../src libs-float  | 
|
| 
15
 
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
 
Radek Brich <radek.brich@devl.cz> 
parents:  
diff
changeset
 | 
33  | 
|
| 22 | 34  | 
libs-double:  | 
35  | 
$(MAKE) -C ../src libs-double  | 
|
36  | 
||
37  | 
image.o: image.c  | 
|
| 
15
 
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
 
Radek Brich <radek.brich@devl.cz> 
parents:  
diff
changeset
 | 
38  | 
$(CXX) -c -o $@ $*.c  | 
| 
 
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
 
Radek Brich <radek.brich@devl.cz> 
parents:  
diff
changeset
 | 
39  | 
|
| 
 
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
 
Radek Brich <radek.brich@devl.cz> 
parents:  
diff
changeset
 | 
40  | 
clean:  | 
| 
29
 
574c34441a1c
new C++ demo: realtime_bunny
 
Radek Brich <radek.brich@devl.cz> 
parents: 
25 
diff
changeset
 | 
41  | 
rm -f spheres_shadow realtime realtime_dragon realtime_bunny *.o  | 
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
42  | 
|
| 
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
43  | 
distclean: clean  | 
| 
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
44  | 
rm -rf *.png  |