0
|
1 |
#
|
|
2 |
# CDDL HEADER START
|
|
3 |
#
|
|
4 |
# The contents of this file are subject to the terms of the
|
|
5 |
# Common Development and Distribution License (the "License").
|
|
6 |
# You may not use this file except in compliance with the License.
|
|
7 |
#
|
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
9 |
# or http://www.opensolaris.org/os/licensing.
|
|
10 |
# See the License for the specific language governing permissions
|
|
11 |
# and limitations under the License.
|
|
12 |
#
|
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each
|
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
15 |
# If applicable, add the following below this CDDL HEADER, with the
|
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying
|
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner]
|
|
18 |
#
|
|
19 |
# CDDL HEADER END
|
|
20 |
#
|
9
|
21 |
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
|
0
|
22 |
# Use is subject to license terms.
|
|
23 |
#
|
9
|
24 |
#pragma ident "@(#)Makefile.sfw 1.10 10/02/19 SMI"
|
0
|
25 |
|
|
26 |
NAME=quagga
|
|
27 |
VERSION=0.99.8
|
|
28 |
SOURCE=$(NAME)-$(VERSION).tar.gz
|
|
29 |
SRCDIR=$(NAME)-$(VERSION)
|
|
30 |
BUILDDIR=$(NAME)-$(MACH)-build
|
|
31 |
VER=$(SRCDIR)
|
|
32 |
|
|
33 |
PATCHES:sh= cat ./PATCHES.sfw | grep -v '^\#' | grep -v '^$' | sed 's/\(.*\)/patches\/\1\.applied/'
|
|
34 |
|
|
35 |
LD_OPTIONS=-L${ROOT}/usr/lib -L/usr/sfw/lib -L/usr/lib -R/usr/sfw/lib:/usr/lib
|
|
36 |
|
|
37 |
.PARALLEL: .compile
|
|
38 |
|
|
39 |
all: runconfig .compile
|
|
40 |
@find . -name core -exec rm -f {} \;
|
|
41 |
|
|
42 |
include ../Makefile.cmd
|
|
43 |
|
|
44 |
# configure script paths, e.g. --prefix, --sysconfdir, etc..
|
|
45 |
# ../../Makefile should provide these directly idealls
|
|
46 |
CFGSYSCONFDIR= $(CFGETC)/quagga
|
|
47 |
CFGPREFIX= /usr
|
|
48 |
CFGLOCALSTATEDIR=/var/run/quagga
|
|
49 |
CFGINFODIR= $(CFGSFWINFO)
|
|
50 |
CFGMANDIR= $(CFGSFWMAN)
|
|
51 |
CFGINCLUDEDIR= $(CFGSFWINCLUDE)
|
|
52 |
CFGLIBDIR= $(CFGSFWLIB)
|
|
53 |
|
|
54 |
# GNU compatible install is needed by auto* and provided with Quagga
|
|
55 |
INSTALL=../$(SRCDIR)/install-sh
|
|
56 |
|
|
57 |
#CC=cc
|
|
58 |
CPPFLAGS += -I /usr/sfw/include
|
|
59 |
LDFLAGS +=-lumem
|
|
60 |
|
|
61 |
#Sun SOS8 CFLAGS
|
|
62 |
CFLAGS += -xspace -Xa -xildoff
|
|
63 |
#debug
|
|
64 |
CFLAGS += -g -xdebugformat=dwarf -O
|
|
65 |
#else optimisation
|
|
66 |
#CFLAGS += -xO4
|
|
67 |
CFLAGS += -errtags=yes -xc99=%all
|
|
68 |
CFLAGS += -erroff=E_TRAILING_COMMA_IN_ENUM
|
|
69 |
CFLAGS += -erroff=E_STATEMENT_NOT_REACHED
|
|
70 |
CFLAGS += -erroff=E_EMPTY_TRANSLATION_UNIT
|
|
71 |
#CFLAGS += -DTEXT_DOMAIN="SUNW_OST_OSCMD"
|
|
72 |
#CFLAGS += -D_TS_ERRNO
|
|
73 |
|
|
74 |
#GCC CFLAGS
|
|
75 |
#CFLAGS = -g -Os -Wall,packed,padded,sign-compare,pointer-arith
|
|
76 |
|
|
77 |
|
|
78 |
install: all
|
|
79 |
(cd $(BUILDDIR) ; $(GMAKE) \
|
|
80 |
install MAKE="$(GMAKE)" DESTDIR="$(ROOT)" ; \
|
|
81 |
$(SH) ../post-install.sh "$(ROOT)" "$(SRCDIR)")
|
9
|
82 |
$(INSTALL_PROTO) -m 0444 exec_attr $(ROOT)/etc/security/exec_attr.d/quagga
|
0
|
83 |
|
|
84 |
$(BUILDDIR)/config.status: .prep
|
|
85 |
(cd $(BUILDDIR); env \
|
|
86 |
LD_OPTIONS="$(LD_OPTIONS)" \
|
|
87 |
CC=$(CC) "CFLAGS=$(CFLAGS)" "CPPFLAGS=$(CPPFLAGS)" \
|
|
88 |
MAKE=$(GMAKE) \
|
|
89 |
PATH=$(SFW_PATH) \
|
|
90 |
INSTALL="$(INSTALL) -c" \
|
|
91 |
../$(SRCDIR)/configure --prefix=$(CFGPREFIX) \
|
|
92 |
--sysconfdir=$(CFGSYSCONFDIR) \
|
|
93 |
--localstatedir=$(CFGLOCALSTATEDIR) \
|
|
94 |
--infodir=$(CFGINFODIR) \
|
|
95 |
--mandir=$(CFGMANDIR) \
|
|
96 |
--includedir=$(CFGINCLUDEDIR) \
|
|
97 |
--libdir=$(CFGLIBDIR) \
|
|
98 |
--with-tags="" \
|
|
99 |
--with-cflags="$(CFLAGS)" \
|
|
100 |
--enable-opaque-lsa \
|
|
101 |
--enable-isisd --enable-trill --disable-watchquagga \
|
|
102 |
--enable-ospf6d --enable-ripngd \
|
|
103 |
--enable-user=root --enable-group=root)
|
|
104 |
|
|
105 |
.compile:
|
|
106 |
(cd $(BUILDDIR); $(GMAKE) \
|
|
107 |
LD_OPTIONS="$(LD_OPTIONS)" \
|
|
108 |
CC=$(CC) \
|
|
109 |
"LDFLAGS=$(LDFLAGS)" \
|
|
110 |
"CFLAGS=$(CFLAGS)" \
|
|
111 |
"CPPFLAGS=$(CPPFLAGS)" \
|
|
112 |
PATH=$(SFW_PATH) \
|
|
113 |
MAKE=$(GMAKE) \
|
|
114 |
INSTALL="$(INSTALL) -c" )
|
|
115 |
touch .compile
|
|
116 |
|
|
117 |
packages: install .WAIT
|
|
118 |
(cd $(BUILDDIR)/solaris; $(GMAKE) MAKE="$(GMAKE)" DESTDIR=$(ROOT) packages)
|
|
119 |
|
|
120 |
runconfig: $(BUILDDIR)/config.status
|
|
121 |
|
|
122 |
.untar: $(SOURCE)
|
|
123 |
gzip -dc $(SOURCE) | tar xopf -
|
|
124 |
touch .untar
|
|
125 |
|
|
126 |
.patch: $(PATCHES)
|
|
127 |
touch .patch
|
|
128 |
|
|
129 |
$(BUILDDIR):
|
|
130 |
mkdir $(BUILDDIR)
|
|
131 |
|
|
132 |
.prep: .untar .patch $(BUILDDIR)
|
|
133 |
touch .prep
|
|
134 |
|
|
135 |
prep: .prep
|
|
136 |
|
|
137 |
clean:
|
|
138 |
-$(RM) -r $(SRCDIR) $(BUILDDIR) patches/*.applied .untar .patch .prep .compile
|
|
139 |
|
|
140 |
%.patch.applied: %.patch
|
|
141 |
(cd $(SRCDIR); gpatch -p0 < ../$< && cp ../$< ../$@ && touch ../$@)
|
|
142 |
|
|
143 |
include ../Makefile.targ
|