qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit dd121014da4cc364d1b58de145991425ab8a612a
parent 0d68986b6f6aa046ab13776f39cc37b67b3477ba
Author: Quentin Rameau <quinq@fifth.space>
Date:   Wed,  3 Nov 2021 11:48:52 +0100

Makefile: Fix user-provided build flags

Diffstat:
MMakefile | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -13,15 +13,16 @@ AMD64OBJ = $(AMD64SRC:%.c=$(OBJDIR)/%.o) ARM64OBJ = $(ARM64SRC:%.c=$(OBJDIR)/%.o) OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(AMD64OBJ) $(ARM64OBJ) -CFLAGS += -Wall -Wextra -std=c99 -g -pedantic +_CFLAGS = -Wall -Wextra -std=c99 -g -pedantic $(CFLAGS) +_LDFLAGS = $(LDFLAGS) $(OBJDIR)/$(BIN): $(OBJ) $(OBJDIR)/timestamp @test -z "$(V)" || echo "ld $@" - $(V)$(CC) $(LDFLAGS) $(OBJ) -o $@ + $(V)$(CC) $(_LDFLAGS) $(OBJ) -o $@ $(OBJDIR)/%.o: %.c $(OBJDIR)/timestamp @test -z "$(V)" || echo "cc $<" - $(V)$(CC) $(CFLAGS) -c $< -o $@ + $(V)$(CC) $(_CFLAGS) -c $< -o $@ $(OBJDIR)/timestamp: @mkdir -p $(OBJDIR)