Makefile
author Radek Brich <radek.brich@devl.cz>
Mon, 03 Dec 2007 01:49:23 +0100
branchpyrit
changeset 22 76b7bd51d64a
parent 17 5176ba000a67
child 24 d0d76e8a5203
permissions -rw-r--r--
new make infrastructure generalize floats to Floats, allow compiling as both double/float
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
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
     4
all: python-module demos ccdemos
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
     5
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
     6
python-module: libs-float
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
     7
	$(MAKE) -C src python-module
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
     8
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
     9
demos: python-module
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    10
	$(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
    11
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    12
ccdemos: libs-float libs-double
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    13
	$(MAKE) -C ccdemos
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    14
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    15
libs-float:
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    16
	$(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
    17
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    18
libs-double:
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    19
	$(MAKE) -C src libs-double
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    20
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    21
clean:
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    22
	$(MAKE) -C src clean
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    23
	$(MAKE) -C demos clean
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents: 17
diff changeset
    24
	$(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
    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
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
# 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
    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
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
    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
# 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
    34
#######
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
17
5176ba000a67 fix last leak as reported by valgrind
Radek Brich <radek.brich@devl.cz>
parents: 16
diff changeset
    36
test%: tests/%.cc
5176ba000a67 fix last leak as reported by valgrind
Radek Brich <radek.brich@devl.cz>
parents: 16
diff changeset
    37
	$(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
    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
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
# 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
    46
testvector: tests/vector.cc src/vector.h