Add compiler warnings and fix them
[netns-socks.git] / Makefile
blob5294bdd289af0d6eda1ce7cc6eff2dcdff012e62
1 PREFIX ?= /usr/local
3 SRC = drw.c dwm.c util.c
4 OBJ = ${SRC:.c=.o}
6 ALL_CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations ${CFLAGS}
8 all: netns-socks
10 clean:
11 rm -f netns-socks netns-socks.o
13 .c.o:
14 ${CC} -c ${ALL_CFLAGS} $<
16 netns-socks: netns-socks.o
17 ${CC} -o $@ $^ ${LDFLAGS}
19 install: all
20 install -Dt ${DESTDIR}${PREFIX}/lib/netns-socks netns-socks etc-resolv.conf
21 mkdir -p ${DESTDIR}${PREFIX}/bin
22 printf "#!%s/lib/netns-socks/netns-socks -n\n" ${PREFIX} > ${DESTDIR}${PREFIX}/bin/netns-socks
23 chmod 755 -- ${DESTDIR}${PREFIX}/bin/netns-socks
25 uninstall:
26 rm -fr ${DESTDIR}${PREFIX}/lib/netns-socks ${DESTDIR}${PREFIX}/bin/netns-socks
28 .PHONY: all clean install uninstall