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 |
#
|
|
21 |
|
|
22 |
#
|
|
23 |
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
|
|
24 |
# Use is subject to license terms.
|
|
25 |
#
|
|
26 |
# ident "@(#)Makefile.sfw 1.1 09/10/07 SMI"
|
|
27 |
#
|
|
28 |
|
|
29 |
include ../Makefile.cmd
|
|
30 |
|
|
31 |
VER = $(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
|
|
32 |
VER64 = $(VER)-64
|
|
33 |
TARBALL = $(VER).tar.gz
|
|
34 |
PATCHES:sh = echo Patches/*.patch
|
|
35 |
|
|
36 |
CONFIGURE_GENERIC = LDFLAGS="$(LDFLAGS)"
|
|
37 |
CONFIGURE_GENERIC += PATH=$(SFW_PATH)
|
|
38 |
CONFIGURE_GENERIC += MAKE="$(CCSMAKE)"
|
|
39 |
CONFIGURE_GENERIC += INSTALL="/usr/bin/ginstall"
|
|
40 |
|
|
41 |
PRE_CONFIGURE = CC="$(CC)"
|
|
42 |
PRE_CONFIGURE += CFLAGS="$(CFLAGS)"
|
|
43 |
PRE_CONFIGURE += $(CONFIGURE_GENERIC)
|
|
44 |
|
|
45 |
PRE_CONFIGURE_64 = CC="$(CC64)"
|
|
46 |
PRE_CONFIGURE_64 += CFLAGS="$(CFLAGS64)"
|
|
47 |
PRE_CONFIGURE_64 += $(CONFIGURE_GENERIC)
|
|
48 |
|
|
49 |
CONFIGURE_OPTIONS_32 = --bindir=/usr/bin
|
|
50 |
CONFIGURE_OPTIONS_32 += --libdir=/usr/lib
|
|
51 |
CONFIGURE_OPTIONS_32 += LDFLAGS=-L$(ROOTLIB)
|
|
52 |
|
|
53 |
CONFIGURE_OPTIONS_64 = --bindir=/usr/bin/$(MACH64)
|
|
54 |
CONFIGURE_OPTIONS_64 += --libdir=/usr/lib/$(MACH64)
|
|
55 |
CONFIGURE_OPTIONS_64 += LDFLAGS=-L$(ROOTLIB64)
|
|
56 |
|
|
57 |
|
|
58 |
all: all32 install32 all64 install64
|
|
59 |
|
|
60 |
all32: $(VER)/config.status
|
|
61 |
(cd $(VER); \
|
|
62 |
env - "CFLAGS=$(CFLAGS)" $(CONFIGURE_GENERIC) $(CCSMAKE))
|
|
63 |
|
|
64 |
all64: $(VER64)/config.status
|
|
65 |
(cd $(VER64); \
|
|
66 |
env - "CFLAGS=$(CFLAGS64)" $(CONFIGURE_GENERIC) $(CCSMAKE))
|
|
67 |
|
|
68 |
test32:
|
|
69 |
(cd $(VER); \
|
|
70 |
env - "LD_OPTIONS=-R$(ROOTLIB)" $(CCSMAKE) check)
|
|
71 |
|
|
72 |
test64:
|
|
73 |
(cd $(VER64); \
|
|
74 |
env - "LD_OPTIONS=-R$(ROOTLIB64)" $(CCSMAKE) check)
|
|
75 |
|
|
76 |
install: all
|
|
77 |
$(SRC)/tools/protofix --perm --pkg $(COMPONENT_PACKAGES:sh)
|
|
78 |
|
|
79 |
install32:
|
|
80 |
$(SHELL) ./install-sfw $(VER)
|
|
81 |
|
|
82 |
install64:
|
|
83 |
$(SHELL) ./install-sfw $(VER64) $(MACH64)
|
|
84 |
|
|
85 |
$(VER)/config.status: $(VER)/configure
|
|
86 |
(cd $(VER); \
|
|
87 |
env - $(PRE_CONFIGURE) $(SHELL) ./configure $(CONFIGURE_OPTIONS_32))
|
|
88 |
|
|
89 |
$(VER64)/config.status: $(VER64)/configure
|
|
90 |
(cd $(VER64); \
|
|
91 |
env - $(PRE_CONFIGURE_64) $(SHELL) ./configure $(CONFIGURE_OPTIONS_64))
|
|
92 |
|
|
93 |
$(VER)/configure: $(VER)/.patched
|
|
94 |
$(TOUCH) $@
|
|
95 |
|
|
96 |
$(VER64)/configure: $(VER64)/.patched
|
|
97 |
$(TOUCH) $@
|
|
98 |
|
|
99 |
clean:
|
|
100 |
-$(RM) -rf $(VER) $(VER64)
|
|
101 |
|
|
102 |
include ../Makefile.targ
|