CFLAGS=-g -Wall EXO=exo1 exo2 exo3 exo4 DIST=../csc4103-cf1-rendu.tar.xz .PHONY: all clean dist all: $(EXO) exo%: exo%.c pokemon.h gcc $(CFLAGS) -o "$@" "$<" clean: rm -f $(EXO) $(patsubst %,%.o,$(EXO)) dist: $(DIST) $(DIST): clean case "$$(uname -s)" in \ Darwin) tar -f "$@" -s '|^|$(basename $(basename $(notdir $@)))/|' -cJ .;; \ Linux) tar -f "$@" --transform 's|^|$(basename $(basename $(notdir $@)))/|' -cJ .;; \ *) echo "Sorry, unsopported OS, generate your distribution manually";; \ esac