Makefile
author Radek Brich <radek.brich@devl.cz>
Fri, 04 Apr 2008 13:54:47 +0200
branchpyrit
changeset 59 64e456ab823d
parent 40 929aad02c5f2
permissions -rw-r--r--
add color support to lwo reader python binding for Camera
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
     1
ROOT=$(shell pwd)
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
     2
include config.mk
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
     3
40
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
     4
nomodels: libs-float libs-double python-module demos ccdemos
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
     5
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
     6
all: nomodels models
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
     7
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
     8
.PHONY : all nomodels clean distclean help
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
     9
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    10
help:
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    11
	@echo 'available targets:'
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    12
	@echo '	all			make everything'
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    13
	@echo '	nomodels		make everything except models'
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    14
	@echo '	models			download models'
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    15
	@echo '	python-module		build the Python module'
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    16
	@echo '	demos			prepare Python demos'
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    17
	@echo '	ccdemos			build C++ demos'
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    18
	@echo '	help			this help message'
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    19
	@echo '	clean			remove auxiliary files and executables'
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    20
	@echo '	distclean		remove all non-distribution files (use with care)'
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    21
	@echo 'default target is nomodels'
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    23
python-module: libs-float
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    24
	$(MAKE) -C src python-module
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    25
24
d0d76e8a5203 new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents: 22
diff changeset
    26
demos: python-module models
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    27
	$(MAKE) -C demos
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
    28
24
d0d76e8a5203 new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents: 22
diff changeset
    29
ccdemos: libs-float libs-double models
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    30
	$(MAKE) -C ccdemos
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    31
24
d0d76e8a5203 new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents: 22
diff changeset
    32
models:
d0d76e8a5203 new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents: 22
diff changeset
    33
	$(MAKE) -C models
d0d76e8a5203 new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents: 22
diff changeset
    34
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    35
libs-float:
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    36
	$(MAKE) -C src libs-float
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
    37
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    38
libs-double:
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    39
	$(MAKE) -C src libs-double
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    40
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    41
clean:
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    42
	$(MAKE) -C src clean
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    43
	$(MAKE) -C demos clean
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    44
	$(MAKE) -C ccdemos clean
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
    45
40
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    46
distclean: clean
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    47
	$(MAKE) -C demos distclean
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    48
	$(MAKE) -C ccdemos distclean
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    49
	$(MAKE) -C models distclean
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 24
diff changeset
    50
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
    51
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
# 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
    53
#########
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
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
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
    56
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
3547b885df7e initial commit, raytracer source as written year ago and unchanged since 2007-03-25
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    58
# 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
    59
#######
3547b885df7e initial commit, raytracer source as written year ago and unchanged since 2007-03-25
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    60
17
5176ba000a67 fix last leak as reported by valgrind
Radek Brich <radek.brich@devl.cz>
parents: 16
diff changeset
    61
test%: tests/%.cc
5176ba000a67 fix last leak as reported by valgrind
Radek Brich <radek.brich@devl.cz>
parents: 16
diff changeset
    62
	$(CXX) -o $@ tests/$*.cc $(CCFLAGS)
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
    63
	./$@
3547b885df7e initial commit, raytracer source as written year ago and unchanged since 2007-03-25
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    64
3547b885df7e initial commit, raytracer source as written year ago and unchanged since 2007-03-25
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    65
3547b885df7e initial commit, raytracer source as written year ago and unchanged since 2007-03-25
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    66
# 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
    67
##############
3547b885df7e initial commit, raytracer source as written year ago and unchanged since 2007-03-25
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    68
3547b885df7e initial commit, raytracer source as written year ago and unchanged since 2007-03-25
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    69
3547b885df7e initial commit, raytracer source as written year ago and unchanged since 2007-03-25
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    70
# 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
    71
testvector: tests/vector.cc src/vector.h