| author | Radek Brich <radek.brich@devl.cz> | 
| Thu, 25 Oct 2007 16:40:22 +0200 | |
| branch | pyrit | 
| changeset 0 | 3547b885df7e | 
| child 1 | e74bf781067e | 
| permissions | -rw-r--r-- | 
| 0 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 1 | CCFLAGS=-Wall -O3 -I./src | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 2 | LDFLAGS= | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 3 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 4 | ifeq ($(OS), Windows_NT) | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 5 | CCFLAGS+=-I"C:/Program Files/Python25/include" | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 6 | LDFLAGS+=-L"C:\Program Files\Python25\libs" -lpython25 | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 7 | MODULENAME=raytracer.pyd | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 8 | else | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 9 | CCFLAGS+=-fPIC -I/usr/include/python2.4 | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 10 | MODULENAME=raytracermodule.so | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 11 | endif | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 12 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 13 | # optimisations | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 14 | #CCFLAGS+=-pipe -fomit-frame-pointer -ffast-math -msse3 | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 15 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 16 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 17 | # TARGETS | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 18 | ######### | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 19 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 20 | all: python-module | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 21 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 22 | python-module: $(MODULENAME) | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 23 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 24 | tests: testvector testmatrix | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 25 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 26 | clean: | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 27 | rm -f *.o $(MODULENAME) testvector testmatrix | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 28 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 29 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 30 | # RULES | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 31 | ####### | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 32 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 33 | %.o: src/%.cc | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 34 | $(CXX) -c -o $@ src/$*.cc $(CCFLAGS) | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 35 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 36 | test%: tests/%.cc | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 37 | $(CXX) -o $@ tests/$*.cc $(CCFLAGS) | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 38 | ./$@ | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 39 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 40 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 41 | # DEPENDENCIES | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 42 | ############## | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 43 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 44 | # C++ raytracer | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 45 | vector.o: src/vector.cc src/vector.h | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 46 | matrix.o: src/matrix.cc src/matrix.h src/vector.h | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 47 | noise.o: src/noise.cc src/noise.h | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 48 | scene.o: src/scene.cc src/scene.h src/vector.h src/noise.h | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 49 | raytracer.o: src/raytracer.cc src/raytracer.h src/scene.h src/vector.h src/noise.h | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 50 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 51 | # python module | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 52 | raytracermodule.o: src/raytracermodule.cc src/raytracer.h src/scene.h src/vector.h | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 53 | $(MODULENAME): raytracermodule.o raytracer.o scene.o noise.o | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 54 | $(CXX) $^ -shared -o $@ $(LDFLAGS) | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 55 | |
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 56 | # library tests | 
| 
3547b885df7e
initial commit, raytracer source as written year ago and unchanged since 2007-03-25
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 57 | testvector: tests/vector.cc src/vector.h |