aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-07-26 16:02:49 +0200
committerAnton Khirnov <anton@khirnov.net>2020-07-26 16:02:49 +0200
commit6a59a9926996ce350472678c4fb62b2242a117fb (patch)
tree367bb0bc3f6ec3dd02acf1c18ebcff679cbf2162
parentf5feee8682d6aba8d558ec8afd806764c3b93cdd (diff)
Makefile: allow overriding cc
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1bc9f12..18ef85f 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,8 @@ LDFLAGS = -Wl,--version-script=libbrilldata.v -shared -lm -llapacke
TARGET = libbrilldata.so
+CC = cc
+
OBJS = basis.o \
cpu.o \
cpuid.o \
@@ -20,10 +22,10 @@ OBJS = basis.o \
all: $(TARGET)
$(TARGET): $(OBJS)
- cc ${LDFLAGS} -o $@ $(OBJS)
+ $(CC) ${LDFLAGS} -o $@ $(OBJS)
%.o: %.c
- cc $(CFLAGS) -MMD -MF $(@:.o=.d) -MT $@ -c -o $@ $<
+ $(CC) $(CFLAGS) -MMD -MF $(@:.o=.d) -MT $@ -c -o $@ $<
%.o: %.asm
nasm -f elf64 -M $< > $(@:.o=.d)