-
Notifications
You must be signed in to change notification settings - Fork 47
/
Makefile
92 lines (76 loc) · 2.4 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
# Copyright (c) 2012, Joyent, Inc. All rights reserved.
#
VER = zlib-1.2.3
include ../Makefile.defs
AUTOCONF_OPTS += \
--shared
#
# zlib's configure isn't a real autoconf, and it breaks horribly if this
# stuff is set.
#
AUTOCONF_CFLAGS =
AUTOCONF_CFLAGS.64 =
AUTOCONF_LDFLAGS =
AUTOCONF_LDFLAGS.64 =
AUTOCONF_CC = CC="$(GCC) $(CPPFLAGS)"
AUTOCONF_CC.64 = CC="$(GCC.64) $(CPPFLAGS)"
#
# LDFLAGS is used by zlib's build system to build programs, not the library
# itself. For that, it accepts only a combined linker+flags+libs command
# line via the LDSHARED variable.
#
LDSHARED_FLAGS = \
-shared \
-Wl,-h,libz.so.1 \
-Wl,-zdefs \
-Wl,-ztext \
-Wl,-zcombreloc \
-Wl,-M,../mapfile
ifneq ($(STRAP),strap)
LDSHARED_FLAGS += $(GENLDFLAGS)
endif
LDSHARED_FLAGS.32 = $(LDSHARED_FLAGS) $(SYSLIBDIRS:%=-L$(DESTDIR)/%)
LDSHARED_FLAGS.64 = $(LDSHARED_FLAGS) $(SYSLIBDIRS:%=-L$(DESTDIR)/%/64)
LDSHARED_LIBS = -lc
ifeq ($(STRAP),strap)
LDSHARED_FLAGS.32 += $(SYSLIBDIRS:%=-R$(DESTDIR)/%)
LDSHARED_FLAGS.64 += $(SYSLIBDIRS:%=-R$(DESTDIR)/%/64)
endif
LDFLAGS += -L. -lz -lc
LDFLAGS.64 += -L. -lz -lc
OVERRIDES = \
LDSHARED="$(GCC) $(LDSHARED_FLAGS.32) $(LDSHARED_LIBS)" \
LDFLAGS="$(LDFLAGS)"
OVERRIDES.64 = \
LDSHARED="$(GCC.64) $(LDSHARED_FLAGS.64) $(LDSHARED_LIBS)" \
LDFLAGS="$(LDFLAGS.64)"
BUILD32 = yes
BUILD64 = yes
include ../Makefile.targ
all: all_autoconf
install: all
BASE=$(BASE) DESTDIR=$(DESTDIR) VERS=$(VER.32) ksh93 ./install-zlib
BASE=$(BASE) DESTDIR=$(DESTDIR) VERS=$(VER.64) MACH64=amd64 \
ksh93 ./install-zlib-64