commit 064ba4447586f9ee727f1de157d04d46f752e6f0
parent de1e566e2919c1e4683a3e97c736d71c4ea166ea
Author: Yersa Nordman <yersa@finwo.nl>
Date: Tue, 24 Oct 2023 20:53:06 +0200
Use regular CC for linking as well
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,7 +1,7 @@
BIN:=http-server
-CPP=g++
-CC=gcc
+CPP?=g++
+CC?=gcc
LIBS:=
SRC:=
@@ -21,6 +21,9 @@ OBJ:=$(OBJ:.cc=.o)
override CFLAGS+=$(INCLUDES)
+LDFLAGS?=-s
+LDFLAGS+=$(CFLAGS)
+
default: $(BIN)
.PHONY: clean
@@ -28,4 +31,4 @@ clean:
rm -rf $(OBJ)
$(BIN): $(OBJ)
- $(CPP) $(LDFLAGS) $(OBJ) -o $@
+ $(CC) $(LDFLAGS) $(OBJ) -o $@