[hackers] [sbase] Do not append CPPFLAGS to CFLAGS || sin
commit e1c044e298ee80a2b3f34e2d491ed6d66965a595
Author: sin <sin_AT_2f30.org>
Date: Mon Nov 17 10:31:29 2014 +0000
Do not append CPPFLAGS to CFLAGS
diff --git a/Makefile b/Makefile
index 5d75f6e..10de069 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -134,10 +134,10 @@ bin: $(BIN)
$(OBJ): $(HDR) config.mk
.o:
- $(LD) -o $_AT_ $< libutil.a $(LDFLAGS)
+ $(LD) $(LDFLAGS) -o $_AT_ $< libutil.a
.c.o:
- $(CC) $(CFLAGS) -o $_AT_ -c $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $_AT_ -c $<
libutil.a: $(LIB)
$(AR) -r -c $_AT_ $?
_AT_@ -177,7 +177,7 @@ sbase-box: $(SRC) libutil.a
echo 'else {' >> build/$_AT_.c
for f in $(SRC); do echo "printf(\"`basename $$f .c`\"); putchar(' ');" >> build/$_AT_.c; done
echo "putchar(0xa); }; return 0; }" >> build/$_AT_.c
- $(LD) -o $_AT_ build/*.c libutil.a $(CFLAGS) $(LDFLAGS)
+ $(LD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $_AT_ build/*.c libutil.a
rm -r build
clean:
diff --git a/config.mk b/config.mk
index 71f4195..a915eb3 100644
--- a/config.mk
+++ b/config.mk
_AT_@ -9,5 +9,5 @@ MANPREFIX = $(PREFIX)/share/man
#CC = musl-gcc
LD = $(CC)
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE
-CFLAGS = -std=c99 -Wall -pedantic $(CPPFLAGS)
+CFLAGS = -std=c99 -Wall -pedantic
LDFLAGS = -s
Received on Mon Nov 17 2014 - 11:38:40 CET
This archive was generated by hypermail 2.3.0
: Mon Nov 17 2014 - 11:48:14 CET