| author | Radek Brich <radek.brich@devl.cz> | 
| Wed, 26 Mar 2008 00:52:27 +0100 | |
| branch | pyrit | 
| changeset 46 | 6493fb65f0b1 | 
| parent 42 | fbdeb3e04543 | 
| permissions | -rw-r--r-- | 
| 22 | 1  | 
ifndef $(ROOT)  | 
2  | 
ROOT=$(shell pwd)/..  | 
|
3  | 
endif  | 
|
4  | 
||
5  | 
include $(ROOT)/config.mk  | 
|
6  | 
||
| 
41
 
c1080cb5bd6d
fix possible division by zero in ccdemos/common_ply.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
40 
diff
changeset
 | 
7  | 
### single precision  | 
| 
 
c1080cb5bd6d
fix possible division by zero in ccdemos/common_ply.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
40 
diff
changeset
 | 
8  | 
#RTLIBS=libs-float  | 
| 
 
c1080cb5bd6d
fix possible division by zero in ccdemos/common_ply.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
40 
diff
changeset
 | 
9  | 
#CCFLAGS+=-fsingle-precision-constant  | 
| 
 
c1080cb5bd6d
fix possible division by zero in ccdemos/common_ply.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
40 
diff
changeset
 | 
10  | 
|
| 
 
c1080cb5bd6d
fix possible division by zero in ccdemos/common_ply.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
40 
diff
changeset
 | 
11  | 
### double precision  | 
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
12  | 
RTLIBS=libs-double  | 
| 
41
 
c1080cb5bd6d
fix possible division by zero in ccdemos/common_ply.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
40 
diff
changeset
 | 
13  | 
CCFLAGS+=-DPYRIT_DOUBLE  | 
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
14  | 
|
| 22 | 15  | 
|
| 
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
 | 
16  | 
### 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
 | 
17  | 
%.o: %.cc  | 
| 
41
 
c1080cb5bd6d
fix possible division by zero in ccdemos/common_ply.h
 
Radek Brich <radek.brich@devl.cz> 
parents: 
40 
diff
changeset
 | 
18  | 
$(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $<  | 
| 
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
 | 
19  | 
|
| 
 
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
 | 
20  | 
%: %.o  | 
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
21  | 
$(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
 | 
22  | 
|
| 22 | 23  | 
### Targets ###  | 
| 42 | 24  | 
all: realtime realtime_dragon realtime_bunny spheres_shadow textures  | 
| 22 | 25  | 
|
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
26  | 
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
 | 
27  | 
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
 | 
28  | 
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
 | 
29  | 
spheres_shadow: spheres_shadow.o $(RTLIBS) image.o  | 
| 42 | 30  | 
textures: textures.o $(RTLIBS) image.o  | 
| 
24
 
d0d76e8a5203
new C++ demo: realtime_dragon.cc
 
Radek Brich <radek.brich@devl.cz> 
parents: 
22 
diff
changeset
 | 
31  | 
|
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
32  | 
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
 | 
33  | 
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
 | 
34  | 
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
 | 
35  | 
spheres_shadow.o: spheres_shadow.cc common_sdl.h  | 
| 42 | 36  | 
textures.o: textures.cc common_sdl.h  | 
| 22 | 37  | 
|
38  | 
libs-float:  | 
|
39  | 
$(MAKE) -C ../src libs-float  | 
|
| 
15
 
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
 
Radek Brich <radek.brich@devl.cz> 
parents:  
diff
changeset
 | 
40  | 
|
| 22 | 41  | 
libs-double:  | 
42  | 
$(MAKE) -C ../src libs-double  | 
|
43  | 
||
44  | 
image.o: image.c  | 
|
| 
15
 
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
 
Radek Brich <radek.brich@devl.cz> 
parents:  
diff
changeset
 | 
45  | 
$(CXX) -c -o $@ $*.c  | 
| 
 
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
 
Radek Brich <radek.brich@devl.cz> 
parents:  
diff
changeset
 | 
46  | 
|
| 
 
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
 
Radek Brich <radek.brich@devl.cz> 
parents:  
diff
changeset
 | 
47  | 
clean:  | 
| 42 | 48  | 
rm -f realtime realtime_dragon realtime_bunny spheres_shadow textures *.o  | 
| 
40
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
49  | 
|
| 
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
50  | 
distclean: clean  | 
| 
 
929aad02c5f2
Makefile: added help and distclean target, plus small fixes
 
Radek Brich <radek.brich@devl.cz> 
parents: 
39 
diff
changeset
 | 
51  | 
rm -rf *.png  |