diff options
| author | 2026-03-17 13:22:00 +0100 | |
|---|---|---|
| committer | 2026-03-17 13:22:00 +0100 | |
| commit | a8d6f8bf30c07edb775e56889f568ca20240bedf (patch) | |
| tree | b5a452b2675b2400f15013617291fe6061180bbf /Makefile | |
| parent | 24f14b7ad1af08d872971d72ce089a529911f657 (diff) | |
REFACTOR: move sources to src/
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -1,13 +1,7 @@ OUT?=antcc BUILDDIR?=build -SRC=main.c io.c mem.c c/c.c c/lex.c c/eval.c c/builtin.c type.c targ.c \ - ir/ir.c ir/builder.c ir/fold.c ir/dump.c ir/ssa.c ir/cfg.c ir/intrin.c ir/abi0.c ir/mem2reg.c ir/regalloc.c ir/simpl.c ir/stack.c \ - ir/cse.c ir/inliner.c \ - x86_64/sysv.c x86_64/isel.c x86_64/emit.c \ - aarch64/aapcs.c aarch64/isel.c aarch64/emit.c \ - obj/obj.c obj/elf.c \ - embedfilesdir.c -OBJ=$(patsubst %.c,build/%.o,$(SRC)) +SRC=$(wildcard src/*.c) +OBJ=$(patsubst src/%.c,build/%.o,$(SRC)) DEP=$(OBJ:.o=.d) CFLAGS=-Wall -std=c11 -pedantic @@ -40,10 +34,10 @@ tool/depgen: tool/depgen.c $(OUT): tool/depgen $(OBJ) $(CC) $(CFLAGS) -o $@ $(OBJ) -hostconfig.h: +src/hostconfig.h: ./configure -$(BUILDDIR)/%.o: %.c hostconfig.h +$(BUILDDIR)/%.o: src/%.c src/hostconfig.h $Vmkdir -p `dirname $@` $Vtool/depgen -MP -MF $(BUILDDIR)/$*.d -MT $@ $< $(CC) $(CFLAGS) -c -o $@ $< @@ -55,7 +49,7 @@ clean-tool: $(RM) -r tool/depgen clean-config: clean - $(RM) -r config.mk hostconfig.h + $(RM) -r config.mk src/hostconfig.h install: all @mkdir -p "$(DESTDIR)$(BINDIR)" |