-
Notifications
You must be signed in to change notification settings - Fork 161
/
Makefile
executable file
·69 lines (55 loc) · 2.45 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
#!/usr/bin/make -f
# file: plc-utils/Makefile
# Published 2010 by Qualcomm Atheros;
# ====================================================================
# target platform symbols;
# --------------------------------------------------------------------
include make.def
# ====================================================================
# package symbols;
# --------------------------------------------------------------------
PROJECT=open-plc-utils
RELEASE=$(shell basename "${CURDIR}")
LIBRARY=${FTP}/toolkit/${RELEASE}
CDROM=${FTP}/cdrom/${RELEASE}
FOLDERS=ether key mdio mme nvm nodes pib plc ram serial slac tools VisualStudioNET
EXCLUDE=--exclude=.git --exclude=.#* --exclude=*.[0-9][0-9][0-9]
# ====================================================================
# installation targets;
# --------------------------------------------------------------------
.PHONY: all compile compact scripts manuals install uninstall check fresh clean ignore
all compile compact scripts manuals install uninstall check fresh clean ignore:
@for folder in ${FOLDERS}; do ${MAKE} -C $${folder} ${@} || exit 1; done
# ====================================================================
# releasetargets;
# --------------------------------------------------------------------
.PHONY: package library prepare cleanse
debian: clean
dpkg-buildpackage -rfakeroot -uc -us
debian-setup:
apt-get install dpkg-dev debhelper devscripts fakeroot linda
# apt-get install dpkg dpkg-dev debhelper dh-make devscripts quilt
package: archive prepare library mine
prepare:
rm -fr t.* install.* *.err *.log
rm -fr */t.* */install.* */*.err */*.log */*.o */*.[0-9][0-9][0-9]
library:
install -m 6775 -o root -g fae -d ${LIBRARY}
install -m 0555 -o root -g root VisualStudioNET/*.msi ${LIBRARY}
install -m 0555 -o root -g root ../${RELEASE}.tar.* ${LIBRARY}
cp -r VisualStudioNET/Programs/* ${LIBRARY}/programs
crlf -w < CHANGES > ${LIBRARY}/_CHANGES.txt
crlf -w < README > ${LIBRARY}/_README.txt
crlf -w < LICENCES > ${LIBRARY}/_LICENSES.txt
crlf -w < NOTICES > ${LIBRARY}/_NOTICES.txt
ls -la ${LIBRARY}/*.tar.*
ls -la ${LIBRARY}/*.msi
# ====================================================================
# maintain;
# --------------------------------------------------------------------
.PHONY: archive restore
archive: clean
tar ${EXCLUDE} -vzcf ../${RELEASE}.tar.gz -C .. ${RELEASE}
tar ${EXCLUDE} -vjcf ../${RELEASE}.tar.bz2 -C .. ${RELEASE}
restore:
tar -vzxf ../${RELEASE}.tar.gz -C ..