chiark / gitweb /
Drop Perdir.sd.mk from explicit MAKEFILE_TEMPLATES
[subdirmk.git] / subdirmk / usual.mk.in
index 00c48fe1ef2d0a81905dce6b0e5f11fd82f13f8a..66c71ebcde5ae968a04fa001accef3cd494800cb 100644 (file)
@@ -3,7 +3,14 @@
 #  Copyright 2019 Ian Jackson
 # SPDX-License-Identifier: LGPL-2.0-or-later
 
-VPATH          = &^
+# 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@
 exec_prefix    = @exec_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) $<