summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-24 21:12:10 +0200
committerCarl Hetherington <cth@carlh.net>2020-04-24 21:13:34 +0200
commit2b600eafa7288c3bf483e35072abb385b18a22d7 (patch)
tree0569fac109aa76a0201905716f0cded7cc488dde /Makefile
parentd1e03c7453f4f168c6f0bb567427b0e5f049ba26 (diff)
Build static on Linux.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
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,$@)