diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
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 + |