aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarvin Borner2023-01-28 22:29:48 +0100
committerMarvin Borner2023-01-28 22:29:48 +0100
commitde450bfb4354f716fb43fae69d90ed513068d10b (patch)
treeb474219ae3baaeb8a075e6fbb5c57c3857faa588 /Makefile
parent75bb42663294b388377178b7257c6f8c0f787032 (diff)
Rewrite, bootstrap
Rewriting without KVM, huge goals, won't finish, just for fun.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 0 insertions, 28 deletions
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 391e641..0000000
--- a/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-SOURCEDIR = $(PWD)/src
-INCDIR = $(PWD)/inc
-BUILDDIR = $(PWD)/build
-SOURCES = $(wildcard $(SOURCEDIR)/*.c)
-OBJS = $(patsubst $(SOURCEDIR)/%.c, $(BUILDDIR)/%.o, $(SOURCES))
-
-CC = gcc
-WARNINGS = -Wall -Wextra -Wshadow -Wpointer-arith -Wwrite-strings -Wredundant-decls -Wnested-externs -Wformat=2 -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wswitch-default -Wswitch-enum -Wlogical-op -Wunreachable-code -Wundef -Wold-style-definition -Wvla -pedantic
-DEBUG = -fsanitize=undefined -fsanitize=address -fstack-protector-strong -ggdb3 -g3 -g -s -Og
-CFLAGS = -Ofast $(WARNINGS) -I$(INCDIR) $(DEBUG)
-
-all: $(OBJS)
- @$(CC) -o $(BUILDDIR)/out $(CFLAGS) $^
-
-clean:
- @$(RM) -rf $(BUILDDIR)
-
-run: clean all sync
- @nasm test.asm -o $(BUILDDIR)/test
- @$(BUILDDIR)/out
-
-sync:
- @make --always-make --dry-run | grep -wE 'gcc|g\+\+' | grep -w '\-c' | jq -nR '[inputs|{directory:".", command:., file: match(" [^ ]+$$").string[1:]}]' >compile_commands.json
- @ctags -R --exclude=.git --exclude=build .
-
-$(BUILDDIR)/%.o: $(SOURCEDIR)/%.c
- @mkdir -p $(BUILDDIR)
- @$(CC) -c -o $@ $(CFLAGS) $<