-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (39 loc) · 1.22 KB
/
Makefile
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
46
47
48
49
50
51
52
53
PROG = radon-tools
SCONS_FLAGS=-j $(shell nproc)
# How to install
INSTALL_PROG = install -m 755
# rpm variables
CWP = $(shell pwd)
BIN = $(shell basename $(CWP))
rpmsourcedir = /tmp/$(shell whoami)/rpmbuild
INSTALL_TARGET = /usr/bin
# The rules
all release:
scons-3 $(SCONS_FLAGS)
debug:
scons-3 $(SCONS_FLAGS) --debug-build
clean:
scons-3 -c ; scons-3 --debug-build -c ; rm -f *~ source/*~ include/*~
rpm: clean
mkdir -p $(rpmsourcedir) ; \
if [ -a $(PROG).spec ]; \
then \
tar -C ../ --exclude .svn \
-cf $(rpmsourcedir)/$(PROG).tar $(PROG) ; \
gzip -f $(rpmsourcedir)/$(PROG).tar ; \
rpmbuild -ta $(rpmsourcedir)/$(PROG).tar.gz ; \
rm -f $(rpmsourcedir)/$(LIB).tar.gz ; \
else \
echo $(rpmerr); \
fi;
install:
mkdir -p $(bindir)
$(INSTALL_PROG) build/release/grid_to_radon $(bindir)
if [ $(shell grep -ic suse /etc/issue) -eq 0 ]; then \
$(INSTALL_PROG) python/radon_tables.py $(bindir) ; \
$(INSTALL_PROG) python/previ_to_radon.py $(bindir) ; \
$(INSTALL_PROG) python/geom_to_radon.py $(bindir) ; \
$(INSTALL_PROG) python/calc_hybrid_level_height.py $(bindir) ; \
fi;
test: debug
cd regression && sh test_all.sh