# wrapper to build SINA together with arb # TARFILE=$(wildcard SINA-1.7.*.*gz) ARB_PATCH=arb7.patch BUILDDIR=builddir SINA_INST_BIN=$(ARBHOME)/bin/sina SINA_MADE_BIN=$(BUILDDIR)/src/sina CC = $(A_CC) CXX = $(A_CXX) # special flags needed if arb is build sanitized CFLAGS = -g -O2 $(SANI_CFLAGS) LDFLAGS =$(SANI_CLFLAGS) # hack needed until sina build properly detects libtirpc: ifdef LIBS LIBS := $(LIBS) $(ARB_RPC_LIBS) else LIBS := $(ARB_RPC_LIBS) endif # configure: CONFIGURE_OPTS := CONFIGURE_OPTS += --disable-silent-rules # be verbose CONFIGURE_OPTS += --enable-shared=no --enable-static=yes CONFIGURE_OPTS += --disable-docs # do not generate documentation CONFIGURE_OPTS += "--with-buildinfo=patched for arb r19248" # add patch info # detect revision for patchinfo using: # svn log ./builddir | head -30 | grep '^r[1-9]' | head -1 # do not warn about undefined make variables in calls to submakefiles: ARB_ORG_MAKEFLAGS:=$(subst --warn-undefined-variables,,$(ARB_ORG_MAKEFLAGS)) SUBMAKEFLAGS:=MAKEFLAGS="$(ARB_ORG_MAKEFLAGS)" LIBS="$(LIBS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ## targets called by "upsteam makefile": all: $(SINA_INST_BIN) clean: rm -f *.stamp rm -f $(SINA_INST_BIN) test ! -e $(BUILDDIR)/Makefile || (export $(SUBMAKEFLAGS) ; $(MAKE) -C $(BUILDDIR) mostlyclean clean-binPROGRAMS clean-libLTLIBRARIES clean-libtool) ## internal targets build: $(SINA_MADE_BIN) # reset MAKEFLAGS to value initially found in main ARB makefile $(SINA_INST_BIN): $(SINA_MADE_BIN) cp -p $(SINA_MADE_BIN) $@ $(SINA_MADE_BIN): check_configured (export $(SUBMAKEFLAGS) ; $(MAKE) -C $(BUILDDIR)) check_configured: configure.stamp configure.stamp: Makefile ifeq ($(ARB_ORG_MAKEFLAGS),) $(error ARB_ORG_MAKEFLAGS is empty) endif ( export $(SUBMAKEFLAGS) ; \ cd $(BUILDDIR) && \ ./autogen.sh && \ ./configure $(CONFIGURE_OPTS) ) touch $@ # prevent make from deleting intermediate targets: .SECONDARY: .PHONY: clean all check_configured