aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d0bc07c..fe893ad 100644
--- a/Makefile
+++ b/Makefile
@@ -6,13 +6,18 @@ BINDIR = ${PREFIX}/bin
CONFDIR = /etc/init
CC = cc
-all: bin/shalt
+CFLAGS = -std=c99 -Wall -pedantic
+LDFLAGS = -static
-bin/shalt: bin/shalt.c
- ${CC} -o bin/shalt bin/shalt.c
+BIN = bin/shalt
+
+all: ${BIN}
+
+.c:
+ ${CC} ${CFLAGS} ${LDFLAGS} -o $@ $<
clean:
- rm -f bin/shalt
+ rm -f ${BIN} ${OBJ}
install: bin/shalt
mkdir -p ${DESTDIR}${CONFDIR} ${DESTDIR}${INITDIR} ${DESTDIR}${BINDIR}