844f15df9c8bc4ee636c4fff48709589ef38651b
[dhcpcd-ui] / Makefile
1 PROG=           dhcpcd-ui
2 VERSION=        0.7.1
3
4 TOPDIR=         .
5 include ${TOPDIR}/iconfig.mk
6 include ${MKDIR}/subdir.mk
7
8 .PHONY:         icons
9
10 SUBDIR=         src ${MKICONS}
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 dist:
25         mkdir /tmp/${DISTPREFIX}
26         cp -RPp * /tmp/${DISTPREFIX}
27         (cd /tmp/${DISTPREFIX}; make clean icons; rm config.h config.mk)
28         find /tmp/${DISTPREFIX} -name .gitignore -delete
29         tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX}
30         rm -rf /tmp/${DISTPREFIX}
31         ls -l ${DISTFILE}
32
33 distclean:
34         (cd src; make clean)
35         rm -f config.h config.mk
36
37 snapshot: icons
38         mkdir /tmp/${SNAPDIR}
39         cp -RPp * /tmp/${SNAPDIR}
40         (cd /tmp/${SNAPDIR}; make clean; rm config.h config.mk)
41         find /tmp/${SNAPDIR} -name .gitignore -delete
42         tar -cvjpf ${SNAPFILE} -C /tmp ${SNAPDIR}
43         rm -rf /tmp/${SNAPDIR}
44         ls -l ${SNAPFILE}
45
46 snap: snapshot
47
48 icons:
49         ${MAKE} -C icons