author | Radek Brich <radek.brich@devl.cz> |
Fri, 14 Dec 2007 16:51:22 +0100 | |
branch | pyrit |
changeset 39 | 7079dcc3bd74 |
parent 35 | fb170fccb19f |
child 41 | c1080cb5bd6d |
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 |
|
35
fb170fccb19f
new space partitioning structure: octree
Radek Brich <radek.brich@devl.cz>
parents:
30
diff
changeset
|
9 |
LIBOBJS=raytracer.o scene.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/$@ |
|
17 |
$(MAKE) -C $(ROOT)/bin/$@ -f $(ROOT)/src/Makefile libs ROOT="$(ROOT)" |
|
18 |
||
19 |
libs-double: |
|
20 |
mkdir -p $(ROOT)/bin/$@ |
|
21 |
$(MAKE) -C $(ROOT)/bin/$@ -f $(ROOT)/src/Makefile libs ROOT="$(ROOT)" DEFS="$(DEFS) -DPYRIT_DOUBLE" |
|
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 |
|
39 |
$(CXX) -c -o $@ $(DEFS) $(CCFLAGS) $< |
|
40 |
||
41 |
||
42 |
### Dependencies ### |
|
43 |
matrix.o: matrix.cc matrix.h vector.h common.h |
|
44 |
noise.o: noise.cc noise.h common.h |
|
45 |
scene.o: scene.cc scene.h vector.h noise.h common.h |
|
24
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
22
diff
changeset
|
46 |
container.o: container.cc container.h scene.h common.h |
22 | 47 |
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
|
48 |
octree.o: octree.cc octree.h scene.h common.h |
22 | 49 |
raytracer.o: raytracer.cc raytracer.h scene.h vector.h noise.h common.h |
50 |
||
30
33f95441790e
pyrit_verbosity: new variable for controlling amount of output, see common.h
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
51 |
raytracermodule.o: raytracermodule.cc $(LIBOBJS) |
22 | 52 |
$(CXX) -c -o $@ $(DEFS) $(CCFLAGS) $(PY_CCFLAGS) $< |