rishtik/Makefile

22 lines
304 B
Makefile
Raw Normal View History

2021-02-16 16:12:37 +01:00
CC=gcc
CFLAGS=-Wall -g -Isrc/parser
2021-02-16 16:12:37 +01:00
%: obj/lib.o obj/%.o
$(CC) -o $@ $^
obj/%.o: src/%.c
$(CC) $(CFLAGS) $^ -o $@ -c
obj/lib.o: src/parser/parser.c directories
2021-02-16 16:12:37 +01:00
$(CC) $(CFLAGS) $< -o $@ -c
.PHONY: directories clean
directories:
if ! [ -d "obj" ]; then \
mkdir obj; \
fi
clean:
rm -rf obj