summaryrefslogtreecommitdiff
path: root/userland/snake/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'userland/snake/Makefile')
-rw-r--r--userland/snake/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/userland/snake/Makefile b/userland/snake/Makefile
new file mode 100644
index 0000000..f29df30
--- /dev/null
+++ b/userland/snake/Makefile
@@ -0,0 +1,15 @@
+CC="/home/anton/prj/osdev/sysroot/bin/i686-sb-gcc"
+CFLAGS = -ggdb -ffreestanding -O0 -Wall -Wextra -pedantic -mgeneral-regs-only -Wimplicit-fallthrough -static -fsanitize=shift,signed-integer-overflow,bounds
+LIB=-L../libgui -lgui -L../json -ljson -L../libc -lc -lgcc
+INC=-I../libc/ -I../json/ -I../libgui/
+BINS=snake
+all: $(BINS)
+
+snake.o: snake.c
+ $(CC) $(CFLAGS) $(INC) $(LIB) -o $@ -c $<
+
+snake: snake.o
+ $(CC) -nostdlib $(CFLAGS) -o $@ $^ $(LIB)
+
+clean:
+ rm $(BINS) *.o