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
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
27 HASHPROG
= hashmk1 spellin1
28 SHPROG
= spell compress
29 HASHTAB
= hlista hlistb hstop
30 BINPROG
= spellprog spellin hashmake hashcheck
31 PROG
= $(SHPROG
) $(BINPROG
) $(HASHPROG
) $(HASHTAB
) spellhist
33 SPELLPROGSRC
= spellprog.c hash.c hashlook.c huff.c
34 SPELLPROGOBJ
= $(SPELLPROGSRC
:%.c
=%.o
)
36 SPELLINSRC
= spellin.c huff.c
37 SPELLINOBJ
= $(SPELLINSRC
:%.c
=%.o
)
39 HASHCHECKSRC
= hashcheck.c hash.c huff.c
40 HASHCHECKOBJ
= $(HASHCHECKSRC
:%.c
=%.o
)
42 HASHMAKESRC
= hashmake.c hash.c
43 HASHMAKEOBJ
= $(HASHMAKESRC
:%.c
=%.o
)
45 SRCS
= $(SPELLPROGSRC
) spellin.c hashcheck.c hashmake.c
48 WORDS
= american british local list extra stop
49 TXTS
= compress.sh spell.sh
51 include ..
/Makefile.cmd
53 CERRWARN
+= -Wno-parentheses
55 XGETFLAGS
+= -a
-x spell.xcl
57 CLOBBERFILES
+= htemp1 htemp2
59 ROOTSPELLD
= $(ROOTLIB
)/spell
60 ROOTVARADMD
= $(ROOT
)/var
/adm
61 ROOTDIRS
= $(ROOTSPELLD
)
64 SPELLF
= spellprog hashmake hashcheck spellin hstop hlistb hlista compress
67 ROOTBINF
= $(BINF
:%=$(ROOTBIN
)/%)
68 ROOTSPELLF
= $(SPELLF
:%=$(ROOTSPELLD
)/%)
69 ROOTVARADMF
= $(VARADMF
:%=$(ROOTVARADMD
)/%)
72 $(ROOTSPELLD
)/hstop
$(ROOTSPELLD
)/hlistb \
73 $(ROOTSPELLD
)/hlista
:= FILEMODE
= 0644
74 $(ROOTVARADMF
) := FILEMODE
= 0666
76 spellin1 hashmk1
:= CC
= $(NATIVECC
)
77 spellin1 hashmk1
:= POST_PROCESS
=
78 spellin1 hashmk1
:= CPPFLAGS
=
79 spellin1 hashmk1
:= LDFLAGS
=
81 $(ROOTSPELLD
)/% $(ROOTVARADMD
)/% : %
88 spellprog
: $(SPELLPROGOBJ
)
89 $(LINK.c
) $(SPELLPROGOBJ
) -o
$@
$(LDLIBS
)
92 spellin spellin1
: $(SPELLINOBJ
)
93 $(LINK.c
) $(SPELLINOBJ
) -o
$@
$(LDLIBS
)
97 $(ECHO
) '\c' > spellhist
99 hashcheck
: $(HASHCHECKOBJ
)
100 $(LINK.c
) $(HASHCHECKOBJ
) -o
$@
$(LDLIBS
)
103 hashmake hashmk1
: $(HASHMAKEOBJ
)
104 $(LINK.c
) $(HASHMAKEOBJ
) -o
$@
$(LDLIBS
)
107 htemp1
: list local extra hashmk1
108 $(RM
) $@
; cat list local extra |
$(_SH_
) .
/hashmk1
> $@
110 hlista
: american
$(HASHPROG
) htemp1
111 $(RM
) htemp2
; .
/hashmk1
<american |
sort -u
- htemp1
>htemp2
112 $(RM
) $@
; .
/spellin1
`wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2
>$@
2>/dev
/null
115 hlistb
: british
$(HASHPROG
) htemp1
116 $(RM
) htemp2
; .
/hashmk1
<british |
sort -u
- htemp1
>htemp2
117 $(RM
) $@
; .
/spellin1
`wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2
>$@
2>/dev
/null
120 hstop
: stop
$(HASHPROG
)
121 $(RM
) htemp2
; .
/hashmk1
<stop |
sort -u
>htemp2
122 $(RM
) $@
; .
/spellin1
`wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2
>$@
2>/dev
/null
125 install: all $(ROOTDIRS
) $(ROOTBINF
) $(ROOTSPELLF
) $(ROOTVARADMF
)
134 include ..
/Makefile.targ