Menu

[94f52a]: / Makefile  Maximize  Restore  History

Download this file

46 lines (35 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.PHONY: test install util release
SHOW_OUTPUT := 1
PROJECT := chilon
default:
@echo "please run 'make install' to install this software, or 'make util' to compile the utility software"
include mk/Makefile
-include Makefile.config
prefix ?= /usr/local
util:
${MAKE} -C bin
test:
@for file in $(wildcard test/*/test.cpp) ; do \
test=$${file%.cpp}; \
echo "running $$test"; \
rm -f $$test; \
${CXX} -I.. $$file -o $$test; \
$$test $(if ${SHOW_OUTPUT},| tee,>) $$test.out; \
done
PRUNE_PATTERNS := -name '.git*' -prune -o -name bin -prune -o -name cmake -prune -o -name test -prune -o -name mk -prune -o
install:
@find . ${PRUNE_PATTERNS} -type d -exec mkdir -p ${DESTDIR}/${prefix}/include/chilon/{} \;
@find . ${PRUNE_PATTERNS} -type f -name '*.?pp' -exec install -m 664 {} ${DESTDIR}/${prefix}/include/chilon/{} \;
${MAKE} -C bin install prefix=${prefix} DESTDIR=${DESTDIR}
clean:
rm -f config.hpp Makefile.local Makefile.config
${MAKE} -C bin clean
dist:
cd doc && make
distDir=chilon-`git tag | tail -n1`; \
file=$$distDir.tar.gz ; touch $$file ; \
ln -sf . $$distDir ; \
tar chzvf $$file $(addprefix --exclude ,$$distDir/$$file $$distDir/config.hpp $$distDir/.git $$distDir/Makefile.config $$distDir/$$distDir '.git*' .obj) $$distDir ; \
rm $$distDir
%.s: test/%/test.cpp
${CXX} -S -O3 -I.. $< -o $@
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.