aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore11
-rw-r--r--Makefile16
-rwxr-xr-xconfigure4
-rw-r--r--src/a_common.h (renamed from common.h)0
-rw-r--r--src/a_main.c (renamed from main.c)0
-rw-r--r--src/a_targ.c (renamed from targ.c)0
-rw-r--r--src/c.c (renamed from c/c.c)0
-rw-r--r--src/c.h (renamed from c/c.h)0
-rw-r--r--src/c_builtin.c (renamed from c/builtin.c)0
-rw-r--r--src/c_embedfilesdir.c (renamed from embedfilesdir.c)0
-rw-r--r--src/c_eval.c (renamed from c/eval.c)0
-rw-r--r--src/c_keywords.def (renamed from c/keywords.def)0
-rw-r--r--src/c_lex.c (renamed from c/lex.c)0
-rw-r--r--src/c_lex.h (renamed from c/lex.h)0
-rw-r--r--src/c_type.c (renamed from type.c)0
-rw-r--r--src/c_type.h (renamed from type.h)0
-rw-r--r--src/io.c (renamed from io.c)0
-rw-r--r--src/ir.c (renamed from ir/ir.c)0
-rw-r--r--src/ir.h (renamed from ir/ir.h)0
-rw-r--r--src/ir_abi0.c (renamed from ir/abi0.c)0
-rw-r--r--src/ir_builder.c (renamed from ir/builder.c)0
-rw-r--r--src/ir_cfg.c (renamed from ir/cfg.c)0
-rw-r--r--src/ir_cse.c (renamed from ir/cse.c)0
-rw-r--r--src/ir_dump.c (renamed from ir/dump.c)0
-rw-r--r--src/ir_fold.c (renamed from ir/fold.c)0
-rw-r--r--src/ir_inliner.c (renamed from ir/inliner.c)0
-rw-r--r--src/ir_intrin.c (renamed from ir/intrin.c)0
-rw-r--r--src/ir_intrin.def (renamed from ir/intrin.def)0
-rw-r--r--src/ir_mem2reg.c (renamed from ir/mem2reg.c)0
-rw-r--r--src/ir_op.def (renamed from ir/op.def)0
-rw-r--r--src/ir_regalloc.c (renamed from ir/regalloc.c)0
-rw-r--r--src/ir_simpl.c (renamed from ir/simpl.c)0
-rw-r--r--src/ir_ssa.c (renamed from ir/ssa.c)0
-rw-r--r--src/ir_stack.c (renamed from ir/stack.c)0
-rw-r--r--src/o_elf.c (renamed from obj/elf.c)0
-rw-r--r--src/o_elf.h (renamed from obj/elf.h)0
-rw-r--r--src/obj.c (renamed from obj/obj.c)0
-rw-r--r--src/obj.h (renamed from obj/obj.h)0
-rw-r--r--src/t_aarch64.h (renamed from aarch64/all.h)0
-rw-r--r--src/t_aarch64_aapcs.c (renamed from aarch64/aapcs.c)0
-rw-r--r--src/t_aarch64_emit.c (renamed from aarch64/emit.c)0
-rw-r--r--src/t_aarch64_isel.c (renamed from aarch64/isel.c)0
-rw-r--r--src/t_x86-64.h (renamed from x86_64/all.h)0
-rw-r--r--src/t_x86-64_emit.c (renamed from x86_64/emit.c)0
-rw-r--r--src/t_x86-64_isel.c (renamed from x86_64/isel.c)0
-rw-r--r--src/t_x86-64_sysv.c (renamed from x86_64/sysv.c)0
-rw-r--r--src/u_endian.h (renamed from endian.h)0
-rw-r--r--src/u_mem.c (renamed from mem.c)0
-rw-r--r--src/version.h (renamed from version.h)0
49 files changed, 10 insertions, 21 deletions
diff --git a/.gitignore b/.gitignore
index 3a4757d..22ef4d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,14 +16,9 @@
!Makefile
!bootstrap.sh
-!/*.h
-hostconfig.h
-!/*.c
-!/c/
-!/ir/
-!/x86_64/
-!/aarch64/
-!/obj/
+src/hostconfig.h
+!/src/
+!/src/*
!/tool/
!/test/
diff --git a/Makefile b/Makefile
index 2a1f1b7..69317af 100644
--- a/Makefile
+++ b/Makefile
@@ -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)"
diff --git a/configure b/configure
index f48555b..1f72ecd 100755
--- a/configure
+++ b/configure
@@ -116,11 +116,11 @@ echo "/** GENERATED WITH $0 $@ **/
#define HOST_INCLUDE_DIRS $host_include_dirs
#define HOST_CC \"$CC\"
-#endif // HOSTCONFIG_H_" > hostconfig.h
+#endif // HOSTCONFIG_H_" > src/hostconfig.h
echo "# GENERATED WITH $0 $@
PREFIX = $prefix
CC = $CC
CFLAGS = ${CFLAGS:--Wall -std=c11 -pedantic}" > config.mk
-echo config written to hostconfig.h, config.mk
+echo config written to src/hostconfig.h, config.mk
diff --git a/common.h b/src/a_common.h
index a24aa3d..a24aa3d 100644
--- a/common.h
+++ b/src/a_common.h
diff --git a/main.c b/src/a_main.c
index 9710814..9710814 100644
--- a/main.c
+++ b/src/a_main.c
diff --git a/targ.c b/src/a_targ.c
index fdc11f8..fdc11f8 100644
--- a/targ.c
+++ b/src/a_targ.c
diff --git a/c/c.c b/src/c.c
index 63c3f7f..63c3f7f 100644
--- a/c/c.c
+++ b/src/c.c
diff --git a/c/c.h b/src/c.h
index 0214db5..0214db5 100644
--- a/c/c.h
+++ b/src/c.h
diff --git a/c/builtin.c b/src/c_builtin.c
index 5c59857..5c59857 100644
--- a/c/builtin.c
+++ b/src/c_builtin.c
diff --git a/embedfilesdir.c b/src/c_embedfilesdir.c
index d1c8dd4..d1c8dd4 100644
--- a/embedfilesdir.c
+++ b/src/c_embedfilesdir.c
diff --git a/c/eval.c b/src/c_eval.c
index 3dfbbfb..3dfbbfb 100644
--- a/c/eval.c
+++ b/src/c_eval.c
diff --git a/c/keywords.def b/src/c_keywords.def
index e71f25f..e71f25f 100644
--- a/c/keywords.def
+++ b/src/c_keywords.def
diff --git a/c/lex.c b/src/c_lex.c
index c196a21..c196a21 100644
--- a/c/lex.c
+++ b/src/c_lex.c
diff --git a/c/lex.h b/src/c_lex.h
index e70bc78..e70bc78 100644
--- a/c/lex.h
+++ b/src/c_lex.h
diff --git a/type.c b/src/c_type.c
index e8a5b1e..e8a5b1e 100644
--- a/type.c
+++ b/src/c_type.c
diff --git a/type.h b/src/c_type.h
index ad8e1b1..ad8e1b1 100644
--- a/type.h
+++ b/src/c_type.h
diff --git a/io.c b/src/io.c
index d33afb1..d33afb1 100644
--- a/io.c
+++ b/src/io.c
diff --git a/ir/ir.c b/src/ir.c
index b612143..b612143 100644
--- a/ir/ir.c
+++ b/src/ir.c
diff --git a/ir/ir.h b/src/ir.h
index ab3e474..ab3e474 100644
--- a/ir/ir.h
+++ b/src/ir.h
diff --git a/ir/abi0.c b/src/ir_abi0.c
index a3687d9..a3687d9 100644
--- a/ir/abi0.c
+++ b/src/ir_abi0.c
diff --git a/ir/builder.c b/src/ir_builder.c
index 206e66d..206e66d 100644
--- a/ir/builder.c
+++ b/src/ir_builder.c
diff --git a/ir/cfg.c b/src/ir_cfg.c
index 86af3f3..86af3f3 100644
--- a/ir/cfg.c
+++ b/src/ir_cfg.c
diff --git a/ir/cse.c b/src/ir_cse.c
index 23c5cf9..23c5cf9 100644
--- a/ir/cse.c
+++ b/src/ir_cse.c
diff --git a/ir/dump.c b/src/ir_dump.c
index b0ce603..b0ce603 100644
--- a/ir/dump.c
+++ b/src/ir_dump.c
diff --git a/ir/fold.c b/src/ir_fold.c
index 4c9861e..4c9861e 100644
--- a/ir/fold.c
+++ b/src/ir_fold.c
diff --git a/ir/inliner.c b/src/ir_inliner.c
index b99d3dc..b99d3dc 100644
--- a/ir/inliner.c
+++ b/src/ir_inliner.c
diff --git a/ir/intrin.c b/src/ir_intrin.c
index ca49341..ca49341 100644
--- a/ir/intrin.c
+++ b/src/ir_intrin.c
diff --git a/ir/intrin.def b/src/ir_intrin.def
index 2ccc3b5..2ccc3b5 100644
--- a/ir/intrin.def
+++ b/src/ir_intrin.def
diff --git a/ir/mem2reg.c b/src/ir_mem2reg.c
index 7a5874c..7a5874c 100644
--- a/ir/mem2reg.c
+++ b/src/ir_mem2reg.c
diff --git a/ir/op.def b/src/ir_op.def
index 4a18b4b..4a18b4b 100644
--- a/ir/op.def
+++ b/src/ir_op.def
diff --git a/ir/regalloc.c b/src/ir_regalloc.c
index 1200c77..1200c77 100644
--- a/ir/regalloc.c
+++ b/src/ir_regalloc.c
diff --git a/ir/simpl.c b/src/ir_simpl.c
index a01879a..a01879a 100644
--- a/ir/simpl.c
+++ b/src/ir_simpl.c
diff --git a/ir/ssa.c b/src/ir_ssa.c
index 6598fba..6598fba 100644
--- a/ir/ssa.c
+++ b/src/ir_ssa.c
diff --git a/ir/stack.c b/src/ir_stack.c
index 40a7b1d..40a7b1d 100644
--- a/ir/stack.c
+++ b/src/ir_stack.c
diff --git a/obj/elf.c b/src/o_elf.c
index 5044e56..5044e56 100644
--- a/obj/elf.c
+++ b/src/o_elf.c
diff --git a/obj/elf.h b/src/o_elf.h
index c96ae8b..c96ae8b 100644
--- a/obj/elf.h
+++ b/src/o_elf.h
diff --git a/obj/obj.c b/src/obj.c
index 12f0db7..12f0db7 100644
--- a/obj/obj.c
+++ b/src/obj.c
diff --git a/obj/obj.h b/src/obj.h
index 1982033..1982033 100644
--- a/obj/obj.h
+++ b/src/obj.h
diff --git a/aarch64/all.h b/src/t_aarch64.h
index 828909e..828909e 100644
--- a/aarch64/all.h
+++ b/src/t_aarch64.h
diff --git a/aarch64/aapcs.c b/src/t_aarch64_aapcs.c
index fc08da1..fc08da1 100644
--- a/aarch64/aapcs.c
+++ b/src/t_aarch64_aapcs.c
diff --git a/aarch64/emit.c b/src/t_aarch64_emit.c
index 9fdcd83..9fdcd83 100644
--- a/aarch64/emit.c
+++ b/src/t_aarch64_emit.c
diff --git a/aarch64/isel.c b/src/t_aarch64_isel.c
index 398ea28..398ea28 100644
--- a/aarch64/isel.c
+++ b/src/t_aarch64_isel.c
diff --git a/x86_64/all.h b/src/t_x86-64.h
index c0c38ff..c0c38ff 100644
--- a/x86_64/all.h
+++ b/src/t_x86-64.h
diff --git a/x86_64/emit.c b/src/t_x86-64_emit.c
index d3a466b..d3a466b 100644
--- a/x86_64/emit.c
+++ b/src/t_x86-64_emit.c
diff --git a/x86_64/isel.c b/src/t_x86-64_isel.c
index 4b4a099..4b4a099 100644
--- a/x86_64/isel.c
+++ b/src/t_x86-64_isel.c
diff --git a/x86_64/sysv.c b/src/t_x86-64_sysv.c
index 317f40f..317f40f 100644
--- a/x86_64/sysv.c
+++ b/src/t_x86-64_sysv.c
diff --git a/endian.h b/src/u_endian.h
index 34b7721..34b7721 100644
--- a/endian.h
+++ b/src/u_endian.h
diff --git a/mem.c b/src/u_mem.c
index 9ee8864..9ee8864 100644
--- a/mem.c
+++ b/src/u_mem.c
diff --git a/version.h b/src/version.h
index 3abd4a1..3abd4a1 100644
--- a/version.h
+++ b/src/version.h