chiark / gitweb /
move much into usual.mk.in
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Nov 2019 13:48:52 +0000 (13:48 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Nov 2019 13:48:52 +0000 (13:48 +0000)
Subdir.mk.in
subdirmk/usual.mk.in [new file with mode: 0644]

index cd8fa532d2e183c16084c66091a073525909188c..e80ef5238ac816ceebbd07a8518aab6acc372c6f 100644 (file)
@@ -1,26 +1,5 @@
-#
-
-VPATH          = &^
-
-prefix         = @prefix@
-exec_prefix    = @exec_prefix@
-bindir         = @bindir@
-
-CC             ?= @CC@
-CFLAGS         ?= @CFLAGS@
-DEFS           ?= @DEFS@
-INCLUDES       ?= @INCLUDES@
-LD             ?= @CC@
-LDFLAGS                ?= @LDFLAGS@
-LIBS           ?= @LIBS@
 
 INCLUDES       += -I&^/lib/
 
-LINK           ?= $(CC) -o$@ $(CFLAGS) $(LDFLAGS)
-AR             ?= ar
-COMPILE                ?= $(CC) -c -o$@ -MD $(DEFS) $(INCLUDES) $(CFLAGS)
-
-%.o: %.c
-       $(COMPILE) $<
-
+&:include subdirmk/usual.mk.in
 include subdirmk/regen.mk
diff --git a/subdirmk/usual.mk.in b/subdirmk/usual.mk.in
new file mode 100644 (file)
index 0000000..c961915
--- /dev/null
@@ -0,0 +1,22 @@
+#
+
+VPATH          = &^
+
+prefix         = @prefix@
+exec_prefix    = @exec_prefix@
+bindir         = @bindir@
+
+CC             ?= @CC@
+CFLAGS         ?= @CFLAGS@
+DEFS           ?= @DEFS@
+INCLUDES       ?= @INCLUDES@
+LD             ?= @CC@
+LDFLAGS                ?= @LDFLAGS@
+LIBS           ?= @LIBS@
+
+LINK           ?= $(CC) -o$@ $(CFLAGS) $(LDFLAGS)
+AR             ?= ar
+COMPILE                ?= $(CC) -c -o$@ -MD $(DEFS) $(INCLUDES) $(CFLAGS)
+
+%.o: %.c
+       $(COMPILE) $<