summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-07 12:04:13 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-07 13:16:40 +0100
commit3601ea5bae9247add596e2c6920e80a236803964 (patch)
treea77ea654724f1d36e68bb7ea0130d87a64186486 /Makefile
parentf2a1573f085e7e822bc8a4a3cc3fbf5eaecbb741 (diff)
Build both osx and osx-arm64 versions in a directory called osx.
When DCP-o-matic makes its universal binary it assumes that the path to the arm64 library can be found by replacing x86_64 with arm64 in the path. This fails if we build the x86_64 version in build_osx and the arm64 version in build_osx-arm64.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile46
1 files changed, 23 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index e0f50d4..347b29b 100644
--- a/Makefile
+++ b/Makefile
@@ -21,69 +21,69 @@ COMMON_DEFINITIONS = \
-DVERSION=$(VERSION) \
define generate_common
- rm -R -f build_$(1)
- mkdir build_$(1)
- cd build_$(1) && cmake -G"Unix Makefiles" \
+ rm -R -f build_$(2)
+ mkdir build_$(2)
+ cd build_$(2) && cmake -G"Unix Makefiles" \
$(COMMON_DEFINITIONS) \
-DLWEXT4_BUILD_SHARED_LIB=ON \
- $(2) \
+ $(3) \
-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" \
+ rm -R -f build_$(2)
+ mkdir build_$(2)
+ cd build_$(2) && cmake -G"Unix Makefiles" \
$(COMMON_DEFINITIONS) \
-DLWEXT4_BUILD_SHARED_LIB=OFF \
- $(2) \
+ $(3) \
-DCMAKE_TOOLCHAIN_FILE=../toolchain/$(1).cmake ..
endef
generic:
- $(call generate_common_static,$@)
+ $(call generate_common_static,$@,$@)
osx:
- $(call generate_common,$@)
+ $(call generate_common,$@,$@)
osx32:
- $(call generate_common,$@,-DCMAKE_OSX_ARCHITECTURES=i386)
+ $(call generate_common,$@,osx,-DCMAKE_OSX_ARCHITECTURES=i386)
osx-arm64:
- $(call generate_common,$@)
+ $(call generate_common,$@,osx)
cortex-m0:
- $(call generate_common,$@)
+ $(call generate_common,$@,$@)
cortex-m0+:
- $(call generate_common,$@)
+ $(call generate_common,$@,$@)
cortex-m3:
- $(call generate_common,$@)
+ $(call generate_common,$@,$@)
cortex-m4:
- $(call generate_common,$@)
+ $(call generate_common,$@,$@)
cortex-m4f:
- $(call generate_common,$@)
+ $(call generate_common,$@,$@)
cortex-m7:
- $(call generate_common,$@)
+ $(call generate_common,$@,$@)
arm-sim:
- $(call generate_common,$@)
+ $(call generate_common,$@,$@)
avrxmega7:
- $(call generate_common,$@)
+ $(call generate_common,$@,$@)
msp430:
- $(call generate_common,$@)
+ $(call generate_common,$@,$@)
mingw:
- $(call generate_common,$@,-DWIN32=1)
+ $(call generate_common,$@,$@,-DWIN32=1)
mingw-32:
- $(call generate_common,$@,-DWIN32=1)
+ $(call generate_common,$@,$@,-DWIN32=1)
lib_only:
rm -R -f build_lib_only