rishtik/Makefile

25 lines
370 B
Makefile
Raw Normal View History

2021-02-16 16:12:37 +01:00
CC=gcc
2021-02-17 15:05:38 +01:00
CFLAGS=-Wall -g -Isrc/shell_tools
LIB=src/shell_tools
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
2021-02-17 15:05:38 +01:00
obj/lib.o: $(LIB)/parser.c
$(CC) $(CFLAGS) $^ -o $@ -c
2021-02-16 16:12:37 +01:00
.PHONY: all directories clean
2021-02-16 16:12:37 +01:00
directories:
if ! [ -d "obj" ]; then \
mkdir obj; \
fi
clean:
rm -rf obj