Skip to content
Newer
Older
100644 171 lines (142 sloc) 4.39 KB
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
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, Version 1.0 only
6 # (the "License"). You may not use this file except in compliance
7 # with the License.
8 #
9 # You can obtain a copy of the license at COPYING
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 COPYING.
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 #
5c9b93a @jclulow OS-3150 upgrade NTP to ntp-dev-4.2.7p446
jclulow authored Jul 10, 2014
21 # Copyright (c) 2014, Joyent, Inc.
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
22 #
23
24 BASE = $(PWD)
25 DESTDIR = $(BASE)/../proto
6938e49 @rmustacc OS-1639 illumos-extra should build with -zassert-deflib
rmustacc authored Oct 23, 2012
26 VER.32 = $(VER)-32$(STRAP)
27 VER.64 = $(VER)-64$(STRAP)
884461b @wesolows OS-2123 multilib: gcc can't install in parallel
wesolows authored Apr 22, 2013
28 OBJ.32 = $(VER.32)$(SEPARATE_BUILD:yes=.build)
29 OBJ.64 = $(VER.64)$(SEPARATE_BUILD:yes=.build)
2895e31 @jclulow OS-3330 NTP should ship with CTF data
jclulow authored Sep 9, 2014
30 CTF.32 = ctfobjects-32$(STRAP)
31 CTF.64 = ctfobjects-64$(STRAP)
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
32
3bb8978 @wesolows OS-3208 illumos-extra must not consume $ROOT/usr/bin
wesolows authored Jul 15, 2014
33 ifeq ($(STRAP),strap)
34 STRAPPROTO = $(DESTDIR)
35 else
36 STRAPPROTO = $(DESTDIR:proto=proto.strap)
37 endif
38
39 PATH = $(STRAPPROTO)/usr/bin:/usr/bin:/usr/sbin:/sbin:/opt/local/bin
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
40
41 MAKE = gmake
973cf25 @wesolows OS-3360 would like environment variable to set to enable low-memory b…
wesolows authored Sep 12, 2014
42 MAX_JOBS = 128
43 PARALLEL = -j$(MAX_JOBS)
d6b1b54 @wesolows OS-1370 pass V=1 or equivalent to -extra components whenever possible
wesolows authored Jul 5, 2012
44 MAKE_VERBOSE = V=1
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
45 GCC = $(DESTDIR)/usr/bin/gcc
46 GXX = $(DESTDIR)/usr/bin/g++
47 GCC.64 = $(GCC) -m64
48 GXX.64 = $(GXX) -m64
49
24adcab @wesolows OS-1846 platform node executes proto code during build
wesolows authored Jan 31, 2013
50 GCC.host = /opt/local/bin/gcc
51 GXX.host = /opt/local/bin/g++
52 GCC.host.64 = $(GCC.host) -m64
53 GXX.host.64 = $(GXX.host) -m64
54
80b887b @rmustacc OS-2091 add open source dmake to illumos-extra
rmustacc authored Mar 25, 2013
55 LEX = /opt/local/bin/lex
56 YACC = /opt/local/bin/yacc
33b7b25 @wesolows OS-2908 platform build does not fail when illumos-extra patches fail …
wesolows authored Apr 14, 2014
57 GPATCH = /opt/local/bin/gpatch
80b887b @rmustacc OS-2091 add open source dmake to illumos-extra
rmustacc authored Mar 25, 2013
58
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
59 SYSINCDIRS = /usr/include
60 SYSLIBDIRS = /usr/lib /lib
61
62 BUILD32 = yes
63 BUILD64 =
884461b @wesolows OS-2123 multilib: gcc can't install in parallel
wesolows authored Apr 22, 2013
64 SEPARATE_BUILD =
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
65
66 CPPFLAGS = $(SYSINCDIRS:%=-isystem $(DESTDIR)/%)
6938e49 @rmustacc OS-1639 illumos-extra should build with -zassert-deflib
rmustacc authored Oct 23, 2012
67
68 #
5c9b93a @jclulow OS-3150 upgrade NTP to ntp-dev-4.2.7p446
jclulow authored Jul 10, 2014
69 # We ship platform-private perl modules (e.g. from ntp) in this directory,
70 # and using this perl interpeter:
71 #
72 PATH_PERL = /usr/perl5/bin/perl
73 PERLLIBDIR = /usr/perl5/5.12/lib
74
75 #
80b887b @rmustacc OS-2091 add open source dmake to illumos-extra
rmustacc authored Mar 25, 2013
76 # These are all definitions that relate to Sun Make. There are basically two
77 # different sets that we care about. The first is the boostrap make. This is
78 # used to build the strap make. Once we have the strap make, it is used for all
79 # other makes. Beacuse MAKE is used extensively to mean GNU make in these
80 # makefiles, we instead use SUN_MAKE and SUM_MAKE_STRAP.
81 #
82 SUN_MAKE_STRAP=/opt/local/bin/dmake
3bb8978 @wesolows OS-3208 illumos-extra must not consume $ROOT/usr/bin
wesolows authored Jul 15, 2014
83 SUN_MAKE=$(STRAPPROTO)/usr/bin/dmake
80b887b @rmustacc OS-2091 add open source dmake to illumos-extra
rmustacc authored Mar 25, 2013
84
85 #
6938e49 @rmustacc OS-1639 illumos-extra should build with -zassert-deflib
rmustacc authored Oct 23, 2012
86 # Because of bugs in ntp, we need to be able to refer to the target specific
87 # flags as well as the generic flags later on.
88 #
89 ifneq ($(STRAP),strap)
90 GENLDFLAGS = -Wl,-zassert-deflib -Wl,-zfatal-warnings
91 endif
92 T32_LDFLAGS = $(SYSLIBDIRS:%=-L$(DESTDIR)/%)
93 T64_LDFLAGS = $(SYSLIBDIRS:%=-L$(DESTDIR)/%/64)
94 LDFLAGS = $(T32_LDFLAGS) $(GENLDFLAGS)
95 LDFLAGS.64 = $(T64_LDFLAGS) $(GENLDFLAGS)
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
96
97 AUTOCONF_CC = CC="$(GCC)"
98 AUTOCONF_CXX = CXX="$(GXX)"
99 AUTOCONF_CC.64 = CC="$(GCC.64)"
100 AUTOCONF_CXX.64 = CXX="$(GXX.64)"
101 AUTOCONF_CPPFLAGS = CPPFLAGS="$(CPPFLAGS)"
102 AUTOCONF_CFLAGS = CFLAGS="$(CFLAGS)"
103 AUTOCONF_CFLAGS.64 = CFLAGS="$(CFLAGS.64)"
104 AUTOCONF_LDFLAGS = LDFLAGS="$(LDFLAGS)"
105 AUTOCONF_LDFLAGS.64 = LDFLAGS="$(LDFLAGS.64)"
106 AUTOCONF_LIBS = LIBS="$(LIBS)"
107 AUTOCONF_LIBS.64 = LIBS="$(LIBS.64)"
108
109 AUTOCONF_OUT = config.status
884461b @wesolows OS-2123 multilib: gcc can't install in parallel
wesolows authored Apr 22, 2013
110 AUTOCONF_OUT.32 = $(OBJ.32)/$(AUTOCONF_OUT)
111 AUTOCONF_OUT.64 = $(OBJ.64)/$(AUTOCONF_OUT)
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
112
113 AUTOCONF_PREFIX = /usr
114
115 AUTOCONF_ENV = \
116 PKG_CONFIG_LIBDIR="" \
117 $(AUTOCONF_CC) \
118 $(AUTOCONF_CXX) \
119 $(AUTOCONF_CPPFLAGS) \
120 $(AUTOCONF_CFLAGS) \
121 $(AUTOCONF_LDFLAGS) \
122 $(AUTOCONF_LIBS)
123
124 AUTOCONF_ENV.64 = \
125 PKG_CONFIG_LIBDIR="" \
126 $(AUTOCONF_CC.64) \
127 $(AUTOCONF_CXX.64) \
128 $(AUTOCONF_CPPFLAGS) \
129 $(AUTOCONF_CFLAGS.64) \
130 $(AUTOCONF_LDFLAGS.64) \
131 $(AUTOCONF_LIBS.64)
132
133 AUTOCONF_OPTS = \
134 --prefix=$(AUTOCONF_PREFIX)
135
3dfd6c5 @wesolows OS-1332 openssl build system needs conversion
wesolows authored Jan 10, 2013
136 AUTOCONF_OPTS.32 = \
137 $(AUTOCONF_OPTS)
138
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
139 AUTOCONF_OPTS.64 = \
140 $(AUTOCONF_OPTS)
141
884461b @wesolows OS-2123 multilib: gcc can't install in parallel
wesolows authored Apr 22, 2013
142 ALL_TGT =
d6b1b54 @wesolows OS-1370 pass V=1 or equivalent to -extra components whenever possible
wesolows authored Jul 5, 2012
143 OVERRIDES = $(MAKE_VERBOSE)
144
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
145 TARBALL = $(VER).tar.gz
146 TARBALL_COMPRESS = -z
147
148 UNPACK_SENTINEL = configure
149 FROB_SENTINEL.32 = chmod 755 $(VER.32)/$(UNPACK_SENTINEL)
150 FROB_SENTINEL.64 = chmod 755 $(VER.64)/$(UNPACK_SENTINEL)
151
152 PATCHSTRIP = 1
153
154 APPLY_PATCHES.32 = \
33b7b25 @wesolows OS-2908 platform build does not fail when illumos-extra patches fail …
wesolows authored Apr 14, 2014
155 for p in $(PATCHES); do \
156 echo "Applying $$p"; \
157 $(GPATCH) -d .unpack32/$(VER) -p$(PATCHSTRIP) < "$$p" || exit 1; \
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
158 done
159
160 APPLY_PATCHES.64 = \
33b7b25 @wesolows OS-2908 platform build does not fail when illumos-extra patches fail …
wesolows authored Apr 14, 2014
161 for p in $(PATCHES); do \
162 echo "Applying $$p"; \
163 $(GPATCH) -d .unpack64/$(VER) -p$(PATCHSTRIP) < "$$p" || exit 1; \
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
164 done
165
2895e31 @jclulow OS-3330 NTP should ship with CTF data
jclulow authored Sep 9, 2014
166 MAKE_CTF = $(BASE)/../tools/make-ctf
167 MAKE_CTF.32 = $(MAKE_CTF) $(OBJ.32) $(CTF.32) $(VER)
168 MAKE_CTF.64 = $(MAKE_CTF) $(OBJ.64) $(CTF.64) $(VER)
169
9946ff0 @wesolows smartos-live#67 Support compiling cpp with gcc.
wesolows authored Jun 1, 2012
170 .DEFAULT_GOAL = all
Something went wrong with that request. Please try again.