summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWill Thompson <will@willthompson.co.uk>2012-01-09 16:37:50 +0000
committerWill Thompson <will@willthompson.co.uk>2012-01-09 16:37:50 +0000
commit16df1d3ba2ec260da53ba6791501168dcdeb500f (patch)
tree0c996aaca55a7d844f1bea0cb29bf5580705398d /Makefile
parentcb00859858306558c7b727fb27089afd1baeae12 (diff)
Move C sources into c-sources
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)