forked from TritonDataCenter/illumos-extra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.defs
170 lines (142 loc) · 4.39 KB
/
Makefile.defs
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at COPYING
# 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 COPYING.
# 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 (c) 2014, Joyent, Inc.
#
BASE = $(PWD)
DESTDIR = $(BASE)/../proto
VER.32 = $(VER)-32$(STRAP)
VER.64 = $(VER)-64$(STRAP)
OBJ.32 = $(VER.32)$(SEPARATE_BUILD:yes=.build)
OBJ.64 = $(VER.64)$(SEPARATE_BUILD:yes=.build)
CTF.32 = ctfobjects-32$(STRAP)
CTF.64 = ctfobjects-64$(STRAP)
ifeq ($(STRAP),strap)
STRAPPROTO = $(DESTDIR)
else
STRAPPROTO = $(DESTDIR:proto=proto.strap)
endif
PATH = $(STRAPPROTO)/usr/bin:/usr/bin:/usr/sbin:/sbin:/opt/local/bin
MAKE = gmake
MAX_JOBS = 128
PARALLEL = -j$(MAX_JOBS)
MAKE_VERBOSE = V=1
GCC = $(DESTDIR)/usr/bin/gcc
GXX = $(DESTDIR)/usr/bin/g++
GCC.64 = $(GCC) -m64
GXX.64 = $(GXX) -m64
GCC.host = /opt/local/bin/gcc
GXX.host = /opt/local/bin/g++
GCC.host.64 = $(GCC.host) -m64
GXX.host.64 = $(GXX.host) -m64
LEX = /opt/local/bin/lex
YACC = /opt/local/bin/yacc
GPATCH = /opt/local/bin/gpatch
SYSINCDIRS = /usr/include
SYSLIBDIRS = /usr/lib /lib
BUILD32 = yes
BUILD64 =
SEPARATE_BUILD =
CPPFLAGS = $(SYSINCDIRS:%=-isystem $(DESTDIR)/%)
#
# We ship platform-private perl modules (e.g. from ntp) in this directory,
# and using this perl interpeter:
#
PATH_PERL = /usr/perl5/bin/perl
PERLLIBDIR = /usr/perl5/5.12/lib
#
# These are all definitions that relate to Sun Make. There are basically two
# different sets that we care about. The first is the boostrap make. This is
# used to build the strap make. Once we have the strap make, it is used for all
# other makes. Beacuse MAKE is used extensively to mean GNU make in these
# makefiles, we instead use SUN_MAKE and SUM_MAKE_STRAP.
#
SUN_MAKE_STRAP=/opt/local/bin/dmake
SUN_MAKE=$(STRAPPROTO)/usr/bin/dmake
#
# Because of bugs in ntp, we need to be able to refer to the target specific
# flags as well as the generic flags later on.
#
ifneq ($(STRAP),strap)
GENLDFLAGS = -Wl,-zassert-deflib -Wl,-zfatal-warnings
endif
T32_LDFLAGS = $(SYSLIBDIRS:%=-L$(DESTDIR)/%)
T64_LDFLAGS = $(SYSLIBDIRS:%=-L$(DESTDIR)/%/64)
LDFLAGS = $(T32_LDFLAGS) $(GENLDFLAGS)
LDFLAGS.64 = $(T64_LDFLAGS) $(GENLDFLAGS)
AUTOCONF_CC = CC="$(GCC)"
AUTOCONF_CXX = CXX="$(GXX)"
AUTOCONF_CC.64 = CC="$(GCC.64)"
AUTOCONF_CXX.64 = CXX="$(GXX.64)"
AUTOCONF_CPPFLAGS = CPPFLAGS="$(CPPFLAGS)"
AUTOCONF_CFLAGS = CFLAGS="$(CFLAGS)"
AUTOCONF_CFLAGS.64 = CFLAGS="$(CFLAGS.64)"
AUTOCONF_LDFLAGS = LDFLAGS="$(LDFLAGS)"
AUTOCONF_LDFLAGS.64 = LDFLAGS="$(LDFLAGS.64)"
AUTOCONF_LIBS = LIBS="$(LIBS)"
AUTOCONF_LIBS.64 = LIBS="$(LIBS.64)"
AUTOCONF_OUT = config.status
AUTOCONF_OUT.32 = $(OBJ.32)/$(AUTOCONF_OUT)
AUTOCONF_OUT.64 = $(OBJ.64)/$(AUTOCONF_OUT)
AUTOCONF_PREFIX = /usr
AUTOCONF_ENV = \
PKG_CONFIG_LIBDIR="" \
$(AUTOCONF_CC) \
$(AUTOCONF_CXX) \
$(AUTOCONF_CPPFLAGS) \
$(AUTOCONF_CFLAGS) \
$(AUTOCONF_LDFLAGS) \
$(AUTOCONF_LIBS)
AUTOCONF_ENV.64 = \
PKG_CONFIG_LIBDIR="" \
$(AUTOCONF_CC.64) \
$(AUTOCONF_CXX.64) \
$(AUTOCONF_CPPFLAGS) \
$(AUTOCONF_CFLAGS.64) \
$(AUTOCONF_LDFLAGS.64) \
$(AUTOCONF_LIBS.64)
AUTOCONF_OPTS = \
--prefix=$(AUTOCONF_PREFIX)
AUTOCONF_OPTS.32 = \
$(AUTOCONF_OPTS)
AUTOCONF_OPTS.64 = \
$(AUTOCONF_OPTS)
ALL_TGT =
OVERRIDES = $(MAKE_VERBOSE)
TARBALL = $(VER).tar.gz
TARBALL_COMPRESS = -z
UNPACK_SENTINEL = configure
FROB_SENTINEL.32 = chmod 755 $(VER.32)/$(UNPACK_SENTINEL)
FROB_SENTINEL.64 = chmod 755 $(VER.64)/$(UNPACK_SENTINEL)
PATCHSTRIP = 1
APPLY_PATCHES.32 = \
for p in $(PATCHES); do \
echo "Applying $$p"; \
$(GPATCH) -d .unpack32/$(VER) -p$(PATCHSTRIP) < "$$p" || exit 1; \
done
APPLY_PATCHES.64 = \
for p in $(PATCHES); do \
echo "Applying $$p"; \
$(GPATCH) -d .unpack64/$(VER) -p$(PATCHSTRIP) < "$$p" || exit 1; \
done
MAKE_CTF = $(BASE)/../tools/make-ctf
MAKE_CTF.32 = $(MAKE_CTF) $(OBJ.32) $(CTF.32) $(VER)
MAKE_CTF.64 = $(MAKE_CTF) $(OBJ.64) $(CTF.64) $(VER)
.DEFAULT_GOAL = all