aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-10-27 23:13:53 +0100
committerGravatar Christian Hesse <mail@eworm.de>2013-10-27 23:13:53 +0100
commitfd4d172d1fb22533fd7ade366d3adc96468a2b7e (patch)
tree35b0b02bb5fe81d01b789da35360f8aa1f8b071f /Makefile
parent89fabe126f7fd46394e3506e3602d5a19d0f539a (diff)
downloadpacredir-fd4d172d1fb22533fd7ade366d3adc96468a2b7e.tar.gz
pacredir-fd4d172d1fb22533fd7ade366d3adc96468a2b7e.tar.zst
make pacdbserve aware of architecture
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9487510..1bb8d07 100644
--- a/Makefile
+++ b/Makefile
@@ -4,23 +4,28 @@ CC := gcc
MD := markdown
INSTALL := install
RM := rm
+SED := sed
CFLAGS += -O2 -Wall -Werror
CFLAGS += $(shell pkg-config --libs --cflags libcurl)
CFLAGS += $(shell pkg-config --libs --cflags avahi-client)
CFLAGS += $(shell pkg-config --libs --cflags libmicrohttpd)
VERSION := $(shell git describe --tags --long 2>/dev/null)
+ARCH := $(shell uname -m)
# this is just a fallback in case you do not use git but downloaded
# a release tarball...
ifeq ($(VERSION),)
VERSION := 0.0.1
endif
-all: pacredir README.html
+all: pacredir pacdbserve README.html
pacredir: pacredir.c
$(CC) $(CFLAGS) -o pacredir pacredir.c \
-DVERSION="\"$(VERSION)\""
+pacdbserve: avahi/pacdbserve.service.in
+ $(SED) 's/%ARCH%/$(ARCH)/' avahi/pacdbserve.service.in > avahi/pacdbserve.service
+
README.html: README.md
$(MD) README.md > README.html