[Swan-dev] makefile breakage#1 the .c.o rules and CFLAGS

Andrew Cagney andrew.cagney at gmail.com
Wed Feb 18 04:03:40 EET 2015


To get dependency generation working (it will live in mk/depends.mk)
I'm going to need to modify the .c.o rule.  The problem is, which one.
For instance, in programs/Makefile.programs I've got:

%.o: ${SRCDIR}%.c
        ${CC} -c ${CFLAGS} $<

while in programs/pluto/Makefile (which includes but overrides
Makefile.programs) I've got:

.c.o:
        $(CC) $(USERCOMPILE) ${PORTINCLUDE} $(COPTS) $(ALLFLAGS) -c $<

As a hack, so that fixing dependencies doesn't degenerate into an
attempt to fix this CFLAG snafu, I'm going to do something like:

.c.o:
        $(CC) $(MK_DEPENDS_CFLAGS) .... -c $<

and have including code set MK_DEPENDS_CFLAGS.

Andrew


More information about the Swan-dev mailing list