# Copyright 2019 Mark Wooding
# Copyright 2019 Ian Jackson
# SPDX-License-Identifier: LGPL-2.0-or-later
+# There is NO WARRANTY.
-VPATH = &^
+# Usage:
+# include subdirmk/usual.mk
+# (probably in toplevel Dir.sd.mk)
+#
+# Provides various conventional `make' variables, and a
+# rule for compiling C programs.
+
+VPATH = $(top_srcdir)
prefix = @prefix@
exec_prefix = @exec_prefix@
LINK ?= $(CC) -o$@ $(CFLAGS) $(LDFLAGS)
AR ?= ar
-COMPILE ?= $(CC) -c -o$@ -MD -MF $(*D)/.$(*F).d $(DEFS) $(INCLUDES) $(CFLAGS)
+COMPILE ?= $(CC) -c -o$@ $(CDEPS_CFLAGS) $(DEFS) $(INCLUDES) $(CFLAGS)
%.o: %.c
$(COMPILE) $<