diff options
author | Samuel Lidén Borell <samuel@kodafritt.se> | 2025-07-30 22:40:56 +0200 |
---|---|---|
committer | Samuel Lidén Borell <samuel@kodafritt.se> | 2025-07-30 22:40:56 +0200 |
commit | a5a933fd8c331c2f3dbaca02661a8ce7d159be4b (patch) | |
tree | 86db699172c9e9ba1ed886c572e2f7f9748d5ce0 | |
parent | cde66c28d946bca26bbf6bcac3a70e39386c348b (diff) | |
download | slul-try2-main.tar.gz slul-try2-main.tar.bz2 slul-try2-main.zip |
Some command line tools require any option arguments to come before
non-option arguments (like source filenames). I'm not aware of any
compiler that requires this, but better follow the convention.
That is also the order of arguments that is used in GNU Make's default
suffix rules.
-rw-r--r-- | bootstrap/Makefile | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bootstrap/Makefile b/bootstrap/Makefile index f39c8c1..cc55fc8 100644 --- a/bootstrap/Makefile +++ b/bootstrap/Makefile @@ -108,20 +108,20 @@ ast.o funccall.o out.o parsedecl.o parseexpr.o parsestmt.o \ .SUFFIXES: .c .o .c.o: - $(HOST_CC) $(HOST_CFLAGS) $(BASELINE_CFLAGS) -c $< -o $@ + $(HOST_CC) $(HOST_CFLAGS) $(BASELINE_CFLAGS) -c -o $@ $< $(builddir)/stage1: $(OBJECTS) - $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) $(OBJECTS) -o $@ + $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ $(OBJECTS) $(builddir)/stage1-boundschecked: $(C_SOURCES) $(C_HEADERS) - tcc -b -bt24 $(C_SOURCES) -o $@ + tcc -b -bt24 -o $@ $(C_SOURCES) $(builddir)/stage2_gen.c: $(builddir)/stage1 $(COMPILER_SOURCES) $(builddir)/stage1 $(STAGE1_ARGS) $(builddir)/stage2: $(STAGE2_C_SOURCES) $(CC) $(CFLAGS) $(BASELINE_CFLAGS) $(STAGE2_DISABLED_WARNINGS) \ $(STAGE2_CFLAGS) $(LDFLAGS) \ $(STAGE2_INCLUDE) \ - $(STAGE2_C_SOURCES) \ - -o $@ + -o $@ \ + $(STAGE2_C_SOURCES) .PHONY: all check check-all check-boundschecked check-valgrind \ check-pmccabe clang-analyze clean gcc-analyzer gdb-stage1 \ |