rosettacode-c/Makefile
@@@No user configured@@@ bb3bf1fe53 Initial import.
2016-05-15 22:56:38 +02:00

20 lines
367 B
Makefile

SRC = $(wildcard src/*.c)
DEPS = $(wildcard deps/**/*.c)
OBJS = $(DEPS:.c=.o)
CFLAGS = -std=c99 -Ideps -Wall -Wno-unused-function -U__STRICT_ANSI__
BINS = exercice
all: $(BINS)
$(BINS): $(SRC) $(OBJS)
$(CC) $(CFLAGS) -o $@ src/$(@:.exe=).c $(OBJS) $(LDFLAGS)
%.o: %.c
$(CC) $< -c -o $@ $(CFLAGS)
clean:
$(foreach c, $(BINS), rm $(c);)
rm $(OBJS) src/*.o