aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-08-13 10:20:25 +0300
committerCem Keylan <cem@ckyln.com>2020-08-13 10:20:25 +0300
commit4dfeb5c8d100ffaa600fed52fc3b80efc02e4bba (patch)
tree6077882384e1e11e5e3c010569abae3b40ebc272
parent4be7cbedb5f10025c9a59728848b2d7c4a42c195 (diff)
downloadinit-4dfeb5c8d100ffaa600fed52fc3b80efc02e4bba.tar.gz
Makefile: make way for other C tools
-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}