rishtik/Makefile

24 lines
361 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
all: directories rishtik clean
rishtik: obj/lib.o obj/shell.o
2021-02-16 16:12:37 +01:00
$(CC) -o $@ $^
obj/shell.o: src/shellOpt.c
2021-02-16 16:12:37 +01:00
$(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: all directories clean
2021-02-16 16:12:37 +01:00
directories:
if ! [ -d "obj" ]; then \
mkdir obj; \
fi
clean:
rm -rf obj