I'm trying to create a Makefile for my hobby OS, I want to have rules to build object files for both .c and .S (assembly) sources.
I did it like this:
as I usually do with gmake, but I get this error:
what does this mean? How can I solve this issue?
I did it like this:
Makefile:
%.o: %.c
${CC} ${CFLAGS} -c $@ -o $<
%.o: %.S
${CC} ${ASFLAGS} -c $@ -o $<
make: "/home/lorenzo/src/hydra/Makefile" line 14: warning: duplicate script for target "%.o" ignored
make: "Makefile" line 11: warning: using previous script for "%.o" defined here
what does this mean? How can I solve this issue?