diff options
author | Will Thompson <will@willthompson.co.uk> | 2012-01-09 16:37:50 +0000 |
---|---|---|
committer | Will Thompson <will@willthompson.co.uk> | 2012-01-09 16:37:50 +0000 |
commit | 16df1d3ba2ec260da53ba6791501168dcdeb500f (patch) | |
tree | 0c996aaca55a7d844f1bea0cb29bf5580705398d /Makefile | |
parent | cb00859858306558c7b727fb27089afd1baeae12 (diff) |
Move C sources into c-sources
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 15 insertions, 8 deletions
@@ -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) |