xref: /haiku/build/jam/packages/HaikuDevel (revision 040a81419dda83d1014e9dc94936a4cb3f027303)
1local architecture = $(HAIKU_PACKAGING_ARCHS[1]) ;
2
3
4local haikuDevelPackage = haiku_devel.hpkg ;
5HaikuPackage $(haikuDevelPackage) ;
6
7local arch = $(TARGET_ARCH) ;
8local developDirTokens = develop ;
9
10# glue code
11AddFilesToPackage $(developDirTokens) lib :
12	<src!system!glue!arch!$(arch)!$(architecture)>crti.o
13	<src!system!glue!arch!$(arch)!$(architecture)>crtn.o
14	<src!system!glue!$(architecture)>init_term_dyn.o
15	<src!system!glue!$(architecture)>start_dyn.o
16	<src!system!glue!$(architecture)>haiku_version_glue.o
17	;
18
19# kernel
20AddFilesToPackage $(developDirTokens) lib : kernel.so : _KERNEL_ ;
21
22# additional libraries
23local developmentLibs = <revisioned>libroot_debug.so ;
24AddFilesToPackage lib : $(developmentLibs) ;
25
26# library symlinks
27local lib ;
28for lib in [ HaikuImageGetSystemLibs ] $(developmentLibs) {
29	AddSymlinkToPackage $(developDirTokens) lib : /system/lib $(lib:BS) ;
30	local abiVersion = [ on $(lib) return $(HAIKU_LIB_ABI_VERSION) ] ;
31	if $(abiVersion) {
32		local abiVersionedLib = $(lib:BS).$(abiVersion) ;
33		AddSymlinkToPackage $(developDirTokens) lib
34			: /system/lib $(abiVersionedLib) ;
35	}
36}
37
38# static libraries
39AddFilesToPackage $(developDirTokens) lib : <$(architecture)>liblocalestub.a ;
40
41# the POSIX error code mapper library
42AddFilesToPackage $(developDirTokens) lib : libposix_error_mapper.a ;
43
44# ABI independent stuff
45
46# scripts: setgcc
47local scripts = setgcc ;
48SEARCH on $(scripts) = [ FDirName $(HAIKU_TOP) data bin ] ;
49AddFilesToPackage bin : $(scripts) ;
50
51# headers
52AddHeaderDirectoryToPackage config ;
53AddHeaderDirectoryToPackage glibc ;
54AddHeaderDirectoryToPackage os ;
55AddHeaderDirectoryToPackage posix ;
56
57# private headers
58AddHeaderDirectoryToPackage private ;
59CopyDirectoryToPackage develop headers private libs compat
60	: [ FDirName $(HAIKU_TOP) src libs compat freebsd_network ]
61	: : -x *.c -x *.cpp -x *.awk -x Jamfile -x miidevs ;
62CopyDirectoryToPackage develop headers private libs compat
63	: [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ]
64	: : -x *.c -x Jamfile ;
65
66# create be -> os symlink for now
67AddSymlinkToPackage $(developDirTokens) headers : os : be ;
68
69# BSD and GNU compatibility headers
70AddHeaderDirectoryToPackage compatibility bsd : bsd ;
71AddHeaderDirectoryToPackage compatibility gnu : gnu ;
72
73# third party libs headers
74if ! $(HAIKU_BOOTSTRAP_BUILD) {
75	AddHeaderDirectoryToPackage libs tiff : 3rdparty ;
76}
77
78# cpp headers
79if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 {
80	# GCC 2 only -- for GCC 4 they come with the DevelopmentBase package
81	CopyDirectoryToPackage $(developDirTokens) headers c++
82		: [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 ;
83}
84
85# OpenGL headers
86if $(TARGET_ARCH) = x86 && ! $(HAIKU_BOOTSTRAP_BUILD) {
87	local mesaGlHeaders
88		= [ FDirName [ BuildFeatureAttribute mesa : headers : path ] GL ] ;
89	local mesaGlHeadersDependency = [ BuildFeatureAttribute mesa : headers ] ;
90	mesaGlHeaders = $(mesaGlHeaders:G=$(mesaGlHeadersDependency:G)) ;
91	Depends $(mesaGlHeaders) : $(mesaGlHeadersDependency) ;
92	CopyDirectoryToPackage $(developDirTokens) headers os opengl
93		: $(mesaGlHeaders) : : : isTarget ;
94}
95
96# Deskbar menu symlinks
97AddSymlinkToPackage data deskbar menu Applications
98	: ../../../../apps/Debugger : Debugger ;
99
100BuildHaikuPackage $(haikuDevelPackage) : haiku_devel ;
101