author | Radek Brich <radek.brich@devl.cz> |
Wed, 26 Mar 2008 17:03:38 +0100 | |
branch | pyrit |
changeset 48 | a4913301c626 |
parent 47 | 320d5d466864 |
permissions | -rw-r--r-- |
22 | 1 |
ifndef $(ROOT) |
2 |
ROOT=$(shell pwd)/.. |
|
3 |
endif |
|
4 |
||
5 |
include $(ROOT)/config.mk |
|
6 |
||
7 |
vpath %.cc $(ROOT)/src |
|
8 |
vpath %.h $(ROOT)/include |
|
47
320d5d466864
move Sampler classes to sampler.cc
Radek Brich <radek.brich@devl.cz>
parents:
41
diff
changeset
|
9 |
LIBOBJS=raytracer.o scene.o sampler.o noise.o container.o kdtree.o octree.o |
22 | 10 |
CCFLAGS+=-I$(ROOT)/include |
11 |
||
12 |
### Targets ### |
|
13 |
all: libs-float libs-double python-module |
|
14 |
||
15 |
libs-float: |
|
16 |
mkdir -p $(ROOT)/bin/$@ |
|
41
c1080cb5bd6d
fix possible division by zero in ccdemos/common_ply.h
Radek Brich <radek.brich@devl.cz>
parents:
35
diff
changeset
|
17 |
$(MAKE) -C $(ROOT)/bin/$@ -f $(ROOT)/src/Makefile libs ROOT="$(ROOT)" CCFLAGS="$(CCFLAGS) -fsingle-precision-constant" |
22 | 18 |
|
19 |
libs-double: |
|
20 |
mkdir -p $(ROOT)/bin/$@ |
|
41
c1080cb5bd6d
fix possible division by zero in ccdemos/common_ply.h
Radek Brich <radek.brich@devl.cz>
parents:
35
diff
changeset
|
21 |
$(MAKE) -C $(ROOT)/bin/$@ -f $(ROOT)/src/Makefile libs ROOT="$(ROOT)" CCFLAGS="$(CCFLAGS) -DPYRIT_DOUBLE" |
22 | 22 |
|
23 |
libs: $(LIBOBJS) |
|
24 |
||
25 |
python-module: libs-float |
|
26 |
mkdir -p $(ROOT)/bin/$@ |
|
27 |
$(MAKE) -C $(ROOT)/bin/$@ -f $(ROOT)/src/Makefile $(MODULENAME) ROOT="$(ROOT)" |
|
28 |
||
29 |
$(MODULENAME): raytracermodule.o |
|
30 |
$(CXX) -shared -o $@ $< $(ROOT)/bin/libs-float/*.o $(LDFLAGS) $(PY_LDFLAGS) |
|
31 |
||
32 |
clean: |
|
33 |
rm -rf $(ROOT)/bin/libs-* |
|
34 |
rm -rf $(ROOT)/bin/python-module |
|
35 |
||
36 |
||
37 |
### Rules ### |
|
38 |
%.o: %.cc |
|
41
c1080cb5bd6d
fix possible division by zero in ccdemos/common_ply.h
Radek Brich <radek.brich@devl.cz>
parents:
35
diff
changeset
|
39 |
$(CXX) -c -o $@ $(CCFLAGS) $< |
22 | 40 |
|
41 |
||
42 |
### Dependencies ### |
|
43 |
matrix.o: matrix.cc matrix.h vector.h common.h |
|
44 |
noise.o: noise.cc noise.h common.h |
|
47
320d5d466864
move Sampler classes to sampler.cc
Radek Brich <radek.brich@devl.cz>
parents:
41
diff
changeset
|
45 |
scene.o: scene.cc scene.h sampler.h vector.h noise.h common.h |
320d5d466864
move Sampler classes to sampler.cc
Radek Brich <radek.brich@devl.cz>
parents:
41
diff
changeset
|
46 |
sampler.o: sampler.cc sampler.h vector.h common.h |
24
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
22
diff
changeset
|
47 |
container.o: container.cc container.h scene.h common.h |
22 | 48 |
kdtree.o: kdtree.cc kdtree.h scene.h common.h |
35
fb170fccb19f
new space partitioning structure: octree
Radek Brich <radek.brich@devl.cz>
parents:
30
diff
changeset
|
49 |
octree.o: octree.cc octree.h scene.h common.h |
22 | 50 |
raytracer.o: raytracer.cc raytracer.h scene.h vector.h noise.h common.h |
51 |
||
30
33f95441790e
pyrit_verbosity: new variable for controlling amount of output, see common.h
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
52 |
raytracermodule.o: raytracermodule.cc $(LIBOBJS) |
41
c1080cb5bd6d
fix possible division by zero in ccdemos/common_ply.h
Radek Brich <radek.brich@devl.cz>
parents:
35
diff
changeset
|
53 |
$(CXX) -c -o $@ $(CCFLAGS) $(PY_CCFLAGS) $< |