1 SubDir HAIKU_TOP src build libsolv ;
3 local libsolvSourceBaseDirectory
4 = [ BuildFeatureAttribute libsolv : sources : path ] ;
5 local libsolvSourceDirectory = [ FDirName $(libsolvSourceBaseDirectory) src ] ;
6 local libsolvextSourceDirectory
7 = [ FDirName $(libsolvSourceBaseDirectory) ext ] ;
9 local libsolvMajor = 0 ;
10 local libsolvMinor = 3 ;
11 local libsolvPatch = 0 ;
12 local libsolvVersion = $(libsolvMajor).$(libsolvMinor).$(libsolvPatch) ;
18 VERSION=\\\"$(libsolvVersion)\\\"
21 # One of the following must be defined:
22 # * HAVE_FUNOPEN / HAVE_FOPENCOOKIE
24 # One of the following can be defined:
25 # * HAVE_QSORT_R / HAVE___QSORT ?
26 switch $(HOST_PLATFORM) {
28 DEFINES += HAVE_STRCHRNUL HAVE_QSORT_R HAVE_FOPENCOOKIE ;
30 DEFINES += HAVE_FOPENCOOKIE ;
32 DEFINES += HAVE_STRCHRNUL HAVE_FUNOPEN ;
34 DEFINES += HAVE_FUNOPEN HAVE_QSORT_R ;
36 Exit $(SUBDIR)/Jamfile: "Please add a case for your platform"
37 "($(HOST_PLATFORM))!" ;
40 SubDirCcFlags -Wno-sign-compare -Wno-missing-prototypes ;
45 UseHeaders $(libsolvSourceDirectory) ;
47 local libsolvSources = [ FGristFiles
48 bitmap.c poolarch.c poolvendor.c poolid.c strpool.c dirpool.c
49 solver.c solverdebug.c repo_solv.c repo_write.c evr.c pool.c
50 queue.c repo.c repodata.c repopage.c util.c policy.c solvable.c
51 transaction.c rules.c problems.c
52 chksum.c md5.c sha1.c sha2.c solvversion.c selection.c
55 LOCATE on $(libsolvSources) = $(libsolvSourceDirectory) ;
56 Depends $(libsolvSources) : [ BuildFeatureAttribute libsolv : sources ] ;
58 MakeLocate libsolv_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ;
60 BuildPlatformSharedLibrary libsolv_build.so
67 UseHeaders $(libsolvextSourceDirectory) ;
69 local libsolvextSources = [ FGristFiles
70 solv_xfopen.c testcase.c
74 LOCATE on $(libsolvextSources) = $(libsolvextSourceDirectory) ;
75 Depends $(libsolvextSources) : [ BuildFeatureAttribute libsolv : sources ] ;
77 USES_BE_API on libsolvext_build.so = true ;
79 MakeLocate libsolvext_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ;
81 BuildPlatformSharedLibrary libsolvext_build.so
91 # generate solvversion.h
93 actions GenerateLibsolvVersionHeader
95 sed -e s,@VERSION@,$(LIBSOLV_VERSION),g \
96 -e s,@LIBSOLV_MAJOR@,$(LIBSOLV_MAJOR),g \
97 -e s,@LIBSOLV_MINOR@,$(LIBSOLV_MINOR),g \
98 -e s,@LIBSOLV_PATCH@,$(LIBSOLV_PATCH),g \
102 local versionHeaderIn = solvversion.h.in ;
103 LOCATE on $(versionHeaderIn) = $(libsolvSourceDirectory) ;
104 Depends $(versionHeaderIn) : [ BuildFeatureAttribute libsolv : sources ] ;
106 local versionHeader = [ FGristFiles solvversion.h ] ;
107 MakeLocate $(versionHeader) : $(LOCATE_SOURCE) ;
108 Depends $(versionHeader) : $(versionHeaderIn) ;
109 LIBSOLV_VERSION on $(versionHeader) = $(libsolvVersion) ;
110 LIBSOLV_MAJOR on $(versionHeader) = $(libsolvMajor) ;
111 LIBSOLV_MINOR on $(versionHeader) = $(libsolvMinor) ;
112 LIBSOLV_PATCH on $(versionHeader) = $(libsolvPatch) ;
113 GenerateLibsolvVersionHeader $(versionHeader) : $(versionHeaderIn) ;
115 Includes $(libsolvSources) $(libsolvextSources) : $(versionHeader) ;