From c34cd59be89fb26e63fe959b98afabb4f24ba5bd Mon Sep 17 00:00:00 2001 From: Rasmus Luha Date: Wed, 21 Sep 2022 14:16:01 +0300 Subject: init commit --- Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..67ded2b --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +CFLAGS := -Iinc -g -Og -Wall + +# Lähtekood +SRC := $(wildcard src/*.c) +OBJ := $(patsubst src/%.c, obj/%.o, $(SRC)) + +all: lib/interpret + +lib/interpret: $(OBJ) | lib + gcc $(CFLAGS) $(OBJ) -o lib/interpret + +obj/%.o: src/%.c | obj + gcc -c $(CFLAGS) -o $@ $< + +# Dirs +lib: + mkdir lib + +obj: + mkdir obj + +.PHONY: clean +clean: + rm -r obj lib + -- cgit v1.2.3