xref: /haiku/build/jam/packages/HaikuCrossDevel (revision 29f8805f6c70f1c819eb58ac2220647d8e40d6e7)
1# This package is like the HaikuDevel package, but it is meant for cross
2# development, i.e. it assumes that a specific cross compiler is installed
3# on the Haiku system where this package is being used.
4# The main use of this package is to provide HaikuPorter with a development
5# environment for a cross-build Haiku platform.
6
7# first create the actual cross development package
8
9local haikuCrossDevelSysrootPackage
10	= haiku_cross_devel_sysroot_$(HAIKU_PACKAGING_ARCH).hpkg ;
11HaikuPackage $(haikuCrossDevelSysrootPackage) ;
12
13local developCrossLibDirTokens = develop lib ;
14
15# glue code
16AddFilesToPackage $(developCrossLibDirTokens) :
17	<src!system!glue!arch!$(TARGET_ARCH)>crti.o
18	<src!system!glue!arch!$(TARGET_ARCH)>crtn.o
19	<src!system!glue>init_term_dyn.o
20	<src!system!glue>start_dyn.o
21	<src!system!glue>haiku_version_glue.o
22;
23
24# kernel
25AddFilesToPackage $(developCrossLibDirTokens) : kernel.so : _KERNEL_ ;
26
27# libraries
28AddLibrariesToPackage $(developCrossLibDirTokens) :
29	<revisioned>libroot.so
30	$(HAIKU_SHARED_LIBSTDC++) $(HAIKU_SHARED_LIBSUPC++)
31;
32
33# static libraries
34AddFilesToPackage $(developCrossLibDirTokens) : liblocalestub.a ;
35
36# the POSIX error code mapper library
37AddFilesToPackage $(developCrossLibDirTokens) : libposix_error_mapper.a ;
38
39# headers
40local developCrossHeadersDirTokens = develop headers ;
41local headerDir ;
42for headerDir in config glibc os posix {
43	CopyDirectoryToPackage $(developCrossHeadersDirTokens)
44		: [ FDirName $(HAIKU_TOP) headers $(headerDir) ] ;
45}
46
47# BSD and GNU compatibility headers
48for headerDir in bsd gnu {
49	CopyDirectoryToPackage $(developCrossHeadersDirTokens)
50		: [ FDirName $(HAIKU_TOP) headers compatibility $(headerDir) ] ;
51}
52
53# cpp headers
54if $(HAIKU_GCC_VERSION[1]) = 2 {
55	# GCC 2 only -- for GCC 4 they come with the DevelopmentBase package
56	CopyDirectoryToPackage $(developCrossHeadersDirTokens) c++
57		: [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 ;
58}
59
60BuildHaikuPackage $(haikuCrossDevelSysrootPackage) : haiku_cross_devel_sysroot ;
61
62# Now create a wrapper package which just contains the actual cross development
63# package. This wrapper package can safely be installed into the system
64# hierarchy of the target system, from where haikuporter will fetch it when
65# needed.
66
67local haikuCrossDevelPackage
68	= haiku_cross_devel_$(HAIKU_PACKAGING_ARCH).hpkg ;
69HaikuPackage $(haikuCrossDevelPackage) ;
70
71# add the wrapped package
72local developCrossDirTokens = develop cross ;
73AddFilesToPackage $(developCrossDirTokens) : $(haikuCrossDevelSysrootPackage) ;
74
75BuildHaikuPackage $(haikuCrossDevelPackage) : haiku_cross_devel ;
76