2003-04-11 15:31:44 +04:00
|
|
|
# $NetBSD: Makefile,v 1.54 2003/04/11 11:31:44 dsl Exp $
|
1994-01-26 05:03:32 +03:00
|
|
|
|
|
|
|
LIB= sa
|
2001-12-12 04:48:43 +03:00
|
|
|
NOPIC= # defined
|
|
|
|
NOPROFILE=# defined
|
1994-01-26 05:03:32 +03:00
|
|
|
|
2001-03-31 13:45:11 +04:00
|
|
|
SA_USE_CREAD?= no # Read compressed kernels
|
|
|
|
SA_INCLUDE_NET?= yes # Netboot via TFTP, NFS
|
2002-02-18 02:22:22 +03:00
|
|
|
SA_USE_LOADFILE?= no # Generic executable loading support
|
1995-09-15 00:55:00 +04:00
|
|
|
|
1999-11-12 16:13:59 +03:00
|
|
|
#DEBUGCPPFLAGS= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG -DRPC_DEBUG -DRARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID
|
1999-05-07 18:28:50 +04:00
|
|
|
CPPFLAGS= -I${SADIR} ${SACPPFLAGS} ${SAMISCCPPFLAGS} \
|
1997-02-17 00:25:18 +03:00
|
|
|
-DCOMPAT_UFS ${DEBUGCPPFLAGS}
|
1995-09-15 00:55:00 +04:00
|
|
|
|
1997-10-27 01:08:38 +03:00
|
|
|
#COPTS+= -ansi -pedantic -Wall
|
1994-05-08 20:11:14 +04:00
|
|
|
|
1999-05-07 18:28:50 +04:00
|
|
|
.PATH.c: ${SADIR}
|
|
|
|
|
1994-05-08 20:11:14 +04:00
|
|
|
# stand routines
|
2002-03-15 16:23:34 +03:00
|
|
|
SRCS+= alloc.c bcmp.c bcopy.c bzero.c errno.c exit.c exec.c files.c \
|
|
|
|
getfile.c gets.c globals.c memcmp.c memcpy.c memmove.c memset.c \
|
|
|
|
panic.c printf.c snprintf.c sprintf.c strerror.c subr_prf.c \
|
|
|
|
twiddle.c vsprintf.c checkpasswd.c
|
1994-01-26 05:03:32 +03:00
|
|
|
|
|
|
|
# io routines
|
1997-01-24 01:19:56 +03:00
|
|
|
SRCS+= closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
|
|
|
|
SRCS+= close.c lseek.c open.c read.c write.c
|
|
|
|
.if (${SA_USE_CREAD} == "yes")
|
|
|
|
CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD
|
|
|
|
SRCS+= cread.c
|
|
|
|
.endif
|
1994-05-08 20:11:14 +04:00
|
|
|
|
1999-04-28 13:08:50 +04:00
|
|
|
.if (${SA_USE_LOADFILE} == "yes")
|
2001-10-31 20:20:45 +03:00
|
|
|
SRCS+= loadfile.c loadfile_aout.c loadfile_ecoff.c loadfile_elf32.c \
|
|
|
|
loadfile_elf64.c
|
1999-04-28 13:08:50 +04:00
|
|
|
.endif
|
2003-04-11 15:31:44 +04:00
|
|
|
|
1997-01-24 01:19:56 +03:00
|
|
|
.if (${SA_INCLUDE_NET} == "yes")
|
1994-05-08 20:11:14 +04:00
|
|
|
# network routines
|
2003-03-12 19:46:31 +03:00
|
|
|
SRCS+= arp.c ether.c ether_sprintf.c in_cksum.c net.c netif.c rpc.c udp.c
|
1994-05-08 20:11:14 +04:00
|
|
|
|
|
|
|
# network info services:
|
1995-09-15 00:55:00 +04:00
|
|
|
SRCS+= bootp.c rarp.c bootparam.c
|
1994-01-26 05:03:32 +03:00
|
|
|
|
1994-05-08 20:11:14 +04:00
|
|
|
# boot filesystems
|
1999-02-24 22:31:03 +03:00
|
|
|
SRCS+= nfs.c tftp.c
|
|
|
|
.endif
|
2003-04-11 15:31:44 +04:00
|
|
|
|
|
|
|
SRCS+= lfsv1.c lfsv2.c ffsv1.c ffsv2.c ufs_ls.c cd9660.c ustarfs.c dosfs.c
|
|
|
|
# for historic comparibility ufs == ffsv1
|
|
|
|
SRCS+= ufs.c
|
1994-01-26 05:03:32 +03:00
|
|
|
|
1997-06-01 01:21:13 +04:00
|
|
|
# only needed during build
|
|
|
|
libinstall::
|
|
|
|
|
2001-11-15 00:59:31 +03:00
|
|
|
.undef DESTDIR
|
1994-01-26 05:03:32 +03:00
|
|
|
.include <bsd.lib.mk>
|
1997-01-24 01:19:56 +03:00
|
|
|
|
|
|
|
lib${LIB}.o:: ${OBJS}
|
|
|
|
@echo building standard ${LIB} library
|
|
|
|
@rm -f lib${LIB}.o
|
|
|
|
@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
|