KernelAddon and KernelStaticLibrary don't include kernel, kernel arch, boot platform headers anymore.

Fixed the build of most of targets using these rules. Though the build can be still broken, feel free to fix.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18521 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2006-08-17 12:18:11 +00:00
parent 83333816a2
commit 44d5675324
28 changed files with 45 additions and 28 deletions

View File

@ -1,7 +1,7 @@
rule SetupKernel rule SetupKernel
{ {
# Usage SetupKernel <sources_or_objects> : <extra_cc_flags>; # Usage SetupKernel <sources_or_objects> : <extra_cc_flags> : <include_private_headers> ;
# #
# <sources_or_objects> - Ideally sources, otherwise HDRSEARCH can not be # <sources_or_objects> - Ideally sources, otherwise HDRSEARCH can not be
# set for the sources and the sources some header # set for the sources and the sources some header
@ -11,7 +11,9 @@ rule SetupKernel
local objects = $(sources:S=$(SUFOBJ)) ; local objects = $(sources:S=$(SUFOBJ)) ;
# add private kernel headers # add private kernel headers
SourceSysHdrs $(sources) : $(TARGET_PRIVATE_KERNEL_HEADERS) ; if $(3) != false {
SourceSysHdrs $(sources) : $(TARGET_PRIVATE_KERNEL_HEADERS) ;
}
local object ; local object ;
for object in $(objects) { for object in $(objects) {
@ -103,7 +105,7 @@ rule KernelAddon
Depends $(target) : $(beginGlue) $(endGlue) ; Depends $(target) : $(beginGlue) $(endGlue) ;
# compile and link # compile and link
SetupKernel $(sources) : $(TARGET_KERNEL_PIC_FLAGS) ; SetupKernel $(sources) : $(TARGET_KERNEL_PIC_FLAGS) : false ;
local linkFlags = -nostdlib -Xlinker -soname=\"$(target)\" ; local linkFlags = -nostdlib -Xlinker -soname=\"$(target)\" ;
LINKFLAGS on $(target) = [ on $(target) return $(LINKFLAGS) ] $(linkFlags) ; LINKFLAGS on $(target) = [ on $(target) return $(LINKFLAGS) ] $(linkFlags) ;
Main $(target) : $(sources) ; Main $(target) : $(sources) ;
@ -132,7 +134,7 @@ rule KernelStaticLibrary
# This is designed to take a set of sources and libraries and create # This is designed to take a set of sources and libraries and create
# a file called lib<name>.a # a file called lib<name>.a
SetupKernel $(2) : $(3) ; SetupKernel $(2) : $(3) : false ;
Library $(1) : $(2) ; Library $(1) : $(2) ;
} }

View File

@ -1,5 +1,7 @@
SubDir HAIKU_TOP src add-ons kernel bus_managers config_manager ; SubDir HAIKU_TOP src add-ons kernel bus_managers config_manager ;
UsePrivateHeaders kernel ;
KernelAddon config_manager : kernel bus_managers : KernelAddon config_manager : kernel bus_managers :
config_manager.c config_manager.c
; ;

View File

@ -2,6 +2,8 @@ SubDir HAIKU_TOP src add-ons kernel bus_managers pci arch x86 ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ; SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
UsePrivateHeaders kernel [ FDirName kernel arch x86 ] ;
KernelStaticLibrary pci_arch_bus_manager : KernelStaticLibrary pci_arch_bus_manager :
pci_bios.c pci_bios.c
pci_controller.c pci_controller.c

View File

@ -1,6 +1,7 @@
SubDir HAIKU_TOP src add-ons kernel console vga_text ; SubDir HAIKU_TOP src add-ons kernel console vga_text ;
UsePrivateHeaders kernel ; UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_ARCH) ]
[ FDirName kernel boot platform $(HAIKU_BOOT_PLATFORM) ] ;
KernelAddon vga_text : kernel console : KernelAddon vga_text : kernel console :
vga_text.c vga_text.c

View File

@ -1,6 +1,6 @@
SubDir HAIKU_TOP src add-ons kernel cpu x86 ; SubDir HAIKU_TOP src add-ons kernel cpu x86 ;
UsePrivateHeaders kernel ; UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_ARCH) ] ;
KernelAddon generic_x86 : kernel cpu : KernelAddon generic_x86 : kernel cpu :
generic_x86.cpp generic_x86.cpp

View File

@ -1,5 +1,7 @@
SubDir HAIKU_TOP src add-ons kernel drivers bus usb ; SubDir HAIKU_TOP src add-ons kernel drivers bus usb ;
UsePrivateHeaders kernel ;
KernelAddon usb_raw : kernel drivers bus usb : KernelAddon usb_raw : kernel drivers bus usb :
usb_raw.cpp usb_raw.cpp
; ;

View File

@ -1,5 +1,7 @@
SubDir HAIKU_TOP src add-ons kernel drivers common ; SubDir HAIKU_TOP src add-ons kernel drivers common ;
UsePrivateHeaders kernel ;
KernelAddon dprintf : kernel drivers dev : KernelAddon dprintf : kernel drivers dev :
dprintf.cpp dprintf.cpp
; ;

View File

@ -1,7 +1,6 @@
SubDir HAIKU_TOP src add-ons kernel drivers graphics vesa ; SubDir HAIKU_TOP src add-ons kernel drivers graphics vesa ;
UsePrivateHeaders graphics ; UsePrivateHeaders kernel graphics [ FDirName graphics vesa ] ;
UsePrivateHeaders [ FDirName graphics vesa ] ;
KernelAddon vesa : kernel drivers bin : KernelAddon vesa : kernel drivers bin :
device.cpp device.cpp

View File

@ -10,7 +10,7 @@ if ( $(TARGET_PLATFORM) != haiku ) {
# Unfortunately we get more than we want, namely all POSIX headers. # Unfortunately we get more than we want, namely all POSIX headers.
} }
UsePrivateHeaders net ; UsePrivateHeaders kernel net ;
# a) Userland stack version: # a) Userland stack version:

View File

@ -1,5 +1,8 @@
SubDir HAIKU_TOP src add-ons kernel drivers random ; SubDir HAIKU_TOP src add-ons kernel drivers random ;
UsePrivateHeaders kernel [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
UseArchHeaders $(TARGET_ARCH) ;
KernelAddon random : kernel drivers dev : KernelAddon random : kernel drivers dev :
driver.c driver.c
; ;

View File

@ -9,6 +9,8 @@ oldOPTIM = $(OPTIM) ;
SubDirC++Flags -Wall -Wno-multichar -fno-rtti ; SubDirC++Flags -Wall -Wno-multichar -fno-rtti ;
} }
UsePrivateHeaders kernel ;
KernelAddon iso9660 : kernel file_systems : KernelAddon iso9660 : kernel file_systems :
iso.c iso.c
iso9660.cpp iso9660.cpp

View File

@ -15,7 +15,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <Drivers.h> #include <Drivers.h>
#include <OS.h> #include <OS.h>
#include <lock.h>
#include <KernelExport.h> #include <KernelExport.h>
#include <string.h> #include <string.h>
#include <dirent.h> #include <dirent.h>
@ -24,6 +23,7 @@
#include <ByteOrder.h> #include <ByteOrder.h>
#include <fs_cache.h> #include <fs_cache.h>
#include "lock.h"
#include "rock.h" #include "rock.h"
#include "iso.h" #include "iso.h"

View File

@ -11,7 +11,7 @@
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <fs_interface.h> #include <fs_interface.h>
#include <lock.h> #include "lock.h"
#include <time.h> #include <time.h>
#include <endian.h> #include <endian.h>

View File

@ -18,7 +18,6 @@
#include <dirent.h> #include <dirent.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <time.h> #include <time.h>
#include <lock.h>
#include <malloc.h> #include <malloc.h>
#include <KernelExport.h> #include <KernelExport.h>
@ -34,6 +33,7 @@
#include <util/kernel_cpp.h> #include <util/kernel_cpp.h>
#include "lock.h"
#include "iso.h" #include "iso.h"
#include "iso9660.h" #include "iso9660.h"

View File

@ -10,7 +10,7 @@ if $(TARGET_PLATFORM) != haiku {
# Unfortunately we get more than we want, namely all POSIX headers. # Unfortunately we get more than we want, namely all POSIX headers.
} }
UsePrivateHeaders net ; UsePrivateHeaders kernel net ;
KernelAddon <module>arp : kernel haiku_network datalink_protocols : KernelAddon <module>arp : kernel haiku_network datalink_protocols :
arp.cpp arp.cpp

View File

@ -10,7 +10,7 @@ if $(TARGET_PLATFORM) != haiku {
# Unfortunately we get more than we want, namely all POSIX headers. # Unfortunately we get more than we want, namely all POSIX headers.
} }
UsePrivateHeaders net ; UsePrivateHeaders kernel net ;
KernelAddon ethernet_frame : kernel haiku_network datalink_protocols : KernelAddon ethernet_frame : kernel haiku_network datalink_protocols :
ethernet_frame.cpp ethernet_frame.cpp

View File

@ -10,7 +10,7 @@ if $(TARGET_PLATFORM) != haiku {
# Unfortunately we get more than we want, namely all POSIX headers. # Unfortunately we get more than we want, namely all POSIX headers.
} }
UsePrivateHeaders net ; UsePrivateHeaders kernel net ;
KernelAddon ethernet : kernel haiku_network devices : KernelAddon ethernet : kernel haiku_network devices :
ethernet.cpp ethernet.cpp

View File

@ -10,7 +10,7 @@ if $(TARGET_PLATFORM) != haiku {
# Unfortunately we get more than we want, namely all POSIX headers. # Unfortunately we get more than we want, namely all POSIX headers.
} }
UsePrivateHeaders net ; UsePrivateHeaders kernel net ;
KernelAddon icmp : kernel haiku_network protocols : KernelAddon icmp : kernel haiku_network protocols :
icmp.cpp icmp.cpp

View File

@ -10,7 +10,7 @@ if $(TARGET_PLATFORM) != haiku {
# Unfortunately we get more than we want, namely all POSIX headers. # Unfortunately we get more than we want, namely all POSIX headers.
} }
UsePrivateHeaders net ; UsePrivateHeaders kernel net ;
KernelAddon ipv4 : kernel haiku_network protocols : KernelAddon ipv4 : kernel haiku_network protocols :
ipv4.cpp ipv4.cpp

View File

@ -10,7 +10,7 @@ if $(TARGET_PLATFORM) != haiku {
# Unfortunately we get more than we want, namely all POSIX headers. # Unfortunately we get more than we want, namely all POSIX headers.
} }
UsePrivateHeaders net ; UsePrivateHeaders kernel net ;
KernelAddon tcp : kernel haiku_network protocols : KernelAddon tcp : kernel haiku_network protocols :
tcp.cpp tcp.cpp

View File

@ -10,7 +10,7 @@ if $(TARGET_PLATFORM) != haiku {
# Unfortunately we get more than we want, namely all POSIX headers. # Unfortunately we get more than we want, namely all POSIX headers.
} }
UsePrivateHeaders net ; UsePrivateHeaders kernel net ;
KernelAddon udp : kernel haiku_network protocols : KernelAddon udp : kernel haiku_network protocols :
udp.cpp udp.cpp

View File

@ -11,7 +11,7 @@ if $(TARGET_PLATFORM) != haiku {
} }
UsePrivateHeaders net ; UsePrivateHeaders kernel net ;
KernelAddon stack : kernel haiku_network : KernelAddon stack : kernel haiku_network :
datalink.cpp datalink.cpp

View File

@ -5,9 +5,8 @@ SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ;
SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ; SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ;
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ; UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders [ FDirName kernel util ] ; UsePrivateHeaders [ FDirName kernel util ] [ FDirName kernel arch $(TARGET_ARCH) ] ;
UsePrivateHeaders [ FDirName shared ] ; UsePrivateHeaders kernel shared storage ;
UsePrivateHeaders [ FDirName storage ] ;
{ {
local defines = local defines =

View File

@ -2,7 +2,7 @@ SubDir HAIKU_TOP src system boot loader file_systems amiga_ffs ;
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ; UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders [ FDirName storage ] ; UsePrivateHeaders kernel storage ;
#SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems amiga_ffs ; #SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems amiga_ffs ;

View File

@ -2,7 +2,7 @@ SubDir HAIKU_TOP src system boot loader file_systems bfs ;
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ; UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders [ FDirName storage ] ; UsePrivateHeaders kernel storage ;
SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems bfs ; SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems bfs ;

View File

@ -4,7 +4,7 @@ UseHeaders [ FDirName $(HAIKU_TOP) headers libs zlib ] ;
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ; UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders shared storage ; UsePrivateHeaders kernel shared storage ;
SubDirSysHdrs $(HAIKU_TOP) headers libs zlib ; SubDirSysHdrs $(HAIKU_TOP) headers libs zlib ;
SubDirC++Flags -fno-rtti ; SubDirC++Flags -fno-rtti ;

View File

@ -1,10 +1,10 @@
SubDir HAIKU_TOP src system boot loader net ; SubDir HAIKU_TOP src system boot loader net ;
UsePrivateHeaders kernel ; UsePrivateHeaders kernel [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
SubDirC++Flags -fno-rtti ; SubDirC++Flags -fno-rtti ;
KernelStaticLibrary boot_net.a : KernelStaticLibrary boot_net :
ARP.cpp ARP.cpp
ChainBuffer.cpp ChainBuffer.cpp
Ethernet.cpp Ethernet.cpp

View File

@ -5,6 +5,9 @@ SubDirHdrs [ FDirName $(TARGET_COMMON_DEBUG_OBJECT_DIR) system kernel ] ;
SubDirHdrs $(HAIKU_TOP) src add-ons kernel bus_managers ps2 ; SubDirHdrs $(HAIKU_TOP) src add-ons kernel bus_managers ps2 ;
SubDirHdrs $(SUBDIR) $(DOTDOT) generic ; SubDirHdrs $(SUBDIR) $(DOTDOT) generic ;
UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_ARCH) ]
[ FDirName kernel boot platform $(HAIKU_BOOT_PLATFORM) ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
KernelStaticLibrary libx86 : KernelStaticLibrary libx86 :