chiark / gitweb /
Drop Perdir.sd.mk from explicit MAKEFILE_TEMPLATES
[subdirmk.git] / subdirmk / usual.mk.in
index 97f99e71bd676abb016dc1c3f78b015729f5240d..66c71ebcde5ae968a04fa001accef3cd494800cb 100644 (file)
@@ -3,6 +3,13 @@
 #  Copyright 2019 Ian Jackson
 # SPDX-License-Identifier: LGPL-2.0-or-later
 
+# Usage:
+#   include subdirmk/usual.mk
+# (probably in toplevel Subdir.sd.mk)
+#
+# Provides various conventional `make' variables, and a
+# rule for compiling C programs.
+
 VPATH          = $(top_srcdir)
 
 prefix         = @prefix@
@@ -19,7 +26,7 @@ LIBS          ?= @LIBS@
 
 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) $<