#sccs "@(#)ksh/shlib:Makefile	1.2"
#
# Makefile for Korn Shell Library
#

include $(MAKEINC)/Makepre.h

D = -DKSHELL $(BSD)
CC_CMD = $(CC) $D -O -c 
ARK = lib.a
OFILES = adjust.o \
arith.o \
assign.o \
assnum.o \
chkid.o \
cannon.o \
findnod.o \
gettree.o \
gmatch.o \
growaray.o \
gsort.o \
linknod.o \
ltou.o \
namescan.o \
namscan.o \
otou.o \
rjust.o \
tilde.o \
unassign.o \
utol.o \
utos.o \
valup.o 

DEPENDLIST = adjust.c \
arith.c \
assign.c \
assnum.c \
chkid.c \
cannon.c \
findnod.c \
gettree.c \
gmatch.c \
growaray.c \
gsort.c \
linknod.c \
ltou.c \
namescan.c \
namscan.c \
otou.c \
rjust.c \
tilde.c \
unassign.c \
utol.c \
utos.c \
valup.c 

all:	Makeincludes $(ARK)

Makeincludes: $(DEPENDLIST)
	$(INCCMD) $(DEPENDLIST) | $(SORT) | $(FILTER) > Makeincludes
	$(MAKE)

includes: $(DEPENDLIST)
	$(INCCMD) $(DEPENDLIST) | $(SORT) | $(FILTER) > Makeincludes

$(ARK):	$(OFILES) id.o
	 ar r $(ARK) $(OFILES) id.o

clean:
	rm -f *.o

clobber:	clean
	rm -f $(ARK) id.o

install:

arith.o:	shtype.h
chkid.o:	shtype.h
ltou.o:		shtype.h
rjust.o:	shtype.h
tilde.o:	builtins.h
tilde.o:	flags.h
tilde.o:	../sh/ksh_name.h
utol.o:		shtype.h

id.c: ../ksh.sl
	mkslid >id.c

populate:
	getunit

include Makeincludes
include $(MAKEINC)/Makepost.h

.c.o:
	$(CC_CMD) $*.c
