src/Makefile
branchpyrit
changeset 41 c1080cb5bd6d
parent 35 fb170fccb19f
child 47 320d5d466864
equal deleted inserted replaced
40:929aad02c5f2 41:c1080cb5bd6d
    12 ### Targets ###
    12 ### Targets ###
    13 all: libs-float libs-double python-module
    13 all: libs-float libs-double python-module
    14 
    14 
    15 libs-float:
    15 libs-float:
    16 	mkdir -p $(ROOT)/bin/$@
    16 	mkdir -p $(ROOT)/bin/$@
    17 	$(MAKE) -C $(ROOT)/bin/$@ -f $(ROOT)/src/Makefile libs ROOT="$(ROOT)"
    17 	$(MAKE) -C $(ROOT)/bin/$@ -f $(ROOT)/src/Makefile libs ROOT="$(ROOT)" CCFLAGS="$(CCFLAGS) -fsingle-precision-constant"
    18 
    18 
    19 libs-double:
    19 libs-double:
    20 	mkdir -p $(ROOT)/bin/$@
    20 	mkdir -p $(ROOT)/bin/$@
    21 	$(MAKE) -C $(ROOT)/bin/$@ -f $(ROOT)/src/Makefile libs ROOT="$(ROOT)" DEFS="$(DEFS) -DPYRIT_DOUBLE"
    21 	$(MAKE) -C $(ROOT)/bin/$@ -f $(ROOT)/src/Makefile libs ROOT="$(ROOT)" CCFLAGS="$(CCFLAGS) -DPYRIT_DOUBLE"
    22 
    22 
    23 libs: $(LIBOBJS)
    23 libs: $(LIBOBJS)
    24 
    24 
    25 python-module: libs-float
    25 python-module: libs-float
    26 	mkdir -p $(ROOT)/bin/$@
    26 	mkdir -p $(ROOT)/bin/$@
    34 	rm -rf $(ROOT)/bin/python-module
    34 	rm -rf $(ROOT)/bin/python-module
    35 
    35 
    36 
    36 
    37 ### Rules ###
    37 ### Rules ###
    38 %.o: %.cc
    38 %.o: %.cc
    39 	$(CXX) -c -o $@ $(DEFS) $(CCFLAGS) $<
    39 	$(CXX) -c -o $@ $(CCFLAGS) $<
    40 
    40 
    41 
    41 
    42 ### Dependencies ###
    42 ### Dependencies ###
    43 matrix.o: matrix.cc matrix.h vector.h common.h
    43 matrix.o: matrix.cc matrix.h vector.h common.h
    44 noise.o: noise.cc noise.h common.h
    44 noise.o: noise.cc noise.h common.h
    47 kdtree.o: kdtree.cc kdtree.h scene.h common.h
    47 kdtree.o: kdtree.cc kdtree.h scene.h common.h
    48 octree.o: octree.cc octree.h scene.h common.h
    48 octree.o: octree.cc octree.h scene.h common.h
    49 raytracer.o: raytracer.cc raytracer.h scene.h vector.h noise.h common.h
    49 raytracer.o: raytracer.cc raytracer.h scene.h vector.h noise.h common.h
    50 
    50 
    51 raytracermodule.o: raytracermodule.cc $(LIBOBJS)
    51 raytracermodule.o: raytracermodule.cc $(LIBOBJS)
    52 	$(CXX) -c -o $@ $(DEFS) $(CCFLAGS) $(PY_CCFLAGS) $<
    52 	$(CXX) -c -o $@ $(CCFLAGS) $(PY_CCFLAGS) $<