diff options
author | Rasmus Luha <rasmus.luha@gmail.com> | 2022-09-21 14:16:01 +0300 |
---|---|---|
committer | Rasmus Luha <rasmus.luha@gmail.com> | 2022-09-21 14:16:01 +0300 |
commit | c34cd59be89fb26e63fe959b98afabb4f24ba5bd (patch) | |
tree | 60531983cb0bfef27ab91cb3be41ebd40b324c9f /Makefile |
init commit
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 + |