#location of test mains OFFSHORE_MAINS := . # location of project directories OFFSHORE_PROJECTS := .. empty:= space:= $(empty) $(empty) CFLAGS_MANDATORY := -Wall -Wextra -Werror all: $(foreach e, 00 01 02 03 04 05 06 07 08, build/c00/ex$e) build: mkdir $@ norme: norminette -R CheckForbiddenSourceHeader ../c$(subst _,$(space),) clean: rm -rf build .SECONDEXPANSION: build/c%: $(OFFSHORE_PROJECTS)/c$$(subst _,+,$$*)/*.c $$(OFFSHORE_MAINS)/c$$*.c mkdir -p $(@D) $(CC) -o $@ $(CFLAGS_MANDATORY) $(CFLAGS) $^ .PHONY: all norme clean