xref: /haiku/src/kits/Jamfile (revision 0b2dbe7d46ee888392907c60131b7f7652314175)
1SubDir OBOS_TOP src kits ;
2
3# define USER for KMessage.cpp
4SubDirCcFlags [ FDefines USER=1 ] ;
5SubDirC++Flags [ FDefines USER=1 ] ;
6
7# If defined allows to run applications without the registrar
8# -- for development only, of course.
9if $(RUN_WITHOUT_REGISTRAR) {
10	local defines = [ FDefines RUN_WITHOUT_REGISTRAR ] ;
11	SubDirCcFlags $(defines) ;
12	SubDirC++Flags $(defines) ;
13}
14
15# If defined allows to run applications without the app server
16# -- needed until the app server runs on our kernel.
17RUN_WITHOUT_APP_SERVER ?= 0 ;
18if $(RUN_WITHOUT_APP_SERVER) != 0 {
19	local defines = [ FDefines RUN_WITHOUT_APP_SERVER ] ;
20	SubDirCcFlags $(defines) ;
21	SubDirC++Flags $(defines) ;
22}
23
24# Collect libopenbeos.so sources.
25subdirs = app interface support storage ;
26for subdir in $(subdirs) {
27	local dir = [ FDirName $(SUBDIR) $(subdir) ] ;
28	local file = $(subdir:S=.src) ;
29	include $(file:D=$(dir)) ;
30	UsePrivateHeaders $(subdir) ;
31	SEARCH_SOURCE += $(dir) ;
32}
33
34UsePrivateHeaders shared app [ FDirName servers app ] ;
35UsePrivateHeaders kernel ;	# for syscalls.h
36UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
37UsePrivateHeaders [ FDirName kernel util ] ;	# KMessage.h
38UsePrivateHeaders input ;
39
40# Add subsubdirs to the SEARCH_SOURCE.
41SEARCH_SOURCE += [ FDirName $(SUBDIR) interface BTextView ] ;
42SEARCH_SOURCE += [ FDirName $(SUBDIR) storage mime ] ;
43SEARCH_SOURCE += [ FDirName $(SUBDIR) storage sniffer ] ;
44
45LIBBE_SOURCE =
46	$(APP_KIT_SOURCE)
47	$(INTERFACE_KIT_SOURCE)
48	$(SUPPORT_KIT_SOURCE)
49	$(STORAGE_KIT_SOURCE)
50
51	KMessage.cpp
52;
53
54LIBBE_SOURCE_HAIKU_ONLY =
55	$(STORAGE_KIT_SOURCE_HAIKU_ONLY)
56;
57
58SharedLibrary be :
59	$(LIBBE_SOURCE) $(LIBBE_SOURCE_HAIKU_ONLY)
60;
61
62SharedLibraryFromObjects openbeos :
63	$(LIBBE_SOURCE:S=.o)
64;
65
66LinkSharedOSLibs libbe.so :
67	libroot.so	# make sure it links against our libroot.so
68	stdc++.r4
69;
70
71LinkSharedOSLibs libopenbeos.so :
72	libbeadapter.so
73	be net
74	stdc++.r4
75;
76
77# The adapter library we need (Storage Kit).
78#
79SharedLibrary beadapter :
80	LibBeAdapter.cpp
81	strlcat.c
82	strlcpy.c
83;
84LinkSharedOSLibs libbeadapter.so :
85	be
86;
87
88# Note: If you want to use /boot/home/config/lib/libopenbeos.so in another
89# rule, use the identifier <boot!home!config!lib>libopenbeos.so, otherwise
90# libopenbeos.so.
91LOCATE on <boot!home!config!lib>libopenbeos.so
92		  <boot!home!config!lib>libbeadapter.so = /boot/home/config/lib ;
93File <boot!home!config!lib>libopenbeos.so : libopenbeos.so ;
94File <boot!home!config!lib>libbeadapter.so : libbeadapter.so ;
95Includes <boot!home!config!lib>libopenbeos.so
96	: <boot!home!config!lib>libbeadapter.so ;
97
98SEARCH on [ FGristFiles
99		strlcat.c strlcpy.c
100	] = [ FDirName $(OBOS_TOP) src system libroot posix string ] ;
101
102SEARCH on [ FGristFiles KMessage.cpp ]
103	= [ FDirName $(OBOS_TOP) src system kernel messaging ] ;
104
105SubInclude OBOS_TOP src kits app ;
106SubInclude OBOS_TOP src kits debug ;
107SubInclude OBOS_TOP src kits interface ;
108SubInclude OBOS_TOP src kits mail ;
109SubInclude OBOS_TOP src kits media ;
110SubInclude OBOS_TOP src kits midi ;
111SubInclude OBOS_TOP src kits midi2 ;
112SubInclude OBOS_TOP src kits screensaver ;
113#SubInclude OBOS_TOP src kits storage ;
114SubInclude OBOS_TOP src kits support ;
115SubInclude OBOS_TOP src kits textencoding ;
116SubInclude OBOS_TOP src kits translation ;
117SubInclude OBOS_TOP src kits tracker ;
118SubInclude OBOS_TOP src kits device ;
119SubInclude OBOS_TOP src kits game ;
120SubInclude OBOS_TOP src kits network ;
121SubInclude OBOS_TOP src kits opengl ;
122