diff options
| author | LLLL Colonq <llll@colonq> | 2026-10-21 02:43:23 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-10-21 02:43:23 -0400 |
| commit | 62ab8e0b42a57bd794941f030b4c3140d6f7c744 (patch) | |
| tree | d4d26aca670f67a290399e83ca5e7253a5b9c395 /pit/Makefile | |
| parent | fe4c9bd487cb9ae59d86dc7680855c5797ae04e3 (diff) | |
Bake Lisp into builds, fix bug in error propagation
Diffstat (limited to 'pit/Makefile')
| -rw-r--r-- | pit/Makefile | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/pit/Makefile b/pit/Makefile index 6667b91..2eeb084 100644 --- a/pit/Makefile +++ b/pit/Makefile @@ -2,12 +2,15 @@ EXE ?= pit CC ?= gcc AR ?= ar -override CPPFLAGS += -MMD -MP -override CFLAGS += -O2 -fPIC --std=c99 -g -Ideps/ -Isrc/ -Iinclude/ -Wall -Wextra -Wpedantic -Wconversion -Wformat-security -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wnull-dereference -Wfloat-equal -Wundef -Wpointer-arith -Wbad-function-cast -Wlogical-op -Wmissing-braces -Wcast-align -Wstrict-overflow=5 -fwrapv # -ftrapv -override LDFLAGS += -g -static BUILD = build_$(CC) +override CPPFLAGS += -MMD -MP +override CFLAGS += -O2 -fPIC --std=c99 -g -I$(BUILD) -Ideps/ -Isrc/ -Iinclude/ -Wall -Wextra -Wpedantic -Wconversion -Wformat-security -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wnull-dereference -Wfloat-equal -Wundef -Wpointer-arith -Wbad-function-cast -Wlogical-op -Wmissing-braces -Wcast-align -Wstrict-overflow=5 -fanalyzer -fwrapv # -ftrapv +override LDFLAGS += -g -static +# override CFLAGS += -O2 -fanalyzer -fsanitize=undefined -fPIC --std=c99 -g -Ideps/ -Isrc/ -Iinclude/ -Wall -Wextra -Wpedantic -Wconversion -Wformat-security -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wnull-dereference -Wfloat-equal -Wundef -Wpointer-arith -Wbad-function-cast -Wlogical-op -Wmissing-braces -Wcast-align -Wstrict-overflow=5 -fwrapv # -ftrapv +# override LDFLAGS += -fsanitize=undefined -g + SRCS_CORE := \ src/utils.c src/arena.c src/lexer.c src/parser.c src/runtime.c \ src/runtime/value.c \ @@ -16,6 +19,9 @@ SRCS_CORE := \ src/library.c OBJECTS_CORE := $(SRCS_CORE:src/%.c=$(BUILD)/%.o) LIB_CORE := libcolonq-pit.a +SRCS_LISP := \ + lisp/essential.pit +HEADERS_LISP := $(SRCS_LISP:lisp/%.pit=$(BUILD)/lisp/%.h) SRCS_NATIVE := src/native.c OBJECTS_NATIVE := $(SRCS_NATIVE:src/%.c=$(BUILD)/%.o) LIB_NATIVE := libcolonq-pit-native.a @@ -48,10 +54,14 @@ $(BUILD): mkdir $(BUILD)/ mkdir $(BUILD)/runtime/ mkdir $(BUILD)/runtime/value/ + mkdir $(BUILD)/lisp/ -$(BUILD)/%.o: src/%.c | $(BUILD) +$(BUILD)/%.o: src/%.c $(HEADERS_LISP) | $(BUILD) $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $< +$(BUILD)/lisp/%.h: lisp/%.pit | $(BUILD) + xxd -i $< $@ + clean: -rm $(EXE) -rm $(LIB_CORE) |
