author | Cyril Plisko <cyril.plisko@grigale.com> |
Mon, 21 Mar 2011 01:49:39 -0800 | |
changeset 72 | 82bde2a81435 |
parent 50 | 6100357dc4bc |
permissions | -rw-r--r-- |
50 | 1 |
# |
2 |
# |
|
3 |
# CDDL HEADER START |
|
4 |
# |
|
5 |
# The contents of this file are subject to the terms of the |
|
6 |
# Common Development and Distribution License (the "License"). |
|
7 |
# You may not use this file except in compliance with the License. |
|
8 |
# |
|
9 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
10 |
# or http://www.opensolaris.org/os/licensing. |
|
11 |
# See the License for the specific language governing permissions |
|
12 |
# and limitations under the License. |
|
13 |
# |
|
14 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
15 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
16 |
# If applicable, add the following below this CDDL HEADER, with the |
|
17 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
18 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
19 |
# |
|
20 |
# CDDL HEADER END |
|
21 |
# |
|
72
82bde2a81435
Import sfw build 162
Cyril Plisko <cyril.plisko@grigale.com>
parents:
50
diff
changeset
|
22 |
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. |
50 | 23 |
# |
72
82bde2a81435
Import sfw build 162
Cyril Plisko <cyril.plisko@grigale.com>
parents:
50
diff
changeset
|
24 |
# ident "@(#)Makefile.sfw 1.2 11/03/08 SMI" |
50 | 25 |
|
26 |
VER=$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh) |
|
27 |
||
28 |
include ../../Makefile.cmd |
|
29 |
||
30 |
||
31 |
CPPFLAGS += "-Wformat=2" |
|
32 |
CONFIGURE_ENV += PATH=$(SFW_PATH) |
|
33 |
CONFIGURE_ENV += MAKE=$(GMAKE) |
|
34 |
CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)" |
|
35 |
CONFIGURE_ENV += INSTALL=/usr/ucb/install |
|
36 |
||
37 |
CONFIGURE_OPTIONS += --disable-libcheck |
|
38 |
CONFIGURE_OPTIONS += --disable-static |
|
39 |
||
40 |
$(VER)/build-32/config.status:= CONFIGURE_ENV += CFLAGS="-m32 -D_REENTRANT" |
|
41 |
$(VER)/build-32/config.status:= CONFIGURE_ENV += LD_LIBRARY_PATH="$(ROOTLIB)" |
|
42 |
$(VER)/build-32/config.status:= CONFIGURE_ENV += LDFLAGS="-L$(ROOTLIB)" |
|
43 |
||
44 |
$(VER)/build-64/config.status:= CONFIGURE_ENV += CFLAGS="-m64 -D_REENTRANT" |
|
45 |
$(VER)/build-64/config.status:= CONFIGURE_ENV += LD_LIBRARY_PATH="$(ROOTLIB64)" |
|
46 |
$(VER)/build-64/config.status:= CONFIGURE_ENV += LDFLAGS="-L$(ROOTLIB64)" |
|
47 |
$(VER)/build-64/config.status:= CONFIGURE_OPTIONS += --bindir=$(CFGBIN64) |
|
48 |
$(VER)/build-64/config.status:= CONFIGURE_OPTIONS += --libdir=$(CFGLIB64) |
|
49 |
||
50 |
CPPFLAGS += -I$(ROOT)/usr/include |
|
51 |
||
52 |
COMMON_ENV += MAKE=$(GMAKE) |
|
72
82bde2a81435
Import sfw build 162
Cyril Plisko <cyril.plisko@grigale.com>
parents:
50
diff
changeset
|
53 |
COMMON_ENV += mkdir_p="/usr/gnu/bin/mkdir -p" |
50 | 54 |
|
55 |
BUILD_ENV += CPPFLAGS="$(CPPFLAGS)" |
|
56 |
||
57 |
INSTALL_ENV += INSTALL=$(INSTALL_PROTO) |
|
58 |
INSTALL_ENV += MANSCRIPT=$(COMPONENT_TOP)/../manscript |
|
59 |
||
60 |
INSTALL_TARGETS += DESTDIR=$(ROOT) |
|
61 |
INSTALL_TARGETS += install |
|
62 |
||
63 |
all: $(VER)/build-32/.built $(VER)/build-64/.built |
|
64 |
||
65 |
install: $(VER)/build-32/.installed $(VER)/build-64/.installed |
|
66 |
$(RM) $(ROOTLIB)/$(COMPONENT_NAME:sh).la \ |
|
67 |
$(ROOTLIB64)/$(COMPONENT_NAME:sh).la |
|
68 |
||
69 |
$(VER)/build-%/.installed: $(VER)/build-%/.built |
|
70 |
(cd $(@D) ; $(ENV) $(COMMON_ENV) $(INSTALL_ENV) gmake $(INSTALL_TARGETS)) |
|
71 |
$(TOUCH) $@ |
|
72 |
||
73 |
$(VER)/build-%/.built: $(VER)/build-%/config.status |
|
74 |
(cd $(@D) ; $(ENV) $(COMMON_ENV) $(BUILD_ENV) gmake $(BUILD_TARGETS)) |
|
75 |
$(TOUCH) $@ |
|
76 |
||
77 |
$(VER)/build-%/config.status: $(VER)/configure |
|
78 |
-$(RM) -r $(@D) ; $(MKDIR) $(@D) |
|
79 |
(cd $(@D) ; $(ENV) $(CONFIGURE_ENV) \ |
|
80 |
$(CONFIG_SHELL) ../configure $(CONFIGURE_OPTIONS)) |
|
81 |
$(TOUCH) $@ |
|
82 |
||
83 |
prep: $(VER)/configure |
|
84 |
||
85 |
$(VER)/configure: $(VER).tar.gz |
|
86 |
$(GTAR) zxpf $(VER).tar.gz |
|
87 |
$(GPATCH) -p1 -d $(@D) <base.patch |
|
88 |
$(TOUCH) $@ |
|
89 |
||
90 |
clean: |
|
91 |
-$(RM) -r $(VER) |
|
92 |
||
93 |
include ../../Makefile.targ |