17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate# with the License. 87c478bd9Sstevel@tonic-gate# 97c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate# and limitations under the License. 137c478bd9Sstevel@tonic-gate# 147c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate# 207c478bd9Sstevel@tonic-gate# CDDL HEADER END 217c478bd9Sstevel@tonic-gate# 227c478bd9Sstevel@tonic-gate# 237c478bd9Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 257c478bd9Sstevel@tonic-gate# 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gateHASHPROG= hashmk1 spellin1 287c478bd9Sstevel@tonic-gateSHPROG= spell compress 297c478bd9Sstevel@tonic-gateHASHTAB= hlista hlistb hstop 307c478bd9Sstevel@tonic-gateBINPROG= spellprog spellin hashmake hashcheck 317c478bd9Sstevel@tonic-gatePROG= $(SHPROG) $(BINPROG) $(HASHPROG) $(HASHTAB) spellhist 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gateSPELLPROGSRC= spellprog.c hash.c hashlook.c huff.c 347c478bd9Sstevel@tonic-gateSPELLPROGOBJ= $(SPELLPROGSRC:%.c=%.o) 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gateSPELLINSRC= spellin.c huff.c 377c478bd9Sstevel@tonic-gateSPELLINOBJ= $(SPELLINSRC:%.c=%.o) 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gateHASHCHECKSRC= hashcheck.c hash.c huff.c 407c478bd9Sstevel@tonic-gateHASHCHECKOBJ= $(HASHCHECKSRC:%.c=%.o) 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gateHASHMAKESRC= hashmake.c hash.c 437c478bd9Sstevel@tonic-gateHASHMAKEOBJ= $(HASHMAKESRC:%.c=%.o) 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gateSRCS= $(SPELLPROGSRC) spellin.c hashcheck.c hashmake.c 467c478bd9Sstevel@tonic-gateOBJS= $(SRCS:%.c=%.o) 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gateWORDS= american british local list extra stop 497c478bd9Sstevel@tonic-gateTXTS= compress.sh spell.sh 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) 547014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gateXGETFLAGS += -a -x spell.xcl 577c478bd9Sstevel@tonic-gate 587c478bd9Sstevel@tonic-gateCLOBBERFILES += htemp1 htemp2 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gateROOTSPELLD = $(ROOTLIB)/spell 617c478bd9Sstevel@tonic-gateROOTVARADMD = $(ROOT)/var/adm 627c478bd9Sstevel@tonic-gateROOTDIRS= $(ROOTSPELLD) 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gateBINF= spell 657c478bd9Sstevel@tonic-gateSPELLF= spellprog hashmake hashcheck spellin hstop hlistb hlista compress 667c478bd9Sstevel@tonic-gateVARADMF= spellhist 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gateROOTBINF = $(BINF:%=$(ROOTBIN)/%) 697c478bd9Sstevel@tonic-gateROOTSPELLF = $(SPELLF:%=$(ROOTSPELLD)/%) 707c478bd9Sstevel@tonic-gateROOTVARADMF = $(VARADMF:%=$(ROOTVARADMD)/%) 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gateHASHFILEMODE = 0644 737c478bd9Sstevel@tonic-gate$(ROOTSPELLD)/hstop $(ROOTSPELLD)/hlistb \ 747c478bd9Sstevel@tonic-gate$(ROOTSPELLD)/hlista := FILEMODE = 0644 757c478bd9Sstevel@tonic-gate$(ROOTVARADMF) := FILEMODE = 0666 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gatespellin1 hashmk1 := CC = $(NATIVECC) 78dd49d7b3SRobert Mustacchispellin1 hashmk1 := LD = $(NATIVELD) 79dd49d7b3SRobert Mustacchispellin1 hashmk1 := CFLAGS = $(NATIVE_CFLAGS) 807c478bd9Sstevel@tonic-gatespellin1 hashmk1 := POST_PROCESS = 817c478bd9Sstevel@tonic-gatespellin1 hashmk1 := CPPFLAGS = 82dd49d7b3SRobert Mustacchispellin1 hashmk1 := LDLIBS = 835801b0f0SToomas Soomespellin1 hashmk1 := LDFLAGS = $(BDIRECT) 84dd49d7b3SRobert Mustacchispellin1 hashmk1 := NATIVE_LIBS = libc.so 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gate$(ROOTSPELLD)/% $(ROOTVARADMD)/% : % 877c478bd9Sstevel@tonic-gate $(INS.file) 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate.KEEP_STATE: 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gateall: $(PROG) $(TXTS) 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gatespellprog: $(SPELLPROGOBJ) 947c478bd9Sstevel@tonic-gate $(LINK.c) $(SPELLPROGOBJ) -o $@ $(LDLIBS) 957c478bd9Sstevel@tonic-gate $(POST_PROCESS) 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gatespellin spellin1: $(SPELLINOBJ) 987c478bd9Sstevel@tonic-gate $(LINK.c) $(SPELLINOBJ) -o $@ $(LDLIBS) 997c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gatespellhist: 1027c478bd9Sstevel@tonic-gate $(ECHO) '\c' > spellhist 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gatehashcheck: $(HASHCHECKOBJ) 1057c478bd9Sstevel@tonic-gate $(LINK.c) $(HASHCHECKOBJ) -o $@ $(LDLIBS) 1067c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gatehashmake hashmk1: $(HASHMAKEOBJ) 1097c478bd9Sstevel@tonic-gate $(LINK.c) $(HASHMAKEOBJ) -o $@ $(LDLIBS) 1107c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gatehtemp1: list local extra hashmk1 1137c478bd9Sstevel@tonic-gate $(RM) $@; cat list local extra | $(_SH_) ./hashmk1 > $@ 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gatehlista: american $(HASHPROG) htemp1 116*2e8cdddbSRobert Mustacchi $(RM) htemp2a; ./hashmk1 <american |sort -u - htemp1 >htemp2a 117*2e8cdddbSRobert Mustacchi $(RM) $@; ./spellin1 `wc htemp2a|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2a >$@ 118*2e8cdddbSRobert Mustacchi $(RM) htemp2a 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gatehlistb: british $(HASHPROG) htemp1 121*2e8cdddbSRobert Mustacchi $(RM) htemp2b; ./hashmk1 <british |sort -u - htemp1 >htemp2b 122*2e8cdddbSRobert Mustacchi $(RM) $@; ./spellin1 `wc htemp2b|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2b >$@ 123*2e8cdddbSRobert Mustacchi $(RM) htemp2b 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gatehstop: stop $(HASHPROG) 126*2e8cdddbSRobert Mustacchi $(RM) htemp2s; ./hashmk1 <stop | sort -u >htemp2s 127*2e8cdddbSRobert Mustacchi $(RM) $@; ./spellin1 `wc htemp2s|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2s >$@ 128*2e8cdddbSRobert Mustacchi $(RM) htemp2s 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gateinstall: all $(ROOTDIRS) $(ROOTBINF) $(ROOTSPELLF) $(ROOTVARADMF) 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gate$(ROOTDIRS): 1337c478bd9Sstevel@tonic-gate $(INS.dir) 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gatelint: lint_SRCS 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gateclean: 1387c478bd9Sstevel@tonic-gate $(RM) $(OBJS) 1397c478bd9Sstevel@tonic-gate 1407c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 141