Do not append CPPFLAGS to CFLAGS
This commit is contained in:
parent
2fd6e769dd
commit
e1c044e298
6
Makefile
6
Makefile
@ -134,10 +134,10 @@ bin: $(BIN)
|
|||||||
$(OBJ): $(HDR) config.mk
|
$(OBJ): $(HDR) config.mk
|
||||||
|
|
||||||
.o:
|
.o:
|
||||||
$(LD) -o $@ $< libutil.a $(LDFLAGS)
|
$(LD) $(LDFLAGS) -o $@ $< libutil.a
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) $(CFLAGS) -o $@ -c $<
|
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
libutil.a: $(LIB)
|
libutil.a: $(LIB)
|
||||||
$(AR) -r -c $@ $?
|
$(AR) -r -c $@ $?
|
||||||
@ -177,7 +177,7 @@ sbase-box: $(SRC) libutil.a
|
|||||||
echo 'else {' >> build/$@.c
|
echo 'else {' >> build/$@.c
|
||||||
for f in $(SRC); do echo "printf(\"`basename $$f .c`\"); putchar(' ');" >> build/$@.c; done
|
for f in $(SRC); do echo "printf(\"`basename $$f .c`\"); putchar(' ');" >> build/$@.c; done
|
||||||
echo "putchar(0xa); }; return 0; }" >> build/$@.c
|
echo "putchar(0xa); }; return 0; }" >> build/$@.c
|
||||||
$(LD) -o $@ build/*.c libutil.a $(CFLAGS) $(LDFLAGS)
|
$(LD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ build/*.c libutil.a
|
||||||
rm -r build
|
rm -r build
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -9,5 +9,5 @@ MANPREFIX = $(PREFIX)/share/man
|
|||||||
#CC = musl-gcc
|
#CC = musl-gcc
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE
|
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE
|
||||||
CFLAGS = -std=c99 -Wall -pedantic $(CPPFLAGS)
|
CFLAGS = -std=c99 -Wall -pedantic
|
||||||
LDFLAGS = -s
|
LDFLAGS = -s
|
||||||
|
Loading…
Reference in New Issue
Block a user