That's not what O(1) means. If your strings are short, complexity doesn't matter either way.
17 karma · joined December 14, 2018
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 $@ $^