source: branches/ali/GDE/SINA/Makefile

Last change on this file was 19264, checked in by westram, 3 years ago
  • configure 'buildinfo' for sina
    • is shown with version number.
    • currently uses r19248 (=last patch to sina code)
  • whether configure is called depends on parent Makefile.
File size: 1.9 KB
Line 
1# wrapper to build SINA together with arb
2#
3
4TARFILE=$(wildcard SINA-1.7.*.*gz)
5
6ARB_PATCH=arb7.patch
7
8BUILDDIR=builddir
9
10SINA_INST_BIN=$(ARBHOME)/bin/sina
11SINA_MADE_BIN=$(BUILDDIR)/src/sina
12
13CC = $(A_CC)
14CXX = $(A_CXX)
15
16# special flags needed if arb is build sanitized
17CFLAGS = -g -O2 $(SANI_CFLAGS)
18LDFLAGS =$(SANI_CLFLAGS)
19
20# hack needed until sina build properly detects libtirpc:
21ifdef LIBS
22        LIBS := $(LIBS) $(ARB_RPC_LIBS)
23else
24        LIBS := $(ARB_RPC_LIBS)
25endif
26
27# configure:
28CONFIGURE_OPTS :=
29
30CONFIGURE_OPTS += --disable-silent-rules # be verbose
31CONFIGURE_OPTS += --enable-shared=no --enable-static=yes
32CONFIGURE_OPTS += --disable-docs # do not generate documentation
33CONFIGURE_OPTS += "--with-buildinfo=patched for arb r19248" # add patch info
34# detect revision for patchinfo using:
35# svn log ./builddir | head -30 | grep '^r[1-9]' | head -1
36
37# do not warn about undefined make variables in calls to submakefiles:
38ARB_ORG_MAKEFLAGS:=$(subst --warn-undefined-variables,,$(ARB_ORG_MAKEFLAGS))
39
40SUBMAKEFLAGS:=MAKEFLAGS="$(ARB_ORG_MAKEFLAGS)" LIBS="$(LIBS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
41
42## targets called by "upsteam makefile":
43
44all: $(SINA_INST_BIN)
45
46clean:
47        rm -f *.stamp
48        rm -f $(SINA_INST_BIN)
49        test ! -e $(BUILDDIR)/Makefile || (export $(SUBMAKEFLAGS) ; $(MAKE) -C $(BUILDDIR) mostlyclean clean-binPROGRAMS clean-libLTLIBRARIES clean-libtool)
50
51## internal targets
52
53build: $(SINA_MADE_BIN)
54
55# reset MAKEFLAGS to value initially found in main ARB makefile
56
57$(SINA_INST_BIN): $(SINA_MADE_BIN)
58        cp -p $(SINA_MADE_BIN) $@
59
60$(SINA_MADE_BIN): check_configured
61        (export $(SUBMAKEFLAGS) ; $(MAKE) -C $(BUILDDIR))
62
63check_configured: configure.stamp
64
65configure.stamp: Makefile
66ifeq ($(ARB_ORG_MAKEFLAGS),)
67        $(error ARB_ORG_MAKEFLAGS is empty)
68endif
69        (       export $(SUBMAKEFLAGS) ; \
70                cd $(BUILDDIR) && \
71                ./autogen.sh && \
72                ./configure $(CONFIGURE_OPTS) )
73        touch $@
74
75
76# prevent make from deleting intermediate targets:
77.SECONDARY:
78
79.PHONY: clean all check_configured
80
Note: See TracBrowser for help on using the repository browser.