Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
# $NetBSD: Makefile,v 1.78 2012/08/10 16:05:27 joerg Exp $
|
2012-01-09 15:07:58 +01:00
|
|
|
|
|
|
|
LIB= sa
|
|
|
|
NOPIC= # defined
|
|
|
|
NOPROFILE=# defined
|
|
|
|
|
|
|
|
SA_USE_CREAD?= no # Read compressed kernels
|
|
|
|
SA_INCLUDE_NET?= yes # Netboot via TFTP, NFS
|
|
|
|
SA_USE_LOADFILE?= no # Generic executable loading support
|
|
|
|
SA_ENABLE_LS_OP?= no # Filesystems ls operation
|
|
|
|
|
|
|
|
#DEBUGCPPFLAGS= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG -DRPC_DEBUG -DRARP_DEBUG -DARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID
|
|
|
|
CPPFLAGS= -I${SADIR} ${SACPPFLAGS} ${SAMISCCPPFLAGS} \
|
|
|
|
-DCOMPAT_UFS ${DEBUGCPPFLAGS}
|
|
|
|
|
|
|
|
#COPTS+= -ansi -pedantic -Wall
|
|
|
|
|
|
|
|
.if defined(SA_EXTRADIR)
|
|
|
|
.-include "${SA_EXTRADIR}/Makefile.inc"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
.PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/string
|
2012-11-15 12:06:41 +01:00
|
|
|
.ifdef __MINIX
|
2012-01-25 13:29:07 +01:00
|
|
|
.PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/md
|
|
|
|
.endif
|
2012-01-09 15:07:58 +01:00
|
|
|
|
|
|
|
# stand routines
|
|
|
|
SRCS+= alloc.c errno.c exit.c files.c \
|
|
|
|
getfile.c gets.c globals.c \
|
|
|
|
panic.c printf.c qsort.c snprintf.c sprintf.c strerror.c \
|
|
|
|
subr_prf.c twiddle.c vsprintf.c checkpasswd.c
|
|
|
|
|
2012-01-25 13:29:07 +01:00
|
|
|
.if (${MACHINE_CPU} != "mips") && !defined(__MINIX)
|
2012-01-09 15:07:58 +01:00
|
|
|
SRCS+= exec.c
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# string routines
|
|
|
|
.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
|
|
|
|
SRCS+= memcmp.c memcpy.c memmove.c memset.c strchr.c
|
|
|
|
.endif
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
|
|
|
|
.ifndef __MINIX
|
|
|
|
SRCS+= bcopy.c bzero.c # Remove me eventually.
|
|
|
|
.endif
|
2012-01-09 15:07:58 +01:00
|
|
|
|
|
|
|
# io routines
|
|
|
|
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
|
|
|
|
.if (${SA_ENABLE_LS_OP} == "yes")
|
|
|
|
SRCS+= ls.c
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if (${SA_USE_LOADFILE} == "yes")
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
.ifndef __MINIX
|
|
|
|
SRCS+= loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \
|
|
|
|
loadfile_elf64.c lookup_elf64.c
|
|
|
|
.if (${MACHINE_CPU} != "mips")
|
2012-01-09 15:07:58 +01:00
|
|
|
SRCS+= loadfile_aout.c
|
|
|
|
.endif
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
.else
|
|
|
|
SRCS+= loadfile.c loadfile_elf32.c loadfile_elf64.c
|
|
|
|
.endif
|
2012-01-09 15:07:58 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if (${SA_INCLUDE_NET} == "yes")
|
|
|
|
# network routines
|
|
|
|
SRCS+= arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c ip.c
|
|
|
|
|
|
|
|
# network info services:
|
|
|
|
SRCS+= bootp.c rarp.c bootparam.c
|
|
|
|
|
|
|
|
# boot filesystems
|
|
|
|
SRCS+= nfs.c tftp.c
|
|
|
|
.endif
|
|
|
|
|
|
|
|
SRCS+= ffsv1.c ffsv2.c
|
|
|
|
SRCS+= lfsv1.c lfsv2.c
|
|
|
|
SRCS+= cd9660.c
|
|
|
|
SRCS+= ustarfs.c
|
|
|
|
SRCS+= dosfs.c
|
|
|
|
SRCS+= ext2fs.c
|
|
|
|
SRCS+= minixfs3.c
|
2012-11-15 12:06:41 +01:00
|
|
|
SRCS+= fnmatch.c
|
2012-01-09 15:07:58 +01:00
|
|
|
# for historic compatibility ufs == ffsv1
|
|
|
|
SRCS+= ufs.c
|
|
|
|
|
2012-01-25 13:29:07 +01:00
|
|
|
.if defined(__MINIX)
|
|
|
|
# NetBSD has it in libkern, MINIX lacks it
|
|
|
|
SRCS+= xlat_mbr_fstype.c
|
|
|
|
|
|
|
|
# NetBSD has it in libkern, MINIX has it in libc but not libminc...
|
|
|
|
SRCS+= md5c.c
|
|
|
|
.endif
|
|
|
|
|
2012-01-09 15:07:58 +01:00
|
|
|
# only needed during build
|
|
|
|
libinstall::
|
|
|
|
|
|
|
|
.undef DESTDIR
|
|
|
|
.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`
|
|
|
|
|
|
|
|
CPPFLAGS+= -Wno-pointer-sign
|
|
|
|
|
|
|
|
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 && ${MACHINE_ARCH} == "vax"
|
|
|
|
COPTS.bootp.c+= -O0
|
|
|
|
.endif
|