chiark / gitweb /
subdirmk: Merge new version and fix everything
[secnet.git] / subdirmk / usual.mk.in
index 21cab7bbca5b4f357a385fe7d9ef86d2955d9b23..6cb093058eee8a2161dca4992fad079b16496d89 100644 (file)
@@ -1,6 +1,17 @@
+# subdirmk - usual variable settings
+#  Copyright 2019 Mark Wooding
+#  Copyright 2019 Ian Jackson
+# SPDX-License-Identifier: LGPL-2.0-or-later
+# There is NO WARRANTY.
+
+# Usage:
+#   include subdirmk/usual.mk
+# (probably in toplevel Dir.sd.mk)
 #
+# Provides various conventional `make' variables, and a
+# rule for compiling C programs.
 
-VPATH          = &^
+VPATH          = $(top_srcdir)
 
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
@@ -16,7 +27,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) $<