1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
CFLAGS += -Wall -pedantic -Werror -Wextra -std=c99 -g TARGET=exar OBJ=$(patsubst %.c, %.o, $(wildcard *.c)) all: $(TARGET) $(TARGET): $(OBJ) @echo $(CC) -o $@ @$(CC) $(OBJ) -o $@ $(CFLAGS) $(CPPFLAGS) %.o: %.c @echo $(CC) $< @$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS) clean: $(RM) -rf $(OBJ) $(TARGET) .PHONY: clean