From 4dfeb5c8d100ffaa600fed52fc3b80efc02e4bba Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Thu, 13 Aug 2020 10:20:25 +0300 Subject: Makefile: make way for other C tools --- Makefile | 13 +++++++++---- 1 file 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} -- cgit v1.2.3