diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f56e586 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +CFLAGS=-O3 -Iinc/ + +build: main + +out/: + mkdir out/ + +main: out/main.o out/swapper.o + gcc $(CFLAGS) out/main.o out/swapper.o -o main + +out/main.o: out/ src/main.c + gcc $(CFLAGS) -c src/main.c -o out/main.o + +out/swapper.o: out/ src/swapper.c + gcc $(CFLAGS) -c src/swapper.c -o out/swapper.o + +clean: + rm -r main out/ + +.PHONY: build clean