Victor Eijkhout <[email protected]> writes:
> On , 2020Dec15, at 21:41, Barry Smith
> <[email protected]<mailto:[email protected]>> wrote:
>
> So if your code is C you can use
>
>
> ${CC} -c $< -o $@ ${CC_FLAGS} ${CPP_FLAGS}
Makefile.user is intended to be used with the default rules or any similar
convention.
$ make -f /dev/null -p
[snipped]
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
OUTPUT_OPTION = -o $@
%.o: %.c
# recipe to execute (built-in):
$(COMPILE.c) $(OUTPUT_OPTION) $<
> For completeness, what would be the F rule?
COMPILE.F = $(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
%.o: %.F
# recipe to execute (built-in):
$(COMPILE.F) $(OUTPUT_OPTION) $<