-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
68 lines (58 loc) · 1.34 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
SHELL=/bin/bash
SUBDIRS=src
CLEANDIRS=$(SUBDIRS:%=clean-%)
TARGETDIR ?= .
VER = $(date +"%F")
.PHONY: subdirs $(SUBDIRS)
.PHONY: clean
subdirs: $(SUBDIRS)
$(SUBDIRS):
@echo " Chosen architecture: default"
@$(MAKE) -C $@
clean: $(CLEANDIRS)
find . -name "*~" -delete
$(CLEANDIRS):
@$(MAKE) -C $(@:clean-%=%) clean
pack: subdirs pack-clean pack-src pack-lib
pack-src: subdirs
@echo " BUILD source package"
@tar vczf $(TARGETDIR)/mpt-gre-src-$(VER).tar.gz \
-C .. \
--exclude-vcs \
--exclude "*.o" \
--exclude "*.a" \
--exclude "usermanual-*" \
--exclude "nat_conf_doc-*" \
--exclude "*.docx" \
mpt/bin/ \
mpt/conf/ \
mpt/doc/ \
mpt/src/ \
mpt/nat_conf/ \
mpt/Makefile \
mpt/Makefile.m32 \
mpt/Makefile.m64
pack-lib: subdirs
@echo " BUILD library package"
@test ! -e $(TARGETDIR)/mpt -o ! -e $(TARGETDIR)/mptsrv || \
tar czf $(TARGETDIR)/mpt-gre-lib-$(VER).tar.gz \
-C .. \
--exclude-vcs \
--exclude "*.o" \
--exclude "usermanual-*" \
--exclude "nat_conf_doc-*" \
--exclude "*.docx" \
mpt/bin/ \
mpt/conf/ \
mpt/doc/usermanual/ \
mpt/src/mpt/ \
mpt/src/mptsrv/ \
mpt/src/include/ \
mpt/src/Makefile \
mpt/src/Makefile.m32 \
mpt/src/Makefile.m64 \
mpt/Makefile \
mpt/mpt \
mpt/mptsrv
pack-clean:
@rm $(TARGETDIR)/mpt-*.tar.gz || true