Fix compile against libnotify-0.7
[dhcpcd-ui] / Makefile
index dfbbe71879db9efc1aca94405c7b11274b80320b..d90b4f8f2e3944b9e94c6dfc804e8e65d5f437dc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,30 +1,49 @@
-# Makefile based on BSD make.
-# Our mk stubs also work with GNU make.
-# Copyright 2008 Roy Marples <roy@marples.name>
+PROG=          dhcpcd-ui
+VERSION=       0.5.1
 
-PROG=          dhcpcd-gtk
-SRCS=          main.c menu.c
+.PHONY:                icons
 
-SYSCONFDIR?=   ${PREFIX}/etc/xdg/autostart
-FILESDIR?=     ${SYSCONFDIR}
-FILES=         dhcpcd-gtk.desktop
+SUBDIR=                src icons
 
-# Crappy include for Desktop Environment
-# We have mk for GNOME and XFCE
-include                de-${DE}.mk 
+TOPDIR=                .
+include ${TOPDIR}/config.mk
+include ${MKDIR}/subdir.mk
 
-_PKGCFLAGS_SH= pkg-config --cflags dbus-glib-1 gtk+-2.0 libnotify ${DEPKGS}
-_PKGCFLAGS!=   ${_PKGCFLAGS_SH}
-PKGCFLAGS?=    ${_PKGCFLAGS}$(shell ${_PKGCFLAGS_SH})
-CFLAGS+=       ${PKGCFLAGS}
+GITREF?=       HEAD
+DISTPREFIX?=   ${PROG}-${VERSION}
+DISTFILE?=     ${DISTPREFIX}.tar.bz2
 
-_PKGLIBS_SH=   pkg-config --libs dbus-glib-1 gtk+-2.0 libnotify ${DEPKGS}
-_PKGLIBS!=     ${_PKGLIBS_SH}
-PKGLIBS?=      ${_PKGLIBS}$(shell ${_PKGLIBS_SH})
-LDADD+=                ${PKGLIBS}
+CLEANFILES+=   *.tar.bz2
 
-CPPFLAGS+=     ${DECPPFLAGS}
+_SNAP_SH=      date -u +%Y%m%d%H%M
+_SNAP!=                ${_SNAP_SH}
+SNAP=          ${_SNAP}$(shell ${_SNAP_SH})
+SNAPDIR=       ${DISTPREFIX}-${SNAP}
+SNAPFILE=      ${SNAPDIR}.tar.bz2
 
-MK=            mk
-include ${MK}/sys.mk
-include ${MK}/prog.mk
+dist:
+       mkdir /tmp/${DISTPREFIX}
+       cp -RPp * /tmp/${DISTPREFIX}
+       (cd /tmp/${DISTPREFIX}; make clean icons; rm config.h config.mk)
+       find /tmp/${DISTPREFIX} -name .gitignore -delete
+       tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX}
+       rm -rf /tmp/${DISTPREFIX}
+       ls -l ${DISTFILE}
+
+distclean:
+       (cd src; make clean)
+       rm -f config.h config.mk
+
+snapshot: icons
+       mkdir /tmp/${SNAPDIR}
+       cp -RPp * /tmp/${SNAPDIR}
+       (cd /tmp/${SNAPDIR}; make clean; rm config.h config.mk)
+       find /tmp/${SNAPDIR} -name .gitignore -delete
+       tar -cvjpf ${SNAPFILE} -C /tmp ${SNAPDIR}
+       rm -rf /tmp/${SNAPDIR}
+       ls -l ${SNAPFILE}
+
+snap: snapshot
+
+icons:
+       ${MAKE} -C icons