Add support for a configure script
[dhcpcd-ui] / Makefile
1 PROG=           dhcpcd-ui
2 VERSION=        0.4.3
3
4 .PHONY:         icons
5
6 SUBDIR=         src icons
7
8 TOPDIR=         .
9 include ${TOPDIR}/config.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 dist:
25         mkdir /tmp/${DISTPREFIX}
26         cp -RPp * /tmp/${DISTPREFIX}
27         (cd /tmp/${DISTPREFIX}; make clean icons)
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 snapshot: icons
34         mkdir /tmp/${SNAPDIR}
35         cp -RPp * /tmp/${SNAPDIR}
36         (cd /tmp/${SNAPDIR}; make clean)
37         find /tmp/${SNAPDIR} -name .gitignore -delete
38         tar -cvjpf ${SNAPFILE} -C /tmp ${SNAPDIR}
39         rm -rf /tmp/${SNAPDIR}
40         ls -l ${SNAPFILE}
41
42 snap: snapshot
43
44 icons:
45         ${MAKE} -C icons