Print this page
9852 enable ld(1) guidance and deflib assertions for the illumos build
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/spell/Makefile
+++ new/usr/src/cmd/spell/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License, Version 1.0 only
6 6 # (the "License"). You may not use this file except in compliance
7 7 # with the License.
8 8 #
9 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 # or http://www.opensolaris.org/os/licensing.
11 11 # See the License for the specific language governing permissions
12 12 # and limitations under the License.
13 13 #
14 14 # When distributing Covered Code, include this CDDL HEADER in each
15 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 # If applicable, add the following below this CDDL HEADER, with the
17 17 # fields enclosed by brackets "[]" replaced with your own identifying
18 18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 19 #
20 20 # CDDL HEADER END
21 21 #
22 22 #
23 23 # Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 26
27 27 HASHPROG= hashmk1 spellin1
28 28 SHPROG= spell compress
29 29 HASHTAB= hlista hlistb hstop
30 30 BINPROG= spellprog spellin hashmake hashcheck
31 31 PROG= $(SHPROG) $(BINPROG) $(HASHPROG) $(HASHTAB) spellhist
32 32
33 33 SPELLPROGSRC= spellprog.c hash.c hashlook.c huff.c
34 34 SPELLPROGOBJ= $(SPELLPROGSRC:%.c=%.o)
35 35
36 36 SPELLINSRC= spellin.c huff.c
37 37 SPELLINOBJ= $(SPELLINSRC:%.c=%.o)
38 38
39 39 HASHCHECKSRC= hashcheck.c hash.c huff.c
40 40 HASHCHECKOBJ= $(HASHCHECKSRC:%.c=%.o)
41 41
42 42 HASHMAKESRC= hashmake.c hash.c
43 43 HASHMAKEOBJ= $(HASHMAKESRC:%.c=%.o)
44 44
45 45 SRCS= $(SPELLPROGSRC) spellin.c hashcheck.c hashmake.c
46 46 OBJS= $(SRCS:%.c=%.o)
47 47
48 48 WORDS= american british local list extra stop
49 49 TXTS= compress.sh spell.sh
50 50
51 51 include ../Makefile.cmd
52 52
53 53 CFLAGS += $(CCVERBOSE)
54 54 CERRWARN += -_gcc=-Wno-parentheses
55 55
56 56 XGETFLAGS += -a -x spell.xcl
57 57
58 58 CLOBBERFILES += htemp1 htemp2
59 59
60 60 ROOTSPELLD = $(ROOTLIB)/spell
61 61 ROOTVARADMD = $(ROOT)/var/adm
62 62 ROOTDIRS= $(ROOTSPELLD)
63 63
64 64 BINF= spell
65 65 SPELLF= spellprog hashmake hashcheck spellin hstop hlistb hlista compress
66 66 VARADMF= spellhist
↓ open down ↓ |
66 lines elided |
↑ open up ↑ |
67 67
68 68 ROOTBINF = $(BINF:%=$(ROOTBIN)/%)
69 69 ROOTSPELLF = $(SPELLF:%=$(ROOTSPELLD)/%)
70 70 ROOTVARADMF = $(VARADMF:%=$(ROOTVARADMD)/%)
71 71
72 72 HASHFILEMODE = 0644
73 73 $(ROOTSPELLD)/hstop $(ROOTSPELLD)/hlistb \
74 74 $(ROOTSPELLD)/hlista := FILEMODE = 0644
75 75 $(ROOTVARADMF) := FILEMODE = 0666
76 76
77 +#
78 +# The native versions of these share targets with the target ones. Because of
79 +# that it is important that we override these variables. For example, LDLIBS
80 +# will add in the default LDLIBS.cmd which means that we'll link against the
81 +# wrong versions of libc.
82 +#
77 83 spellin1 hashmk1 := CC = $(NATIVECC)
78 84 spellin1 hashmk1 := POST_PROCESS =
79 85 spellin1 hashmk1 := CPPFLAGS =
80 -spellin1 hashmk1 := LDFLAGS =
86 +spellin1 hashmk1 := LDFLAGS = -Bdirect
87 +spellin1 hashmk1 := NATIVE_LIBS = libc.so
88 +spellin1 hashmk1 := LDLIBS =
81 89
82 90 $(ROOTSPELLD)/% $(ROOTVARADMD)/% : %
83 91 $(INS.file)
84 92
85 93 .KEEP_STATE:
86 94
87 -all: $(PROG) $(TXTS)
95 +all: $(PROG) $(TXTS)
88 96
89 97 spellprog: $(SPELLPROGOBJ)
90 98 $(LINK.c) $(SPELLPROGOBJ) -o $@ $(LDLIBS)
91 99 $(POST_PROCESS)
92 100
93 101 spellin spellin1: $(SPELLINOBJ)
94 102 $(LINK.c) $(SPELLINOBJ) -o $@ $(LDLIBS)
95 103 $(POST_PROCESS)
96 104
97 105 spellhist:
98 106 $(ECHO) '\c' > spellhist
99 107
100 108 hashcheck: $(HASHCHECKOBJ)
101 109 $(LINK.c) $(HASHCHECKOBJ) -o $@ $(LDLIBS)
102 110 $(POST_PROCESS)
103 111
104 112 hashmake hashmk1: $(HASHMAKEOBJ)
105 113 $(LINK.c) $(HASHMAKEOBJ) -o $@ $(LDLIBS)
106 114 $(POST_PROCESS)
107 115
108 116 htemp1: list local extra hashmk1
109 117 $(RM) $@; cat list local extra | $(_SH_) ./hashmk1 > $@
110 118
111 119 hlista: american $(HASHPROG) htemp1
112 120 $(RM) htemp2; ./hashmk1 <american |sort -u - htemp1 >htemp2
113 121 $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@
114 122 $(RM) htemp2
115 123
116 124 hlistb: british $(HASHPROG) htemp1
117 125 $(RM) htemp2; ./hashmk1 <british |sort -u - htemp1 >htemp2
118 126 $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@
119 127 $(RM) htemp2
120 128
121 129 hstop: stop $(HASHPROG)
122 130 $(RM) htemp2; ./hashmk1 <stop | sort -u >htemp2
123 131 $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@
124 132 $(RM) htemp2
125 133
126 134 install: all $(ROOTDIRS) $(ROOTBINF) $(ROOTSPELLF) $(ROOTVARADMF)
127 135
128 136 $(ROOTDIRS):
129 137 $(INS.dir)
130 138
131 139 lint: lint_SRCS
132 140
133 141 clean:
134 142 $(RM) $(OBJS)
135 143
136 144 include ../Makefile.targ
↓ open down ↓ |
39 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX