New sources layout

Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
This commit is contained in:
Lionel Sambuc 2014-07-28 21:19:37 +02:00
parent 428aa25dc6
commit 433d6423c3
3138 changed files with 693 additions and 606 deletions

View file

@ -137,10 +137,9 @@ _SRC_TOP_OBJ_=
# _SUBDIR is used to set SUBDIR, after removing directories that have # _SUBDIR is used to set SUBDIR, after removing directories that have
# BUILD_${dir}=no, or that have no ${dir}/Makefile. # BUILD_${dir}=no, or that have no ${dir}/Makefile.
# #
_SUBDIR= tools lib include gnu external crypto/external minix bin games _SUBDIR= tools lib include gnu external crypto/external bin games
.if defined(__MINIX) .if defined(__MINIX)
_SUBDIR+= commands man benchmarks test _SUBDIR+= minix
_SUBDIR+= kernel servers drivers
.endif # defined(__MINIX) .endif # defined(__MINIX)
_SUBDIR+= libexec sbin usr.bin _SUBDIR+= libexec sbin usr.bin
_SUBDIR+= usr.sbin share sys etc tests compat _SUBDIR+= usr.sbin share sys etc tests compat
@ -168,7 +167,7 @@ afterinstall: .PHONY .MAKE
.if !defined(__MINIX) .if !defined(__MINIX)
${MAKEDIRTARGET} share/man makedb ${MAKEDIRTARGET} share/man makedb
.else .else
${MAKEDIRTARGET} man makedb ${MAKEDIRTARGET} minix/man makedb
.endif # !defined(__MINIX) .endif # !defined(__MINIX)
.endif .endif
.if (${MKUNPRIVED} != "no" && ${MKINFO} != "no") .if (${MKUNPRIVED} != "no" && ${MKINFO} != "no")

View file

@ -1 +0,0 @@
BINDIR=/usr/benchmarks/unixbench

View file

@ -1,6 +0,0 @@
PROG= tcpstat
CPPFLAGS+= -I${NETBSDSRCDIR}/servers -D'ARGS(a)=a'
MAN=
.include <bsd.prog.mk>

View file

@ -1,5 +0,0 @@
PROG= udpstat
CPPFLAGS+= -I${NETBSDSRCDIR}/servers -D'ARGS(a)=a'
MAN=
.include <bsd.prog.mk>

View file

@ -1,6 +0,0 @@
PROG= writeisofs
MAN=
CPPFLAGS+= -I${NETBSDSRCDIR}/include/arch/${MACHINE_ARCH}/include
.include <bsd.prog.mk>

View file

@ -1,82 +0,0 @@
# Makefile for all device drivers.
#
.include <bsd.own.mk>
.if ${MKIMAGEONLY} != "yes"
# The default case
# Drivers available on all platforms
SUBDIR= hello \
log \
mmc \
pty \
random \
tty \
uds \
usb_storage \
vnd \
readclock
.if ${MACHINE_ARCH} == "i386"
SUBDIR+= ahci \
amddev \
atl2 \
at_wini \
audio \
dec21140A \
dp8390 \
dpeth \
e1000 \
fbd \
filter \
floppy \
fxp \
lance \
orinoco \
pci pckbd \
printer \
rtl8139 \
rtl8169 \
ti1225 \
vbox \
acpi \
virtio_blk \
virtio_net
.endif
.if ${MACHINE_ARCH} == "earm"
SUBDIR+= bmp085 \
cat24c256 \
fb \
gpio \
i2c \
lan8710a \
sht21 \
tda19988 \
tps65217 \
tps65950 \
tsl2550 \
usbd
.endif
.endif # ${MKIMAGEONLY} != "yes"
.if ${MKIMAGEONLY} == "yes"
# MKIMAGEONLY builds are specialized builds that are targeted
# at being small.
SUBDIR= tty
.if ${MACHINE_ARCH} == "i386"
SUBDIR+= at_wini \
floppy \
pci \
pckbd
.endif
.endif # ${MKIMAGEONLY} == "yes"
# memory driver must be last for ramdisk image
SUBDIR+= ramdisk .WAIT memory
.include <bsd.subdir.mk>

View file

@ -1,7 +0,0 @@
# Makefile for all audio drivers.
.include <bsd.own.mk>
SUBDIR= .WAIT es1370 es1371 sb16
.include <bsd.subdir.mk>

View file

@ -1,8 +0,0 @@
.include <bsd.own.mk>
DPADD+= ${LIBAUDIODRIVER} ${LIBCHARDRIVER} ${LIBSYS}
LDADD+= -laudiodriver -lchardriver -lsys
.if exists(${.CURDIR}/../../Makefile.inc)
.include "${.CURDIR}/../../Makefile.inc"
.endif

View file

@ -1,13 +0,0 @@
# Generate binary keymaps.
.include <bsd.own.mk>
FILES= dvorak.map french.map german.map italian.map japanese.map \
latin-america.map norwegian.map polish.map russian-cp866.map \
russian.map scandinavian.map spanish.map uk.map \
us-std.map us-swap.map russian-cp1251.map \
ukraine-koi8-u.map portuguese.map abnt2.map
.include "Makefile.inc"
.include <bsd.prog.mk>

View file

@ -1,13 +0,0 @@
FILESDIR= /usr/lib/keymaps
.SUFFIXES: .src .map
.src.map:
${_MKTARGET_CREATE}
${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} ${HOST_LDFLAGS} -DKEYSRC=\"$<\" -o ${.OBJDIR}/${.TARGET}_genmap ${.CURDIR}/genmap.c
${.OBJDIR}/${.TARGET}_genmap > ${.OBJDIR}/${.TARGET}
rm -f ${.OBJDIR}/${.TARGET}_genmap
realall: ${FILES}
CLEANFILES+= ${FILES}

View file

@ -203,9 +203,9 @@ MAKEDEV: ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \
.else .else
MAKEDEV: .PHONY MAKEDEV: .PHONY
if [ ${MKUNPRIVED} != "yes" ]; then \ if [ ${MKUNPRIVED} != "yes" ]; then \
cd ${DESTDIR}/dev && sh ${NETBSDSRCDIR}/commands/MAKEDEV/MAKEDEV.sh -s; \ cd ${DESTDIR}/dev && sh ${NETBSDSRCDIR}/minix/commands/MAKEDEV/MAKEDEV.sh -s; \
else \ else \
sh ${NETBSDSRCDIR}/commands/MAKEDEV/MAKEDEV.sh -m -s >> ${DESTDIR}/METALOG; \ sh ${NETBSDSRCDIR}/minix/commands/MAKEDEV/MAKEDEV.sh -m -s >> ${DESTDIR}/METALOG; \
fi fi
.endif # !defined(__MINIX) .endif # !defined(__MINIX)
@ -448,7 +448,7 @@ install-etc-files-safe: .PHONY .MAKE check_DESTDIR MAKEDEV
${_MKMSG_INSTALL} ${DESTDIR}/etc/rc.capes ${_MKMSG_INSTALL} ${DESTDIR}/etc/rc.capes
${INSTALL_DIR} ${DESTDIR}/etc/rc.capes ${INSTALL_DIR} ${DESTDIR}/etc/rc.capes
${INSTALL_FILE} -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} ${NETBSDSRCDIR}/etc/rc.capes/* ${DESTDIR}/etc/rc.capes ${INSTALL_FILE} -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} ${NETBSDSRCDIR}/etc/rc.capes/* ${DESTDIR}/etc/rc.capes
${INSTALL_FILE} -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} ${NETBSDSRCDIR}/drivers/usbd/usbd.conf ${DESTDIR}/etc/system.conf.d/usbd ${INSTALL_FILE} -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} ${NETBSDSRCDIR}/minix/drivers/usb/usbd/usbd.conf ${DESTDIR}/etc/system.conf.d/usbd
.endif # Minix/earm specific .endif # Minix/earm specific
.for subdir in . defaults mtree .for subdir in . defaults mtree
${MAKEDIRTARGET} ${subdir} configinstall ${MAKEDIRTARGET} ${subdir} configinstall

View file

@ -37,11 +37,6 @@ INCS+= ssp/ssp.h ssp/stdio.h ssp/string.h ssp/strings.h ssp/unistd.h
INCS+= ieeefp.h INCS+= ieeefp.h
.endif .endif
.if defined(__MINIX)
# MINIX Specific headers.
INCS+= env.h fetch.h lib.h libutil.h varargs.h
.endif
.include <bsd.own.mk> .include <bsd.own.mk>
@ -50,17 +45,11 @@ INCSDIR= /usr/include
.if defined(__MINIX) .if defined(__MINIX)
# RPC is not compiled in the libc. This include also needs # RPC is not compiled in the libc. This include also needs
# rpcgen, which can be compiled if needed. # rpcgen, which can be compiled if needed.
SUBDIR+= ../minix/include
.else .else
SUBDIR= rpc SUBDIR= rpc
.endif # defined(__MINIX) .endif # defined(__MINIX)
SUBDIR+= ../common/include/prop SUBDIR+= ../common/include/prop
.if defined(__MINIX)
SUBDIR+= arch sys minix
SUBDIR+= net
SUBDIR+= ddekit
SUBDIR+= libdde
.endif # defined(__MINIX)
SUBDIR+= ../common/include/ppath SUBDIR+= ../common/include/ppath
.include <bsd.prog.mk> .include <bsd.prog.mk>

View file

@ -19,59 +19,60 @@ SUBDIR+= ../external/gpl3/gcc/lib/libgcc .WAIT
. endif . endif
.endif .endif
.if defined(__MINIX)
#LSC MINIX libc depends on #LSC MINIX libc depends on
# - libminlib because of minix/malloc-debug.c # - libminlib because of minix/lib/libc/malloc-debug.c
# - libmthread because of sys/lib/libunwind # - libmthread because of sys/lib/libunwind
SUBDIR+= libminlib SUBDIR+= ../minix/lib/libminlib
SUBDIR+= .WAIT SUBDIR+= .WAIT
SUBDIR+= libsys SUBDIR+= ../minix/lib/libsys
SUBDIR+= libmthread SUBDIR+= ../minix/lib/libmthread
SUBDIR+= .WAIT SUBDIR+= .WAIT
.endif # defined(__MINIX)
SUBDIR+= libc SUBDIR+= libc
SUBDIR+= .WAIT SUBDIR+= .WAIT
.if defined(__MINIX) .if defined(__MINIX)
SUBDIR+= libasyn \ SUBDIR+= ../minix/lib/libasyn \
libaudiodriver \ ../minix/lib/libaudiodriver \
libbdev \ ../minix/lib/libbdev \
libblockdriver \ ../minix/lib/libblockdriver \
libchardriver \ ../minix/lib/libchardriver \
libcompat_minix \ ../minix/lib/libcompat_minix \
libddekit \ ../minix/lib/libddekit \
libdevman \ ../minix/lib/libdevman \
libexec \ ../minix/lib/libexec \
libfetch \ ../minix/lib/libfetch \
libinputdriver \ ../minix/lib/libinputdriver \
libminc \ ../minix/lib/libminc \
libminixfs \ ../minix/lib/libminixfs \
libnetdriver \ ../minix/lib/libnetdriver \
libsffs \ ../minix/lib/libsffs \
libtimers \ ../minix/lib/libtimers \
libusb \ ../minix/lib/libusb \
libvtreefs ../minix/lib/libvtreefs
.if (${HAVE_LIBGCC} == "no") .if (${HAVE_LIBGCC} == "no")
SUBDIR+= libgcc_s_empty SUBDIR+= ../minix/lib/libgcc_s_empty
.endif .endif
.if (${MKLWIP} == "yes") .if (${MKLWIP} == "yes")
SUBDIR+= liblwip \ SUBDIR+= ../minix/lib/liblwip \
libnetsock ../minix/lib/libnetsock
.endif .endif
.if (${MACHINE_ARCH} == "i386") .if (${MACHINE_ARCH} == "i386")
SUBDIR+= libhgfs \ SUBDIR+= ../minix/lib/libhgfs \
libvassert \ ../minix/lib/libvassert \
libvboxfs \ ../minix/lib/libvboxfs \
libvirtio ../minix/lib/libvirtio
.endif .endif
.if (${MACHINE_ARCH} == "earm") .if (${MACHINE_ARCH} == "earm")
SUBDIR+= libclkconf \ SUBDIR+= ../minix/lib/libclkconf \
libgpio \ ../minix/lib/libgpio \
libi2cdriver ../minix/lib/libi2cdriver
.endif .endif
.endif # defined(__MINIX) .endif # defined(__MINIX)

View file

@ -111,7 +111,7 @@ SUBDIR+= pkgconfig
.include "${.CURDIR}/thread-stub/Makefile.inc" .include "${.CURDIR}/thread-stub/Makefile.inc"
.include "${.CURDIR}/time/Makefile.inc" .include "${.CURDIR}/time/Makefile.inc"
.if defined(__MINIX) .if defined(__MINIX)
.include "${.CURDIR}/sys-minix/Makefile.inc" .include "${NETBSDSRCDIR}/minix/lib/libc/sys/Makefile.inc"
.else .else
.include "${.CURDIR}/tls/Makefile.inc" .include "${.CURDIR}/tls/Makefile.inc"
.endif .endif

View file

@ -27,7 +27,7 @@ SRCS+= _setjmp.S
SRCS+= sigsetjmp.S SRCS+= sigsetjmp.S
.if defined(__MINIX) .if defined(__MINIX)
# Already defined in sys-minix # Already defined in minix/lib/libc/arch/arm/sys
.else .else
SRCS+= makecontext.c resumecontext.c swapcontext.S SRCS+= makecontext.c resumecontext.c swapcontext.S

View file

@ -9,7 +9,7 @@ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S fabs.S \
SRCS+= setjmp.S _setjmp.S sigsetjmp.S SRCS+= setjmp.S _setjmp.S sigsetjmp.S
.if defined(__MINIX) .if defined(__MINIX)
# Already defined in sys-minix # Already defined in minix/lib/libc/arch/i386/sys
.else .else
SRCS+= resumecontext.S swapcontext.S SRCS+= resumecontext.S swapcontext.S
.endif .endif

View file

@ -3,7 +3,7 @@
# gen sources # gen sources
.if defined(__MINIX) .if defined(__MINIX)
.PATH: ${.CURDIR}/gen/minix .PATH: ${NETBSDSRCDIR}/minix/lib/libc/gen
.endif # defined(__MINIX) .endif # defined(__MINIX)
.PATH: ${ARCHDIR}/gen ${.CURDIR}/gen .PATH: ${ARCHDIR}/gen ${.CURDIR}/gen

View file

@ -3,7 +3,7 @@
# net sources # net sources
.if defined(__MINIX) .if defined(__MINIX)
.PATH: ${.CURDIR}/net/minix .PATH: ${NETBSDSRCDIR}/minix/lib/libc/net
CPPFLAGS.getpeereid.c+= -D_MINIX_SYSTEM=1 CPPFLAGS.getpeereid.c+= -D_MINIX_SYSTEM=1
CPPFLAGS.getsockopt.c+= -D_MINIX_SYSTEM=1 CPPFLAGS.getsockopt.c+= -D_MINIX_SYSTEM=1

View file

@ -28,7 +28,7 @@ SRCS+= erand48_ieee754.c
.if (${USE_JEMALLOC} != "no") .if (${USE_JEMALLOC} != "no")
SRCS+= jemalloc.c SRCS+= jemalloc.c
.elif (${USE_MINIXMALLOC:Uno} != "no") .elif (${USE_MINIXMALLOC:Uno} != "no")
.include "../minix/Makefile.inc" .include "${NETBSDSRCDIR}/minix/lib/libc/Makefile.inc"
.else .else
SRCS+= malloc.c SRCS+= malloc.c
.endif .endif

View file

@ -1,4 +0,0 @@
MAN=
.include <bsd.man.mk>
.include <bsd.subdir.mk>

View file

@ -1,5 +1,20 @@
# $NetBSD: Makefile,v 1.18 2012/06/14 04:14:36 riz Exp $
SUBDIR+= llvm SUBDIR+= include .WAIT
SUBDIR+= benchmarks
SUBDIR+= bin
SUBDIR+= commands
SUBDIR+= drivers
SUBDIR+= fs
SUBDIR+= kernel
SUBDIR+= lib
SUBDIR+= llvm
SUBDIR+= man
SUBDIR+= net
SUBDIR+= sbin
SUBDIR+= servers
SUBDIR+= share
SUBDIR+= tests
SUBDIR+= usr.bin
SUBDIR+= usr.sbin
.include <bsd.subdir.mk> .include <bsd.subdir.mk>

3
minix/Makefile.inc Normal file
View file

@ -0,0 +1,3 @@
WARNS?= 0
.include "../Makefile.inc"

View file

@ -0,0 +1 @@
.include "../Makefile.inc"

View file

@ -1,5 +1,8 @@
SCRIPTS=Run SCRIPTS=Run
SUBDIR=pgms testdir run.sh SUBDIR=pgms testdir run.sh
.include "Makefile.inc"
BINDIR=/usr/benchmarks/unixbench
.include <bsd.prog.mk> .include <bsd.prog.mk>
.include <bsd.subdir.mk> .include <bsd.subdir.mk>

View file

@ -1,3 +1,5 @@
SCRIPTS=run.sh SCRIPTS=run.sh
SCRIPTSNAME=run.sh SCRIPTSNAME=run.sh
SCRIPTSDIR=/usr/benchmarks/unixbench
.include <bsd.prog.mk> .include <bsd.prog.mk>

2
minix/bin/Makefile Normal file
View file

@ -0,0 +1,2 @@
.include <bsd.subdir.mk>

3
minix/bin/Makefile.inc Normal file
View file

@ -0,0 +1,3 @@
BINDIR?=/bin
.include "../Makefile.inc"

Some files were not shown because too many files have changed in this diff Show more