xref: /haiku/src/build/libpackage/Jamfile (revision 778611c7e6a61b8ba072212756ce53eda826360a)
1SubDir HAIKU_TOP src build libpackage ;
2
3UsePrivateBuildHeaders kernel package shared storage support ;
4
5SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package ] ;
6SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package hpkg ] ;
7SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package hpkg v1 ] ;
8SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package manager ] ;
9SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package solver ] ;
10
11USES_BE_API on libpackage_build.so = true ;
12LINKFLAGS on libpackage_build.so += $(HOST_PTHREAD_LINKFLAGS) ;
13
14
15{
16	# The package writer needs to know where the license files are located.
17	local dataDir = [ FDirName $(HAIKU_TOP) data system data ] ;
18	# The directory path we compile in must be absolute. If it isn't prepend
19	# pwd.
20	local defines ;
21	if ! [ Match "(^/.*)" : $(dataDir) ] {
22		dataDir = `pwd`/$(dataDir) ;
23	}
24	local defines = [ FDefines
25		\"HAIKU_BUILD_SYSTEM_DATA_DIRECTORY="\\\"$(dataDir)\\\""\"
26	] ;
27	ObjectC++Flags PackageWriterImpl.cpp : $(defines) ;
28}
29
30
31HPKG_SOURCES =
32	AttributeDataReader.cpp
33	BlockBufferPool.cpp
34	BlockBufferPoolImpl.cpp
35	BlockBufferPoolNoLock.cpp
36	BufferPool.cpp
37	PoolBuffer.cpp
38	DataReader.cpp
39	ErrorOutput.cpp
40	FDDataReader.cpp
41	GlobalWritableFileInfo.cpp
42	HPKGDefs.cpp
43	PackageContentHandler.cpp
44	PackageData.cpp
45	PackageDataReader.cpp
46	PackageEntry.cpp
47	PackageEntryAttribute.cpp
48	PackageFileHeapAccessorBase.cpp
49	PackageFileHeapReader.cpp
50	PackageFileHeapWriter.cpp
51	PackageReader.cpp
52	PackageReaderImpl.cpp
53	PackageWriter.cpp
54	PackageWriterImpl.cpp
55	ReaderImplBase.cpp
56	RepositoryContentHandler.cpp
57	RepositoryReader.cpp
58	RepositoryReaderImpl.cpp
59	RepositoryWriter.cpp
60	RepositoryWriterImpl.cpp
61	Strings.cpp
62	UserSettingsFileInfo.cpp
63	WriterImplBase.cpp
64
65	# V1 support
66	HPKGDefsV1.cpp
67	PackageContentHandlerV1.cpp
68	PackageDataReaderV1.cpp
69	PackageDataV1.cpp
70	PackageEntryAttributeV1.cpp
71	PackageEntryV1.cpp
72	PackageInfoContentHandlerV1.cpp
73	PackageReaderImplV1.cpp
74	PackageReaderV1.cpp
75	ReaderImplBaseV1.cpp
76;
77
78# TODO: remove this hack once gcc2 has -iquote implemented
79if $(HOST_PLATFORM) = haiku_host &&  $(HOST_GCC_VERSION[1]) < 3 {
80	local locations = common/non-packaged common system ;
81	SourceHdrs FetchFileJob.cpp : /boot/$(locations)/develop/headers/curl ;
82}
83
84# locate the library
85MakeLocate libpackage_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ;
86
87BuildPlatformSharedLibrary libpackage_build.so
88	:
89	ActivateRepositoryCacheJob.cpp
90	ActivateRepositoryConfigJob.cpp
91	ActivationTransaction.cpp
92	AddRepositoryRequest.cpp
93	Attributes.cpp
94	ChecksumAccessors.cpp
95	CommitTransactionResult.cpp
96	Context.cpp
97	DownloadFileRequest.cpp
98	DropRepositoryRequest.cpp
99	FetchFileJob.cpp
100	InstallationLocationInfo.cpp
101	Job.cpp
102	JobQueue.cpp
103	PackageInfo.cpp
104	PackageInfoContentHandler.cpp
105	PackageInfoParser.cpp
106	PackageInfoSet.cpp
107	PackageResolvable.cpp
108	PackageResolvableExpression.cpp
109	PackageRoster.cpp
110	PackageVersion.cpp
111	RefreshRepositoryRequest.cpp
112	RemoveRepositoryJob.cpp
113	RepositoryCache.cpp
114	RepositoryConfig.cpp
115	RepositoryInfo.cpp
116	Request.cpp
117	TempfileManager.cpp
118	User.cpp
119	ValidateChecksumJob.cpp
120
121	$(HPKG_SOURCES)
122
123	# hpkg, but only libpackage
124	NoErrorOutput.cpp
125	StandardErrorOutput.cpp
126
127	# manager
128	Exceptions.cpp
129	RepositoryBuilder.cpp
130
131	# solver
132	Solver.cpp
133	SolverPackage.cpp
134	SolverPackageSpecifier.cpp
135	SolverPackageSpecifierList.cpp
136	SolverProblem.cpp
137	SolverProblemSolution.cpp
138	SolverRepository.cpp
139	SolverResult.cpp
140	:
141	libshared_build.a $(HOST_LIBBE) curl $(HOST_LIBSTDC++)
142;
143
144HaikuSubInclude solver ;
145