summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 15 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 25762f5..6d63f1c 100644
--- a/Makefile
+++ b/Makefile
@@ -5,29 +5,36 @@ PCAP_FLAGS := $(shell pcap-config --cflags pcap-config --libs)
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
-all: bustle-dbus-monitor bustle-pcap
+BINARIES = \
+ dist/build/bustle-dbus-monitor \
+ dist/build/bustle-pcap \
+ $(NULL)
-bustle-dbus-monitor: bustle-dbus-monitor.c
+all: $(BINARIES)
+
+dist/build/bustle-dbus-monitor: c-sources/bustle-dbus-monitor.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< $(DBUS_FLAGS)
-bustle-pcap: bustle-pcap.c
+dist/build/bustle-pcap: c-sources/bustle-pcap.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< \
$(GIO_FLAGS) $(PCAP_FLAGS)
install: all
mkdir -p $(BINDIR)
- cp bustle-dbus-monitor bustle-pcap $(BINDIR)
+ cp $(BINARIES) $(BINDIR)
uninstall:
- rm -f $(BINDIR)/bustle-dbus-monitor $(BINDIR)/bustle-pcap
+ rm -f $(notdir $(BINARIES))
clean:
- rm -f bustle-dbus-monitor bustle-pcap
+ rm -f $(BINARIES)
if test -d $(TARBALL_DIR); then rm -r $(TARBALL_DIR); fi
+ rm -f $(TARBALL)
# Binary tarball stuff. Please ignore this unless you're making a release.
TOP := $(shell pwd)
TARBALL_DIR := dist/$(shell git describe --tags)-$(shell uname -m)
+TARBALL := $(TARBALL_DIR).tar.bz2
maintainer-binary-tarball: all
mkdir -p $(TARBALL_DIR)
cabal-dev configure --prefix=$(TOP)/$(TARBALL_DIR) \
@@ -38,5 +45,5 @@ maintainer-binary-tarball: all
perl -pi -e 's{^ bustle-pcap}{ ./bustle-pcap};' \
-e 's{^ bustle} { ./bustle.sh};' \
$(TARBALL_DIR)/README
- cp bustle-dbus-monitor bustle-pcap $(TARBALL_DIR)
- tar cjf $(TARBALL_DIR).tar.bz2 $(TARBALL_DIR)
+ cp $(BINARIES) $(TARBALL_DIR)
+ tar cjf $(TARBALL) $(TARBALL_DIR)