From 7dbec8d29413d62967ed7eb5854dd56b1a2814ab Mon Sep 17 00:00:00 2001 From: c Date: Sat, 3 Feb 2024 17:34:25 -0500 Subject: Parser now parses blocks and simple calls. --- Makefile | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 391d5d0..6c8bc12 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,8 @@ CC := gcc REG_CFLAGS := -std=c99 -O3 -s DBG_CFLAGS := -std=c99 -Og -ggdb -pedantic DBG_CFLAGS += -Wall -Wextra -Wformat -Wpedantic -DBG_CFLAGS += -fsanitize=leak,address,undefined -fno-omit-frame-pointer -CFLAGS := $(REG_CFLAGS) +DBG_CFLAGS += -fsanitize=address -fno-omit-frame-pointer +CFLAGS := none SRCS := $(wildcard src/*.c) SRCS := $(filter-out %doer.c,$(SRCS)) # Filter out incomplete doer for now. OBJS := $(SRCS:.c=.o) @@ -16,25 +16,21 @@ TEST_OUTS := $(TEST_SRCS:.c=.out) all: halk -reg_options: +options: @echo "HALK build options:" @echo "CC: $(CC)" - @echo "CFLAGS: $(REG_CFLAGS)" + @echo "CFLAGS: $(CFLAGS)" @echo -dbg_options: - @echo "HALK build options (dbg):" - @echo "CC: $(CC)" - @echo "CFLAGS: $(DBG_CFLAGS)" - @echo - -halk: reg_options $(OBJS) +halk: CFLAGS := $(REG_CFLAGS) +halk: options $(OBJS) $(CC) $(OBJS) $(REG_CFLAGS) -o $(BIN).out dbg: CFLAGS := $(DBG_CFLAGS) -dbg: clean dbg_options $(OBJS) +dbg: clean options $(OBJS) $(CC) $(OBJS) $(DBG_CFLAGS) -o $(BIN).out +test: CFLAGS := $(REG_CFLAGS) test: $(TEST_OUTS) set -e for f in $(TEST_OUTS); do ./$$f; done @@ -43,7 +39,7 @@ test: $(TEST_OUTS) $(CC) -c $< -o $@ $(CFLAGS) %.out: %.c - $(CC) $< $(filter-out %main.o,$(OBJS)) -o $@ $(CFLAGS) + $(CC) $< $(filter-out %main.o,$(OBJS)) -o $@ $(DBG_CFLAGS) install: all mkdir -p $(PREFIX) -- cgit v1.2.3