e1682bbd3b92b2ebb9c8b35a8d9b52062505d5f2
[dhcpcd-ui] / Makefile
1 PROG=           dhcpcd-ui
2 VERSION=        0.6.0
3
4 .PHONY:         icons
5
6 SUBDIR=         src icons
7
8 TOPDIR=         .
9 include ${TOPDIR}/iconfig.mk
10 include ${MKDIR}/subdir.mk
11
12 GITREF?=        HEAD
13 DISTPREFIX?=    ${PROG}-${VERSION}
14 DISTFILE?=      ${DISTPREFIX}.tar.bz2
15
16 CLEANFILES+=    *.tar.bz2
17
18 _SNAP_SH=       date -u +%Y%m%d%H%M
19 _SNAP!=         ${_SNAP_SH}
20 SNAP=           ${_SNAP}$(shell ${_SNAP_SH})
21 SNAPDIR=        ${DISTPREFIX}-${SNAP}
22 SNAPFILE=       ${SNAPDIR}.tar.bz2
23
24 proginstall:
25         cd src && make $@
26
27 dist:
28         mkdir /tmp/${DISTPREFIX}
29         cp -RPp * /tmp/${DISTPREFIX}
30         (cd /tmp/${DISTPREFIX}; make clean icons; rm config.h config.mk)
31         find /tmp/${DISTPREFIX} -name .gitignore -delete
32         tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX}
33         rm -rf /tmp/${DISTPREFIX}
34         ls -l ${DISTFILE}
35
36 distclean:
37         (cd src; make clean)
38         rm -f config.h config.mk
39
40 snapshot: icons
41         mkdir /tmp/${SNAPDIR}
42         cp -RPp * /tmp/${SNAPDIR}
43         (cd /tmp/${SNAPDIR}; make clean; rm config.h config.mk)
44         find /tmp/${SNAPDIR} -name .gitignore -delete
45         tar -cvjpf ${SNAPFILE} -C /tmp ${SNAPDIR}
46         rm -rf /tmp/${SNAPDIR}
47         ls -l ${SNAPFILE}
48
49 snap: snapshot
50
51 icons:
52         ${MAKE} -C icons