1SubDir HAIKU_TOP src build libsolv ; 2 3local libsolvSourceBaseDirectory 4 = [ BuildFeatureAttribute libsolv : sources : path ] ; 5local libsolvSourceDirectory = [ FDirName $(libsolvSourceBaseDirectory) src ] ; 6local libsolvextSourceDirectory 7 = [ FDirName $(libsolvSourceBaseDirectory) ext ] ; 8 9local libsolvMajor = 0 ; 10local libsolvMinor = 3 ; 11local libsolvPatch = 0 ; 12local libsolvVersion = $(libsolvMajor).$(libsolvMinor).$(libsolvPatch) ; 13 14DEFINES = 15 LIBSOLV_INTERNAL 16 HAIKU 17 ENABLE_HAIKU 18 VERSION=\\\"$(libsolvVersion)\\\" 19 _GNU_SOURCE 20 ; 21 22# One of the following must be defined: 23# * HAVE_FUNOPEN / HAVE_FOPENCOOKIE 24# 25# One of the following can be defined: 26# * HAVE_QSORT_R / HAVE___QSORT ? 27switch $(HOST_PLATFORM) { 28 case linux : 29 DEFINES += HAVE_STRCHRNUL HAVE_QSORT_R HAVE_FOPENCOOKIE ; 30 case haiku_host : 31 DEFINES += HAVE_STRCHRNUL HAVE_FOPENCOOKIE ; 32 case freebsd : 33 DEFINES += HAVE_STRCHRNUL HAVE_FUNOPEN ; 34 case darwin : 35 DEFINES += HAVE_FUNOPEN HAVE_QSORT_R ; 36 case * : 37 Exit $(SUBDIR)/Jamfile: "Please add a case for your platform" 38 "($(HOST_PLATFORM))!" ; 39} 40 41SubDirCcFlags -Wno-sign-compare -Wno-missing-prototypes ; 42 43 44# libsolv 45 46UseHeaders $(libsolvSourceDirectory) ; 47 48local libsolvSources = [ FGristFiles 49 bitmap.c poolarch.c poolvendor.c poolid.c strpool.c dirpool.c 50 solver.c solverdebug.c repo_solv.c repo_write.c evr.c pool.c 51 queue.c repo.c repodata.c repopage.c util.c policy.c solvable.c 52 transaction.c rules.c problems.c 53 chksum.c md5.c sha1.c sha2.c solvversion.c selection.c 54 ] ; 55 56LOCATE on $(libsolvSources) = $(libsolvSourceDirectory) ; 57Depends $(libsolvSources) : [ BuildFeatureAttribute libsolv : sources ] ; 58 59MakeLocate libsolv_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ; 60 61BuildPlatformSharedLibrary libsolv_build.so 62 : 63 $(libsolvSources) 64 ; 65 66# libsolvext 67 68UseHeaders $(libsolvextSourceDirectory) ; 69 70local libsolvextSources = [ FGristFiles 71 solv_xfopen.c testcase.c 72 repo_haiku.cpp 73 ] ; 74 75LOCATE on $(libsolvextSources) = $(libsolvextSourceDirectory) ; 76Depends $(libsolvextSources) : [ BuildFeatureAttribute libsolv : sources ] ; 77 78USES_BE_API on libsolvext_build.so = true ; 79 80MakeLocate libsolvext_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ; 81 82BuildPlatformSharedLibrary libsolvext_build.so 83 : 84 $(libsolvextSources) 85 : 86 libsolv_build.so 87 libpackage_build.so 88 z 89 ; 90 91 92# generate solvversion.h 93 94actions GenerateLibsolvVersionHeader 95{ 96 sed -e s,@VERSION@,$(LIBSOLV_VERSION),g \ 97 -e s,@LIBSOLV_MAJOR@,$(LIBSOLV_MAJOR),g \ 98 -e s,@LIBSOLV_MINOR@,$(LIBSOLV_MINOR),g \ 99 -e s,@LIBSOLV_PATCH@,$(LIBSOLV_PATCH),g \ 100 $(2) > $(1) 101} 102 103local versionHeaderIn = solvversion.h.in ; 104LOCATE on $(versionHeaderIn) = $(libsolvSourceDirectory) ; 105Depends $(versionHeaderIn) : [ BuildFeatureAttribute libsolv : sources ] ; 106 107local versionHeader = [ FGristFiles solvversion.h ] ; 108MakeLocate $(versionHeader) : $(LOCATE_SOURCE) ; 109Depends $(versionHeader) : $(versionHeaderIn) ; 110LIBSOLV_VERSION on $(versionHeader) = $(libsolvVersion) ; 111LIBSOLV_MAJOR on $(versionHeader) = $(libsolvMajor) ; 112LIBSOLV_MINOR on $(versionHeader) = $(libsolvMinor) ; 113LIBSOLV_PATCH on $(versionHeader) = $(libsolvPatch) ; 114GenerateLibsolvVersionHeader $(versionHeader) : $(versionHeaderIn) ; 115 116Includes $(libsolvSources) $(libsolvextSources) : $(versionHeader) ; 117