by jacwah · 7y ago · 0 comments
You can do this by combining implicit and explicit rules:
target: $(OBJ)
# default rule
%.o: %.c
cc -o $@ $^
# special case
special.o: special.c
specialc -o $@ $^ special.o: CFLAGS += -Wno-blah
%.o: %.c
echo $(CC) $(CFLAGS) -o $@ $<