More.
[lwext4.git] / Makefile
index 0c468398528f900ad669ae0d4f14cb4ef2a429c7..8125659259261b17779cd8729b9164075ddd19a1 100644 (file)
--- 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,$@)
@@ -69,6 +79,9 @@ msp430:
 mingw:
        $(call generate_common,$@,-DWIN32=1)
 
+mingw-32:
+       $(call generate_common,$@,-DWIN32=1)
+
 lib_only:
        rm -R -f build_lib_only
        mkdir build_lib_only