/
Makefile.defs
122 lines (101 loc) · 3.06 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
#
# 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) 2012, Joyent, Inc.
#
BASE = $(PWD)
DESTDIR = $(BASE)/../proto
VER.32 = $(VER)-32$(STRAP)
VER.64 = $(VER)-64$(STRAP)
PATH = $(DESTDIR)/usr/bin:/usr/bin:/usr/sbin:/sbin:/opt/local/bin
MAKE = gmake
PARALLEL = -j128
MAKE_VERBOSE = V=1
GCC = $(DESTDIR)/usr/bin/gcc
GXX = $(DESTDIR)/usr/bin/g++
GCC.64 = $(GCC) -m64
GXX.64 = $(GXX) -m64
SYSINCDIRS = /usr/include
SYSLIBDIRS = /usr/lib /lib
BUILD32 = yes
BUILD64 =
CPPFLAGS = $(SYSINCDIRS:%=-isystem $(DESTDIR)/%)
#
# 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 = $(VER.32)/$(AUTOCONF_OUT)
AUTOCONF_OUT.64 = $(VER.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.64 = \
$(AUTOCONF_OPTS)
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 [ -f "$$p" ] && \
(cd .unpack32/$(VER) && gpatch -p$(PATCHSTRIP) < "../../$$p"); \
done
APPLY_PATCHES.64 = \
for p in $(PATCHES); do [ -f "$$p" ] && \
(cd .unpack64/$(VER) && gpatch -p$(PATCHSTRIP) < "../../$$p"); \
done
.DEFAULT_GOAL = all