commit ffae59c912748ad946842408405042d9a03adf16
parent 20078decbd5f2a5b325c8a460e99e9533aa8005f
Author: sin <sin@2f30.org>
Date: Tue, 18 Nov 2014 16:06:12 +0000
Pass down CFLAGS and LDFLAGS
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -4,7 +4,7 @@ all:
@echo "CFLAGS = $(CFLAGS)"
@echo "LDFLAGS = $(LDFLAGS)"
@echo "CC = $(CC)"
- for i in $(TARG); do cd $$i && $(MAKE) || exit; cd ..; done
+ for i in $(TARG); do cd $$i && $(MAKE) CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) || exit; cd ..; done
install:
for i in $(TARG); do cd $$i && $(MAKE) install || exit; cd ..; done
diff --git a/awk/Makefile b/awk/Makefile
@@ -1,6 +1,6 @@
OBJ = arc4random.o b.o lex.o lib.o main.o parse.o proctab.o reallocarray.o run.o strlcat.o strlcpy.o tran.o ytab.o
BIN = awk
-LDFLAGS = -lm
+LDLIBS = -lm
all: ytab.c proctab.c $(BIN)
@@ -16,7 +16,7 @@ maketab: ytab.h maketab.c
$(CC) $(CFLAGS) maketab.c -o $@
$(BIN): $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LDFLAGS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS)
clean:
rm -f $(BIN) $(OBJ) maketab proctab.c ytab.[ch]