Skip to content

Distribute and run LLMs with a single file.

Make it easier to override CPPFLAGS

Justine Tunney9579b73c3e05
diff --git a/build/config.mk b/build/config.mk
index c59fffb6..40981a21 100644
--- a/build/config.mk
+++ b/build/config.mk
@@ -14,8 +14,8 @@ INSTALL = install
ARFLAGS = rcsD
CCFLAGS = -g -O3
+CPPFLAGS_ = -iquote. -mcosmo
TARGET_ARCH = -Xx86_64-mssse3
-CPPFLAGS += -iquote. -mcosmo
TMPDIR = o//tmp
IGNORE := $(shell mkdir -p $(TMPDIR))
diff --git a/build/rules.mk b/build/rules.mk
index 50e57caf..4ddfc212 100644
--- a/build/rules.mk
+++ b/build/rules.mk
@@ -2,8 +2,8 @@
#── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
LINK.o = $(CXX) $(CCFLAGS) $(LDFLAGS)
-COMPILE.c = $(CC) $(CCFLAGS) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
-COMPILE.cc = $(CXX) $(CCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
+COMPILE.c = $(CC) $(CCFLAGS) $(CFLAGS) $(CPPFLAGS_) $(CPPFLAGS) $(TARGET_ARCH) -c
+COMPILE.cc = $(CXX) $(CCFLAGS) $(CXXFLAGS) $(CPPFLAGS_) $(CPPFLAGS) $(TARGET_ARCH) -c
o/$(MODE)/%.a:
$(AR) $(ARFLAGS) $@ $^