Makefile
branchpyrit
changeset 63 440e1ae80459
parent 62 07c2f8084719
child 64 5785cca4cdb9
equal deleted inserted replaced
62:07c2f8084719 63:440e1ae80459
     1 ROOT=$(shell pwd)
       
     2 include config.mk
       
     3 
       
     4 nomodels: libs-float libs-double python-module demos ccdemos
       
     5 
       
     6 all: nomodels models
       
     7 
       
     8 .PHONY : all nomodels clean distclean help
       
     9 
       
    10 help:
       
    11 	@echo 'available targets:'
       
    12 	@echo '	all			make everything'
       
    13 	@echo '	nomodels		make everything except models'
       
    14 	@echo '	models			download models'
       
    15 	@echo '	python-module		build the Python module'
       
    16 	@echo '	demos			prepare Python demos'
       
    17 	@echo '	ccdemos			build C++ demos'
       
    18 	@echo '	help			this help message'
       
    19 	@echo '	clean			remove auxiliary files and executables'
       
    20 	@echo '	distclean		remove all non-distribution files (use with care)'
       
    21 	@echo 'default target is nomodels'
       
    22 
       
    23 python-module: libs-float
       
    24 	$(MAKE) -C src python-module
       
    25 
       
    26 demos: python-module models
       
    27 	$(MAKE) -C demos
       
    28 
       
    29 ccdemos: libs-float libs-double models
       
    30 	$(MAKE) -C ccdemos
       
    31 
       
    32 models:
       
    33 	$(MAKE) -C models
       
    34 
       
    35 libs-float:
       
    36 	$(MAKE) -C src libs-float
       
    37 
       
    38 libs-double:
       
    39 	$(MAKE) -C src libs-double
       
    40 
       
    41 clean:
       
    42 	$(MAKE) -C src clean
       
    43 	$(MAKE) -C demos clean
       
    44 	$(MAKE) -C ccdemos clean
       
    45 
       
    46 distclean: clean
       
    47 	$(MAKE) -C demos distclean
       
    48 	$(MAKE) -C ccdemos distclean
       
    49 	$(MAKE) -C models distclean
       
    50 
       
    51 
       
    52 # TARGETS
       
    53 #########
       
    54 
       
    55 tests: testvector testmatrix
       
    56 
       
    57 
       
    58 # RULES
       
    59 #######
       
    60 
       
    61 test%: tests/%.cc
       
    62 	$(CXX) -o $@ tests/$*.cc $(CCFLAGS)
       
    63 	./$@
       
    64 
       
    65 
       
    66 # DEPENDENCIES
       
    67 ##############
       
    68 
       
    69 
       
    70 # library tests
       
    71 testvector: tests/vector.cc src/vector.h