From: Carl Hetherington Date: Fri, 24 Apr 2020 19:12:10 +0000 (+0200) Subject: Build static on Linux. X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=2b600eafa7288c3bf483e35072abb385b18a22d7;p=lwext4.git Build static on Linux. --- diff --git a/Makefile b/Makefile index 076a021..8125659 100644 --- a/Makefile +++ b/Makefile @@ -19,19 +19,29 @@ COMMON_DEFINITIONS = \ -DVERSION_MINOR=$(VERSION_MINOR) \ -DVERSION_PATCH=$(VERSION_PATCH) \ -DVERSION=$(VERSION) \ - -DLWEXT4_BUILD_SHARED_LIB=ON \ define generate_common rm -R -f build_$(1) mkdir build_$(1) cd build_$(1) && cmake -G"Unix Makefiles" \ $(COMMON_DEFINITIONS) \ + -DLWEXT4_BUILD_SHARED_LIB=ON \ + $(2) \ + -DCMAKE_TOOLCHAIN_FILE=../toolchain/$(1).cmake .. +endef + +define generate_common_static + rm -R -f build_$(1) + mkdir build_$(1) + cd build_$(1) && cmake -G"Unix Makefiles" \ + $(COMMON_DEFINITIONS) \ + -DLWEXT4_BUILD_SHARED_LIB=OFF \ $(2) \ -DCMAKE_TOOLCHAIN_FILE=../toolchain/$(1).cmake .. endef generic: - $(call generate_common,$@) + $(call generate_common_static,$@) osx: $(call generate_common,$@) diff --git a/cscript b/cscript index 57e7e88..e118e15 100644 --- a/cscript +++ b/cscript @@ -21,7 +21,7 @@ def build(target, options): if target.platform == 'linux': type = 'generic' blockdev = 'linux' - ext = 'so' + ext = 'a' device = 'dev' elif target.platform == 'osx': if target.bits == 64: