
NOPROFILE=noprofile
NOMAN=noman
LIB=glob

# special objects
OBJS=${.CURDIR}/../cp/cp \
	${.CURDIR}/../date/date \
	${.CURDIR}/../dd/dd \
	${.CURDIR}/../dtype/dtype \
	${.CURDIR}/../expr/expr \
	${.CURDIR}/../ftc/ftc \
	${.CURDIR}/../ifconfig/ifconfig \
	${.CURDIR}/../init/init \
	${.CURDIR}/../ls/ls \
	${.CURDIR}/../mount/mount \
	${.CURDIR}/../newfs/newfs  \
	${.CURDIR}/../onechar/onechar \
	${.CURDIR}/../restore/restore \
	${.CURDIR}/../rm/rm \
	${.CURDIR}/../route/route \
	${.CURDIR}/../rsh/rsh \
	${.CURDIR}/../sleep/sleep \
	${.CURDIR}/../stty/stty \
	${.CURDIR}/../sync/sync \
	${.CURDIR}/../syscall/syscall \
	${.CURDIR}/../tar/tar \
	${.CURDIR}/../test/test

# the following mess tries to prevent bringing in ALL of the
# locale/rune stuff from libc (about 10k of codesize).  But
# it just got more and more twisted (if you use something in
# libc which references another module that uses ctype, even
# if you the second symbol locally in libglob, if you didn't
# need it until resolving references in libc, thats when and
# where it will get pulled in.)  SO in essence, we would probably
# have to re-build most of libc to guarantee that we wont pull
# in locale. And for 10k, its just not worth it.

# local sources. 
XX_SRCS=ctype_.c 

# (things that use ctype in libc, etc)
XX_SRCS+=strtol.c strtoul.c atoi.c atol.c ctime.c vfscanf.c sscanf.c \
	getttyent.c
XX_SRCS+=gethostnamadr.c inet_addr.c inet_network.c rcmd.c res_query.c \
	ns_addr.c getnetent.c getnetbyname.c

XX_CLEANFILES+= strtol.c strtoul.c atoi.c atol.c ctime.c vfscanf.c sscanf.c \
	getttyent.c
XX_CLEANFILES+=gethostnamadr.c inet_addr.c inet_network.c rcmd.c res_query.c \
	ns_addr.c getnetent.c getnetbyname.c

# local includes
#CFLAGS+= -I${.CURDIR}/../include

strtol.c: /usr/src/lib/libc/stdlib/strtol.c
	cp /usr/src/lib/libc/stdlib/strtol.c strtol.c
strtoul.c: /usr/src/lib/libc/stdlib/strtoul.c
	cp /usr/src/lib/libc/stdlib/strtoul.c strtoul.c
atol.c: /usr/src/lib/libc/stdlib/atol.c
	cp /usr/src/lib/libc/stdlib/atol.c atol.c
atoi.c: /usr/src/lib/libc/stdlib/atoi.c
	cp /usr/src/lib/libc/stdlib/atoi.c atoi.c
ctime.c: /usr/src/lib/libc/gen/ctime.c
	cp /usr/src/lib/libc/gen/ctime.c ctime.c
getttyent.c: /usr/src/lib/libc/gen/getttyent.c
	cp /usr/src/lib/libc/gen/getttyent.c getttyent.c
vfscanf.c: /usr/src/lib/libc/stdio/vfscanf.c \
	/usr/src/lib/libc/stdio/local.h \
	/usr/src/lib/libc/stdio/floatio.h 
	cp /usr/src/lib/libc/stdio/vfscanf.c vfscanf.c
	cp /usr/src/lib/libc/stdio/local.h local.h
	cp /usr/src/lib/libc/stdio/floatio.h floatio.h
sscanf.c: /usr/src/lib/libc/stdio/sscanf.c
	cp /usr/src/lib/libc/stdio/sscanf.c sscanf.c

# the following net files are probably overkill, but the all
# reference ctype.h, so we'll compile them locally.
gethostnamadr.c: /usr/src/lib/libc/net/gethostnamadr.c
	cp /usr/src/lib/libc/net/gethostnamadr.c gethostnamadr.c
inet_addr.c: /usr/src/lib/libc/net/inet_addr.c
	cp /usr/src/lib/libc/net/inet_addr.c inet_addr.c
inet_network.c: /usr/src/lib/libc/net/inet_network.c
	cp /usr/src/lib/libc/net/inet_network.c inet_network.c
rcmd.c: /usr/src/lib/libc/net/rcmd.c
	cp /usr/src/lib/libc/net/rcmd.c rcmd.c
res_query.c: /usr/src/lib/libc/net/res_query.c
	cp /usr/src/lib/libc/net/res_query.c res_query.c

ns_addr.c: /usr/src/lib/libc/net/ns_addr.c
	cp /usr/src/lib/libc/net/ns_addr.c ns_addr.c
getnetent.c: /usr/src/lib/libc/net/getnetent.c
	cp /usr/src/lib/libc/net/getnetent.c getnetent.c
getnetbyname.c: /usr/src/lib/libc/net/getnetbyname.c
	cp /usr/src/lib/libc/net/getnetbyname.c getnetbyname.c

.include <bsd.lib.mk>

