Cleanup libbe.so build system, using MergeObject power:

a) Make main Jamfile more easier to understand to new (and old even) developers. 
   Currently it looks a little too messy compared to usual Haiku's jamfiles.
b) Get ride of app.src, interface.src, storage.src and support.src includes files.
c) Move each kit objects files built back to their respective
   objects/x86.R1/kits/{app|interface|storage|support} location.
d) Move private headers and source search hints back to each respective kit
   Jamfiles. Most of them, at least.

{app|interface|storage|support}.src files effective deletion will come soon.
Hope I didn't break all *again* :-\



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13901 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2005-08-05 09:56:03 +00:00
parent 7d11acca6d
commit cb5da7de09
5 changed files with 292 additions and 104 deletions

View File

@ -17,81 +17,54 @@ if $(RUN_WITHOUT_APP_SERVER) != 0 {
SubDirC++Flags $(defines) ;
}
# Collect libopenbeos.so sources.
subdirs = app interface support storage ;
for subdir in $(subdirs) {
local dir = [ FDirName $(SUBDIR) $(subdir) ] ;
local file = $(subdir:S=.src) ;
include $(file:D=$(dir)) ;
UsePrivateHeaders $(subdir) ;
SEARCH_SOURCE += $(dir) ;
}
UsePrivateHeaders [ FDirName kernel util ] ; # For KMessage.h
UsePrivateHeaders syslog_daemon ; # For syslog.cpp
UsePrivateHeaders shared app [ FDirName servers app ] ;
UsePrivateHeaders kernel ; # for syscalls.h
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders [ FDirName kernel util ] ; # KMessage.h
UsePrivateHeaders input ;
UsePrivateHeaders syslog_daemon ;
SEARCH on [ FGristFiles KMessage.cpp ]
= [ FDirName $(OBOS_TOP) src system kernel messaging ] ;
# Add subsubdirs to the SEARCH_SOURCE.
SEARCH_SOURCE += [ FDirName $(SUBDIR) interface BTextView ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) storage mime ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) storage sniffer ] ;
LIBBE_SOURCE =
$(APP_KIT_SOURCE)
$(INTERFACE_KIT_SOURCE)
$(SUPPORT_KIT_SOURCE)
$(STORAGE_KIT_SOURCE)
KMessage.cpp
;
LIBBE_SOURCE_HAIKU_ONLY =
$(STORAGE_KIT_SOURCE_HAIKU_ONLY)
;
# Build our libbe.so
AddResources libbe.so : libbe_version.rdef ;
SharedLibrary be :
$(LIBBE_SOURCE) $(LIBBE_SOURCE_HAIKU_ONLY)
;
KMessage.cpp
:
<libbe>app_kit.o
<libbe>interface_kit.o
<libbe>storage_kit.o
<libbe>storage_diskdevice_kit.o
<libbe>support_kit.o
SharedLibraryFromObjects openbeos :
$(LIBBE_SOURCE:S=.o)
[ FGristFiles syslog.o ]
;
Objects syslog.cpp ;
LinkSharedOSLibs libbe.so :
libroot.so # make sure it links against our libroot.so
stdc++.r4
;
MakeLocate <develop>libbe.so : $(OBOS_STLIB_DIR) ;
RelSymLink <develop>libbe.so : libbe.so ;
# Build libopenbeos.so
SEARCH on [ FGristFiles syslog.cpp ]
= [ FDirName $(OBOS_TOP) src system libroot posix ] ;
SharedLibrary openbeos :
syslog.cpp
:
<libbe>app_kit.o
<libbe>interface_kit.o
<libbe>storage_kit.o
<libbe>support_kit.o
LinkSharedOSLibs libopenbeos.so :
libbeadapter.so
net
stdc++.r4
;
# The adapter library we need (Storage Kit).
#
SharedLibrary beadapter :
LibBeAdapter.cpp
strlcat.c
strlcpy.c
strcasestr.c
;
LinkSharedOSLibs libbeadapter.so :
be
;
# Note: If you want to use /boot/home/config/lib/libopenbeos.so in another
# rule, use the identifier <boot!home!config!lib>libopenbeos.so, otherwise
# libopenbeos.so.
LOCATE on <boot!home!config!lib>libopenbeos.so
<boot!home!config!lib>libbeadapter.so = /boot/home/config/lib ;
File <boot!home!config!lib>libopenbeos.so : libopenbeos.so ;
@ -99,30 +72,20 @@ File <boot!home!config!lib>libbeadapter.so : libbeadapter.so ;
Includes <boot!home!config!lib>libopenbeos.so
: <boot!home!config!lib>libbeadapter.so ;
SEARCH on [ FGristFiles
strlcat.c strlcpy.c strcasestr.c
] = [ FDirName $(OBOS_TOP) src system libroot posix string ] ;
SEARCH on [ FGristFiles syslog.cpp ]
= [ FDirName $(OBOS_TOP) src system libroot posix ] ;
SEARCH on [ FGristFiles KMessage.cpp ]
= [ FDirName $(OBOS_TOP) src system kernel messaging ] ;
SubInclude OBOS_TOP src kits app ;
SubInclude OBOS_TOP src kits debug ;
SubInclude OBOS_TOP src kits device ;
SubInclude OBOS_TOP src kits game ;
SubInclude OBOS_TOP src kits interface ;
SubInclude OBOS_TOP src kits mail ;
SubInclude OBOS_TOP src kits media ;
SubInclude OBOS_TOP src kits midi ;
SubInclude OBOS_TOP src kits midi2 ;
SubInclude OBOS_TOP src kits screensaver ;
#SubInclude OBOS_TOP src kits storage ;
SubInclude OBOS_TOP src kits support ;
SubInclude OBOS_TOP src kits textencoding ;
SubInclude OBOS_TOP src kits translation ;
SubInclude OBOS_TOP src kits tracker ;
SubInclude OBOS_TOP src kits device ;
SubInclude OBOS_TOP src kits game ;
SubInclude OBOS_TOP src kits network ;
SubInclude OBOS_TOP src kits opengl ;
SubInclude OBOS_TOP src kits screensaver ;
SubInclude OBOS_TOP src kits storage ;
SubInclude OBOS_TOP src kits support ;
SubInclude OBOS_TOP src kits textencoding ;
SubInclude OBOS_TOP src kits tracker ;
SubInclude OBOS_TOP src kits translation ;

View File

@ -1,4 +1,59 @@
SubDir OBOS_TOP src kits app ;
# If defined allows to run applications without the registrar
# -- for development only, of course.
if $(RUN_WITHOUT_REGISTRAR) {
local defines = [ FDefines RUN_WITHOUT_REGISTRAR ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;
}
# If defined allows to run applications without the app server
# -- needed until the app server runs on our kernel.
RUN_WITHOUT_APP_SERVER ?= 0 ;
if $(RUN_WITHOUT_APP_SERVER) != 0 {
local defines = [ FDefines RUN_WITHOUT_APP_SERVER ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;
}
UsePrivateHeaders shared app interface ;
UsePrivateHeaders [ FDirName kernel util ] ; # For KMessage.h
MergeObject <libbe>app_kit.o :
AppDefs.cpp
Application.cpp
AppMisc.cpp
AppServerLink.cpp
AreaLink.cpp
Cursor.cpp
Clipboard.cpp
dano_message.cpp
Handler.cpp
InitTerminateLibBe.cpp
Invoker.cpp
LinkReceiver.cpp
LinkSender.cpp
Looper.cpp
LooperList.cpp
Message.cpp
MessageBody.cpp
MessageField.cpp
MessageFilter.cpp
MessageQueue.cpp
MessageRunner.cpp
Messenger.cpp
MessageUtils.cpp
PropertyInfo.cpp
PortLink.cpp
RegistrarDefs.cpp
RegistrarThread.cpp
RegistrarThreadManager.cpp
Roster.cpp
RosterPrivate.cpp
Server.cpp
ServerMemIO.cpp
TokenSpace.cpp
TypeConstants.cpp
;
UsePrivateHeaders interface ;

View File

@ -1,16 +1,109 @@
SubDir OBOS_TOP src kits interface ;
#SubInclude OBOS_TOP src kits interface prefs ;
# If defined allows to run applications without the registrar
# -- for development only, of course.
if $(RUN_WITHOUT_REGISTRAR) {
local defines = [ FDefines RUN_WITHOUT_REGISTRAR ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;
}
UsePrivateHeaders interface ;
# If defined allows to run applications without the app server
# -- needed until the app server runs on our kernel.
RUN_WITHOUT_APP_SERVER ?= 0 ;
if $(RUN_WITHOUT_APP_SERVER) != 0 {
local defines = [ FDefines RUN_WITHOUT_APP_SERVER ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;
}
if ! $(HAIKU_COMPATIBLE) {
SubDirC++Flags -DCOMPILE_FOR_R5 ;
local defines = [ FDefines COMPILE_FOR_R5 ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;
}
UsePrivateHeaders shared app interface input [ FDirName servers app ] ;
MergeObject <libbe>interface_kit.o :
Alert.cpp
Bitmap.cpp
BMCPrivate.cpp
Box.cpp
Button.cpp
ChannelControl.cpp
ChannelSlider.cpp
CheckBox.cpp
ClientFontList.cpp
ColorUtils.cc
ColorControl.cpp
Control.cpp
Deskbar.cpp
Dragger.cpp
Font.cpp
GraphicsDefs.cpp
Input.cpp
InterfaceDefs.cpp
ListItem.cpp
ListView.cpp
Menu.cpp
MenuBar.cpp
MenuField.cpp
MenuItem.cpp
MenuWindow.cpp
OptionControl.cpp
OptionPopUp.cpp
OutlineListView.cpp
Picture.cpp
PictureButton.cpp
Point.cpp
Polygon.cpp
PopUpMenu.cpp
PrintJob.cpp
PrivateScreen.cpp
RadioButton.cpp
Rect.cpp
Region.cpp
RegionSupport.cpp
Screen.cpp
ScrollBar.cpp
ScrollView.cpp
SeparatorItem.cpp
Shape.cpp
Shelf.cpp
Slider.cpp
StatusBar.cpp
StringView.cpp
TabView.cpp
TextControl.cpp
TextInput.cpp
TPicture.cpp
View.cpp
Window.cpp
ZombieReplicantView.cpp
# BTextView
BTextView/InlineInput.cpp
BTextView/LineBuffer.cpp
BTextView/StyleBuffer.cpp
BTextView/TextGapBuffer.cpp
BTextView/TextView.cpp
BTextView/UndoBuffer.cpp
BTextView/WidthBuffer.cpp
;
StaticLibrary haiku :
ScrollView.cpp
: STATIC_LIBRARY_DIR
;
SubInclude OBOS_TOP src kits interface BTextView ;
# BTextView
BTextView/InlineInput.cpp
BTextView/LineBuffer.cpp
BTextView/StyleBuffer.cpp
BTextView/TextGapBuffer.cpp
BTextView/TextView.cpp
BTextView/UndoBuffer.cpp
BTextView/WidthBuffer.cpp
: STATIC_LIBRARY_DIR
;

View File

@ -1,33 +1,91 @@
SubDir OBOS_TOP src kits storage ;
UsePrivateHeaders $(DOT) ;
UsePrivateHeaders shared app kernel storage ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders kernel ;
UsePrivateHeaders shared ;
UsePrivateHeaders storage ;
SEARCH_SOURCE += [ FDirName $(OBOS_TOP) src kits storage ] ;
MergeObject <libbe>storage_kit.o :
AppFileInfo.cpp
Directory.cpp
Entry.cpp
EntryList.cpp
File.cpp
FindDirectory.cpp
Mime.cpp
MimeType.cpp
Node.cpp
NodeInfo.cpp
NodeMonitor.cpp
OffsetFile.cpp
Path.cpp
Query.cpp
QueryPredicate.cpp
ResourceFile.cpp
ResourceItem.cpp
Resources.cpp
ResourcesContainer.cpp
ResourceStrings.cpp
Statable.cpp
SymLink.cpp
Volume.cpp
VolumeRoster.cpp
storage_support.cpp
mime/AssociatedTypes.cpp
mime/CreateAppMetaMimeThread.cpp
mime/Database.cpp
mime/InstalledTypes.cpp
mime/MimeUpdateThread.cpp
mime/SnifferRules.cpp
mime/Supertype.cpp
mime/SupportingApps.cpp
mime/UpdateMimeInfoThread.cpp
mime/database_access.cpp
mime/database_support.cpp
sniffer/CharStream.cpp
sniffer/Err.cpp
sniffer/DisjList.cpp
sniffer/Pattern.cpp
sniffer/PatternList.cpp
sniffer/Parser.cpp
sniffer/Range.cpp
sniffer/RPattern.cpp
sniffer/RPatternList.cpp
sniffer/Rule.cpp
;
# We need to keep the DiskDevice API out of libopenbeos as long as the
# Interface Kit is not fully functional (at least the part we are using).
# So, we build a separate library.
#
SharedLibrary diskdevice
: #AddOnImage.cpp
DiskDevice.cpp
DiskDeviceJob.cpp
# DiskDeviceList.cpp
DiskDevicePrivate.cpp
DiskDeviceRoster.cpp
DiskDeviceTypes.cpp
DiskDeviceVisitor.cpp
# DiskScannerAddOn.cpp
DiskSystem.cpp
Partition.cpp
# PartitioningDialog.cpp
PartitioningInfo.cpp
# So, we build it separately.
: <boot!home!config!lib>libdisk_device_manager.so be
MergeObject <libbe>storage_diskdevice_kit.o :
DiskDevice.cpp
DiskDeviceJob.cpp
DiskDeviceList.cpp
DiskDevicePrivate.cpp
DiskDeviceRoster.cpp
DiskDeviceTypes.cpp
DiskDeviceVisitor.cpp
DiskSystem.cpp
Partition.cpp
PartitioningInfo.cpp
;
AbsSymLink <boot!home!config!lib>libdiskdevice.so : libdiskdevice.so
: /boot/home/config/lib : false ;
# The adapter library we need (Storage Kit).
#
SEARCH on [ FGristFiles
strlcat.c strlcpy.c strcasestr.c
] = [ FDirName $(OBOS_TOP) src system libroot posix string ] ;
SharedLibrary beadapter :
LibBeAdapter.cpp
strlcat.c
strlcpy.c
strcasestr.c
: be
;

View File

@ -1,5 +1,24 @@
SubDir OBOS_TOP src kits support ;
UsePrivateHeaders shared app ;
MergeObject <libbe>support_kit.o :
Archivable.cpp
Beep.cpp
BlockCache.cpp
ByteOrder.cpp
DataBuffer.cpp
DataIO.cpp
BufferIO.cpp
Flattenable.cpp
List.cpp
Locker.cpp
PointerList.cpp
StopWatch.cpp
String.cpp
# StreamIO.cpp
;
StaticLibrary haiku :
String.cpp
strcasestr.c