clean up variable use, standardize with other kernel library Makefiles.
rename 'NO_NET' variable to SA_INCLUDE_NET, which defaults to 'yes' but can be set differently. kill EXTRACFLAGS, add SACPPFLAGS (generated from CPPFLAGS by Makefile.inc) to CFLAGS. Add support for including gzipped-file read support, enabled by setting SA_USE_CREAD to yes (defaults to no).
This commit is contained in:
parent
97a36f083a
commit
2ce4559663
@ -1,27 +1,30 @@
|
|||||||
# $NetBSD: Makefile,v 1.14 1997/01/16 04:06:17 cgd Exp $
|
# $NetBSD: Makefile,v 1.15 1997/01/23 22:19:56 cgd Exp $
|
||||||
|
|
||||||
LIB= sa
|
LIB= sa
|
||||||
|
NOPIC=
|
||||||
|
NOPROFILE=
|
||||||
|
|
||||||
DIR=${SAREL}${SADIR}
|
SA_USE_CREAD?= no
|
||||||
|
SA_INCLUDE_NET?= yes
|
||||||
|
|
||||||
.PATH: ${DIR}
|
#DEBUGCPPFLAGS= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG -DRPC_DEBUG -DRARP_DEBUG -DDEBUG -DPARANOID
|
||||||
|
CPPFLAGS= -I. ${SACPPFLAGS} -DSTANDALONE -DCOMPAT_UFS ${DEBUGCPPFLAGS}
|
||||||
|
|
||||||
#DEBUGFLAGS= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG -DRPC_DEBUG -DRARP_DEBUG -DDEBUG -DPARANOID -Wall
|
#CFLAGS+= -ansi -pedantic -Wall
|
||||||
#DEBUGFLAGS= -ansi -pedantic -Wall
|
|
||||||
CFLAGS+=-DSTANDALONE -DCOMPAT_UFS $(DEBUGFLAGS) -I${DIR} -I${DIR}/../..
|
|
||||||
#
|
|
||||||
# Needed for PowerPC
|
|
||||||
CFLAGS+=$(EXTRACFLAGS)
|
|
||||||
|
|
||||||
# stand routines
|
# stand routines
|
||||||
SRCS+= alloc.c bcopy.c exit.c exec.c getfile.c gets.c globals.c \
|
SRCS+= alloc.c bcopy.c exit.c exec.c getfile.c gets.c globals.c \
|
||||||
memcmp.c memcpy.c printf.c strerror.c
|
memcmp.c memcpy.c printf.c strerror.c
|
||||||
|
|
||||||
# io routines
|
# io routines
|
||||||
SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c ioctl.c \
|
SRCS+= closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
|
||||||
lseek.c open.c nullfs.c read.c stat.c fstat.c write.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
|
||||||
|
|
||||||
.if !defined(NO_NET)
|
.if (${SA_INCLUDE_NET} == "yes")
|
||||||
# network routines
|
# network routines
|
||||||
SRCS+= arp.c ether.c in_cksum.c net.c netif.c rpc.c
|
SRCS+= arp.c ether.c in_cksum.c net.c netif.c rpc.c
|
||||||
.endif
|
.endif
|
||||||
@ -32,10 +35,11 @@ SRCS+= bootp.c rarp.c bootparam.c
|
|||||||
# boot filesystems
|
# boot filesystems
|
||||||
SRCS+= ufs.c nfs.c cd9660.c
|
SRCS+= ufs.c nfs.c cd9660.c
|
||||||
|
|
||||||
NOPROFILE=
|
|
||||||
NOPIC=
|
|
||||||
OBJMACHINE=
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
.include <bsd.lib.mk>
|
||||||
|
|
||||||
|
lib${LIB}.o:: ${OBJS}
|
||||||
|
@echo building standard ${LIB} library
|
||||||
|
@rm -f lib${LIB}.o
|
||||||
|
@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
|
||||||
|
Loading…
Reference in New Issue
Block a user