SubDir HAIKU_TOP src build libsolv ; local libsolvSourceBaseDirectory = [ BuildFeatureAttribute libsolv : sources : path ] ; local libsolvSourceDirectory = [ FDirName $(libsolvSourceBaseDirectory) src ] ; local libsolvextSourceDirectory = [ FDirName $(libsolvSourceBaseDirectory) ext ] ; local libsolvMajor = 0 ; local libsolvMinor = 3 ; local libsolvPatch = 0 ; local libsolvVersion = $(libsolvMajor).$(libsolvMinor).$(libsolvPatch) ; DEFINES = LIBSOLV_INTERNAL HAIKU ENABLE_HAIKU VERSION=\\\"$(libsolvVersion)\\\" ; # One of the following must be defined: # * HAVE_FUNOPEN / HAVE_FOPENCOOKIE # # One of the following can be defined: # * HAVE_QSORT_R / HAVE___QSORT ? switch $(HOST_PLATFORM) { case linux : DEFINES += HAVE_STRCHRNUL HAVE_QSORT_R HAVE_FOPENCOOKIE ; case haiku_host : DEFINES += HAVE_FOPENCOOKIE ; case freebsd : DEFINES += HAVE_FUNOPEN ; case darwin : DEFINES += HAVE_FUNOPEN HAVE_QSORT_R ; case * : Exit $(SUBDIR)/Jamfile: "Please add a case for your platform" "($(HOST_PLATFORM))!" ; } SubDirCcFlags -Wno-sign-compare -Wno-missing-prototypes ; # libsolv UseHeaders $(libsolvSourceDirectory) ; local libsolvSources = [ FGristFiles bitmap.c poolarch.c poolvendor.c poolid.c strpool.c dirpool.c solver.c solverdebug.c repo_solv.c repo_write.c evr.c pool.c queue.c repo.c repodata.c repopage.c util.c policy.c solvable.c transaction.c rules.c problems.c chksum.c md5.c sha1.c sha2.c solvversion.c selection.c ] ; LOCATE on $(libsolvSources) = $(libsolvSourceDirectory) ; Depends $(libsolvSources) : [ BuildFeatureAttribute libsolv : sources ] ; MakeLocate libsolv_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ; BuildPlatformSharedLibrary libsolv_build.so : $(libsolvSources) ; # libsolvext UseHeaders $(libsolvextSourceDirectory) ; local libsolvextSources = [ FGristFiles solv_xfopen.c testcase.c repo_haiku.cpp ] ; LOCATE on $(libsolvextSources) = $(libsolvextSourceDirectory) ; Depends $(libsolvextSources) : [ BuildFeatureAttribute libsolv : sources ] ; USES_BE_API on libsolvext_build.so = true ; MakeLocate libsolvext_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ; BuildPlatformSharedLibrary libsolvext_build.so : $(libsolvextSources) : libsolv_build.so libpackage_build.so z ; # generate solvversion.h actions GenerateLibsolvVersionHeader { sed -e s,@VERSION@,$(LIBSOLV_VERSION),g \ -e s,@LIBSOLV_MAJOR@,$(LIBSOLV_MAJOR),g \ -e s,@LIBSOLV_MINOR@,$(LIBSOLV_MINOR),g \ -e s,@LIBSOLV_PATCH@,$(LIBSOLV_PATCH),g \ $(2) > $(1) } local versionHeaderIn = solvversion.h.in ; LOCATE on $(versionHeaderIn) = $(libsolvSourceDirectory) ; Depends $(versionHeaderIn) : [ BuildFeatureAttribute libsolv : sources ] ; local versionHeader = [ FGristFiles solvversion.h ] ; MakeLocate $(versionHeader) : $(LOCATE_SOURCE) ; Depends $(versionHeader) : $(versionHeaderIn) ; LIBSOLV_VERSION on $(versionHeader) = $(libsolvVersion) ; LIBSOLV_MAJOR on $(versionHeader) = $(libsolvMajor) ; LIBSOLV_MINOR on $(versionHeader) = $(libsolvMinor) ; LIBSOLV_PATCH on $(versionHeader) = $(libsolvPatch) ; GenerateLibsolvVersionHeader $(versionHeader) : $(versionHeaderIn) ; Includes $(libsolvSources) $(libsolvextSources) : $(versionHeader) ;