Cross Reference: /illumos-gate/usr/src/cmd/sgs/packages/Makefile
Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
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
171
172
#
# 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 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
#
#
# ident "%Z%%M% %I% %E% SMI"
#
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# cmd/sgs/packages/Makefile
include $(SRC)/Makefile.master
include $(SRC)/cmd/sgs/Makefile.var
BUILDLOG= package_build.$(MACH).log
MACHS:sh= if [ "$MACH" = "sparc" ]; \
then echo "sparc sparcv9"; \
elif [ "$MACH" = "i386" ]; \
then echo "i386 amd64"; \
else echo "unknown"; \
fi
RDBDIRS= $(MACHS:%=../librtld_db/rdb_demo/%)
LDMAKEDIRS= $(MACHS:%=../libldmake/%)
SUBDIRS1= ../libconv \
.WAIT \
../libdl \
.WAIT \
../libelf \
.WAIT \
../liblddbg \
../librtld_db \
.WAIT \
../librtld \
../libcrle
SUBDIRS2 = ../rtld \
../rtld.4.x \
../libldstab \
../lari \
../ldprof \
../lddstub \
$(LDMAKEDIRS) \
../0@0 \
../tools \
$(RDBDIRS)
#
# Package dirs are directories which specifically
# have a 'package' target. This target is used to key
# off of whether a system build is performed
# or a SUNWonld build.
#
PKGDIRS= ../libcrle \
../libld \
../elfdump \
../crle \
../lari \
../ld \
../ldd \
../ldprof \
../mcs \
../moe \
../pvs
$(SUBDIRS1) $(SUBDIRS2) := TARGET = install
$(PKGDIRS) := TARGET = package
M32:sh= if [ "$MACH" = "sparc" ]; \
then echo sparc; \
elif [ "$MACH" = "i386" ]; \
then echo "$(VAR_I386_ARCH)"; \
else \
echo "unknown"; \
fi
../%: FRC
@ cd $@; pwd; $(MAKE) $(TARGET)
.KEEP_STATE_FILE: .make.state.$(MACH)
.KEEP_STATE:
.PARALLEL: $(SUBDIRS1) $(PKGDIRS) $(SUBDIRS2)
all clean clobber install: FRC
@ cd $(MACH); pwd; $(MAKE) $@
#
# invoke `package' to build this package from scratch. It will
# perform make install in the directories that contains components
# that this package is dependent upon
#
package: FRC
@/bin/time $(MAKE) package_build 2>&1 | tee $(BUILDLOG)
@ echo "===BUILD COMPLETED checking for warnings...==="
@ grep -i "warning:" $(BUILDLOG) | grep -v PSTAMP | cat
@ echo "==================done========================="
package_build: package_dep .WAIT package_chkmsg .WAIT install
package_chkmsg: FRC
@ cd ..; pwd; $(MAKE) chkmsg
package_dep: package_dep_ .WAIT $(SUBDIRS1) .WAIT \
$(PKGDIRS) .WAIT $(SUBDIRS2)
package_dep_: FRC
@ cd ../tools; pwd; $(MAKE) proto && ./proto
@ cd $(SRC)/head; pwd; $(MAKE) \
$(ROOT)/usr/include/dlfcn.h \
$(ROOT)/usr/include/gelf.h \
$(ROOT)/usr/include/libelf.h \
$(ROOT)/usr/include/proc_service.h \
$(ROOT)/usr/include/rtld_db.h \
$(ROOT)/usr/include/link.h
@ cd $(SRC)/lib/libproc; pwd; $(MAKE) install_h
$(VAR_SPEC_ON) @ cd $(SRC)/head; pwd; $(MAKE) \
$(VAR_SPEC_ON) $(ROOT)/usr/include/apptrace.h \
$(VAR_SPEC_ON) $(ROOT)/usr/include/apptrace_impl.h
@ cd $(SRC)/uts/common/sys; pwd; $(MAKE) \
$(ROOT)/usr/include/sys/elf.h \
$(ROOT)/usr/include/sys/elf_386.h \
$(ROOT)/usr/include/sys/elf_M32.h \
$(ROOT)/usr/include/sys/elf_SPARC.h \
$(ROOT)/usr/include/sys/elf_notes.h \
$(ROOT)/usr/include/sys/elf_amd64.h \
$(ROOT)/usr/include/sys/elftypes.h \
$(ROOT)/usr/include/sys/auxv.h \
$(ROOT)/usr/include/sys/auxv_SPARC.h \
$(ROOT)/usr/include/sys/auxv_386.h \
$(ROOT)/usr/include/sys/link.h \
$(ROOT)/usr/include/sys/note.h \
$(ROOT)/usr/include/sys/systeminfo.h
$(VAR_SPEC_ON) @ cd $(SRC)/uts/common/sys; pwd; $(MAKE) \
$(VAR_SPEC_ON) $(ROOT)/usr/include/sys/elf_ia64.h
@ cd $(SRC)/uts/$(M32)/sys; pwd; $(MAKE) \
$(ROOT)/usr/include/sys/machelf.h
$(VAR_SPEC_ON) @ cd $(SRC)/lib/abi; pwd; $(MAKE) spec
@ cd ../tools/$(MACH); pwd; $(MAKE) sgsmsg piglatin
@ cd ..; pwd; $(MAKE) _msg_sgsmsg
@ cd ..; pwd; $(MAKE) native-add
@ cd ../libconv; pwd; $(MAKE) all
@ cd ../link_audit; pwd; $(MAKE) package
@ cd ../messages/$(MACH); pwd; $(MAKE) test
@ cd ../sgsdemangler; pwd; $(MAKE) all
lint: FRC
$(MAKE) -f Makefile.lint lint
FRC: