chiark / gitweb /
WORKS
[subdirmk.git] / Subdir.mk.in
index 792d6005489ebee62cde02066f19c5521e620451..fa38d6578e06fdea3e002767cfdddfb3e8847823 100644 (file)
@@ -1 +1,36 @@
 #
+
+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) $<
+
+&^/configure: &^/configure.ac
+       cd &^ && autoconf
+
+config.status: &^/configure
+       ./config.status --recheck
+
+subdirs.mk $(MAKFILES): makefiles.phantom
+.INTERMEDIATE: makefiles.phantom
+makefiles.phantom: $(addprefix &^/,$(addsuffix .in,$(MAKEFILES)))      \
+               config.status &^/build-aux/subdirmk-setup
+       ./config.status