commit cceda1b9c560147847f430e7376f1b382de58015
parent f9d3ae8f5ea74ab2f14e0811c8e4307b5dc1e7bf
Author: parazyd <parazyd@dyne.org>
Date: Wed, 2 May 2018 13:55:17 +0200
POSIX Makefile.
Diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,5 +1,6 @@
# rp - simple email tools
# See LICENSE file for copyright and license details.
+.POSIX:
include config.mk
@@ -18,6 +19,9 @@ $(OBJ): config.mk
$(BIN): $(OBJ)
$(CC) $(OBJ) $(LDFLAGS) -o $@
+.c.o:
+ $(CC) $(CFLAGS) -c $<
+
clean:
cd bin; \
for i in `../$(NAME) -i`; do \
diff --git a/config.mk b/config.mk
@@ -5,8 +5,6 @@ PREFIX = /usr/local
SHAREPREFIX = $(PREFIX)/share/rp
MANPREFIX = $(PREFIX)/share/man
-CFLAGS = -O2 -Wall -pedantic -std=gnu99
+CPPFLAGS = -D_GNU_SOURCE
+CFLAGS = $(CPPFLAGS) -O2 -Wall -pedantic -std=c99
LDFLAGS = -static -g -lssl -lcrypto
-
-.c.o:
- $(CC) $(CFLAGS) -c $<