Prototype de shell & continuation d’un TP de Licence 3.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
441 B

CC=gcc
CFLAGS=-Wall -g -Isrc/boitoutil
LIB=src/boitoutil
src:=$(wildcard $(LIB)/*.c)
obj:=$(patsubst $(LIB)/%.c,obj/%.o,$(src))
all: directories rishtik clean
rishtik: $(obj) obj/shell.o
$(CC) -o $@ $^
obj/shell.o: src/shellOpt.c
$(CC) $(CFLAGS) $^ -o $@ -c
$(obj): obj/%.o: $(LIB)/%.c
$(CC) $(CFLAGS) $^ -o $@ -c
.PHONY: all directories clean
directories:
if ! [ -d "obj" ]; then \
mkdir -p obj/lib; \
fi
clean:
rm -rf obj