Browse Source

Allow to build arm32 bridge, magically works with qemu/binfmt \o/

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.1-rc1
falkTX 5 years ago
parent
commit
cf4f1dd97a
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
8 changed files with 142 additions and 0 deletions
  1. +19
    -0
      Makefile
  2. +1
    -0
      source/Makefile.mk
  3. +36
    -0
      source/bridges-plugin/Makefile
  4. +15
    -0
      source/discovery/Makefile
  5. +14
    -0
      source/jackbridge/Makefile
  6. +29
    -0
      source/modules/lilv/Makefile
  7. +14
    -0
      source/modules/rtmempool/Makefile
  8. +14
    -0
      source/modules/water/Makefile

+ 19
- 0
Makefile View File

@@ -105,6 +105,13 @@ $(MODULEDIR)/theme.qt4.a: .FORCE
$(MODULEDIR)/theme.qt5.a: .FORCE
@$(MAKE) -C source/theme qt5

$(MODULEDIR)/%.arm32.a: .FORCE
ifneq ($(WIN32),true)
@$(MAKE) -C source/modules/$* arm32
else
$(error Trying to build ARM binaries with a Windows toolchain, this cannot work)
endif

$(MODULEDIR)/%.posix32.a: .FORCE
ifneq ($(WIN32),true)
@$(MAKE) -C source/modules/$* posix32
@@ -218,6 +225,18 @@ bin/carla-plugin:
-o ./$@ \
./source/native-plugins/resources/carla-plugin

# ---------------------------------------------------------------------------------------------------------------------
# Binaries (arm32)

LIBS_ARM32 = $(MODULEDIR)/jackbridge.arm32.a
LIBS_ARM32 += $(MODULEDIR)/lilv.arm32.a
LIBS_ARM32 += $(MODULEDIR)/rtmempool.arm32.a
LIBS_ARM32 += $(MODULEDIR)/water.arm32.a

arm32: $(LIBS_ARM32)
$(MAKE) -C source/bridges-plugin arm32
$(MAKE) -C source/discovery arm32

# ---------------------------------------------------------------------------------------------------------------------
# Binaries (posix32)



+ 1
- 0
source/Makefile.mk View File

@@ -149,6 +149,7 @@ endif

32BIT_FLAGS = -m32
64BIT_FLAGS = -m64
ARM32_FLAGS = -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -mvectorize-with-neon-quad

BUILD_C_FLAGS = $(BASE_FLAGS) -std=gnu99 $(CFLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=gnu++0x $(CXXFLAGS)


+ 36
- 0
source/bridges-plugin/Makefile View File

@@ -34,10 +34,12 @@ BUILD_CXX_FLAGS += -I$(CWD)/backend/engine -I$(CWD)/backend/plugin

32BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH
64BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH
ARM32_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH

# ----------------------------------------------------------------------------------------------------------------------

LIBS_native = $(MODULEDIR)/jackbridge.a
LIBS_arm32 = $(MODULEDIR)/jackbridge.arm32.a
LIBS_posix32 = $(MODULEDIR)/jackbridge.posix32.a
LIBS_posix64 = $(MODULEDIR)/jackbridge.posix64.a
ifeq ($(BUILDING_FOR_WINDOWS),true)
@@ -50,6 +52,7 @@ endif
LINK_FLAGS += $(JACKBRIDGE_LIBS)

LIBS_native += $(MODULEDIR)/lilv.a
LIBS_arm32 += $(MODULEDIR)/lilv.arm32.a
LIBS_posix32 += $(MODULEDIR)/lilv.posix32.a
LIBS_posix64 += $(MODULEDIR)/lilv.posix64.a
LIBS_win32 += $(MODULEDIR)/lilv.win32.a
@@ -57,6 +60,7 @@ LIBS_win64 += $(MODULEDIR)/lilv.win64.a
LINK_FLAGS += $(LILV_LIBS)

LIBS_native += $(MODULEDIR)/rtmempool.a
LIBS_arm32 += $(MODULEDIR)/rtmempool.arm32.a
LIBS_posix32 += $(MODULEDIR)/rtmempool.posix32.a
LIBS_posix64 += $(MODULEDIR)/rtmempool.posix64.a
LIBS_win32 += $(MODULEDIR)/rtmempool.win32.a
@@ -64,6 +68,7 @@ LIBS_win64 += $(MODULEDIR)/rtmempool.win64.a
LINK_FLAGS += $(RTMEMPOOL_LIBS)

LIBS_native += $(MODULEDIR)/water.a
LIBS_arm32 += $(MODULEDIR)/water.arm32.a
LIBS_posix32 += $(MODULEDIR)/water.posix32.a
LIBS_posix64 += $(MODULEDIR)/water.posix64.a
LIBS_win32 += $(MODULEDIR)/water.win32.a
@@ -211,6 +216,7 @@ OBJS_arch = \
$(OBJDIR)/CarlaPluginJuce.cpp.arch.o \
$(OBJDIR)/CarlaStandalone.cpp.arch.o

OBJS_arm32 = $(OBJS_arch:%.arch.o=%.arm32.o)
OBJS_posix32 = $(OBJS_arch:%.arch.o=%.posix32.o)
OBJS_posix64 = $(OBJS_arch:%.arch.o=%.posix64.o)
OBJS_win32 = $(OBJS_arch:%.arch.o=%.win32.o)
@@ -235,6 +241,7 @@ debug:
# ----------------------------------------------------------------------------------------------------------------------

native: $(BINDIR)/$(MODULENAME)-native$(APP_EXT) $(BINDIR)/$(MODULENAME)-lv2$(LIB_EXT)
arm32: $(BINDIR)/$(MODULENAME)-arm32
posix32: $(BINDIR)/$(MODULENAME)-posix32
posix64: $(BINDIR)/$(MODULENAME)-posix64
win32: $(BINDIR)/$(MODULENAME)-win32.exe
@@ -253,6 +260,11 @@ $(BINDIR)/$(MODULENAME)-lv2$(LIB_EXT): $(OBJS_lv2) $(LIBS_native)
@echo "Linking $(MODULENAME)-lv2$(LIB_EXT)"
@$(CXX) $(OBJS_lv2) $(LIBS_START) $(LIBS_native) $(LIBS_END) $(SHARED) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@

$(BINDIR)/$(MODULENAME)-arm32: $(OBJS_arm32) $(LIBS_arm32)
-@mkdir -p $(BINDIR)
@echo "Linking $(MODULENAME)-arm32"
@$(CXX) $(OBJS_arm32) $(LIBS_START) $(LIBS_arm32) $(LIBS_END) $(LINK_FLAGS) $(ARM32_FLAGS) -o $@

$(BINDIR)/$(MODULENAME)-posix32: $(OBJS_posix32) $(LIBS_posix32)
-@mkdir -p $(BINDIR)
@echo "Linking $(MODULENAME)-posix32"
@@ -323,6 +335,29 @@ $(OBJDIR)/CarlaEng%.cpp.o: $(CWD)/backend/engine/CarlaEng%.cpp
@echo "Compiling CarlaEng$*.cpp (bridge)"
@$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@

# ----------------------------------------------------------------------------------------------------------------------
# arm32

$(OBJDIR)/CarlaBridgePlugin.cpp.arm32.o: CarlaBridgePlugin.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (arm32 bridge)"
@$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -c -o $@

$(OBJDIR)/CarlaStandalone.cpp.arm32.o: $(CWD)/backend/CarlaStandalone.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling CarlaStandalone.cpp (arm32 bridge)"
@$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -c -o $@

$(OBJDIR)/CarlaEng%.cpp.arm32.o: $(CWD)/backend/engine/CarlaEng%.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling CarlaEng$*.cpp (arm32 bridge)"
@$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -c -o $@

$(OBJDIR)/CarlaPlug%.cpp.arm32.o: $(CWD)/backend/plugin/CarlaPlug%.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling CarlaPlug$*.cpp (arm32 bridge)"
@$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -c -o $@

# ----------------------------------------------------------------------------------------------------------------------
# posix32

@@ -462,6 +497,7 @@ $(OBJDIR)/CarlaStandalone.cpp.win64.o: $(CWD)/backend/CarlaStandalone.cpp
# ----------------------------------------------------------------------------------------------------------------------

-include $(OBJS_lv2:%.o=%.d)
-include $(OBJS_arm32:%.o=%.d)
-include $(OBJS_posix32:%.o=%.d)
-include $(OBJS_posix64:%.o=%.d)
-include $(OBJS_win32:%.o=%.d)


+ 15
- 0
source/discovery/Makefile View File

@@ -40,6 +40,7 @@ endif

32BIT_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_ALTERNATIVE_ARCH
64BIT_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_ALTERNATIVE_ARCH
ARM32_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_ALTERNATIVE_ARCH

# ----------------------------------------------------------------------------------------------------------------------------

@@ -54,6 +55,7 @@ endif
# ----------------------------------------------------------------------------------------------------------------------------

LIBS_native = $(MODULEDIR)/lilv.a
LIBS_arm32 = $(MODULEDIR)/lilv.arm32.a
LIBS_posix32 = $(MODULEDIR)/lilv.posix32.a
LIBS_posix64 = $(MODULEDIR)/lilv.posix64.a
LIBS_win32 = $(MODULEDIR)/lilv.win32.a
@@ -126,6 +128,7 @@ endif # USING_JUCE
# ----------------------------------------------------------------------------------------------------------------------------

OBJS_native = $(OBJDIR)/$(MODULENAME).cpp.o
OBJS_arm32 = $(OBJDIR)/$(MODULENAME).cpp.arm32.o
OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o
OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o
OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o
@@ -146,6 +149,7 @@ debug:
# ----------------------------------------------------------------------------------------------------------------------------

native: $(BINDIR)/$(MODULENAME)-native$(APP_EXT)
arm32: $(BINDIR)/$(MODULENAME)-arm32
posix32: $(BINDIR)/$(MODULENAME)-posix32
posix64: $(BINDIR)/$(MODULENAME)-posix64
win32: $(BINDIR)/$(MODULENAME)-win32.exe
@@ -166,6 +170,11 @@ $(BINDIR)/$(MODULENAME)-native.exe: $(OBJS_native) $(LIBS_native)
@rm -f $(BINDIR)/$(MODULENAME)-win$(winv).exe
@ln -s $(MODULENAME)-native.exe $(BINDIR)/$(MODULENAME)-win$(winv).exe

$(BINDIR)/$(MODULENAME)-arm32: $(OBJS_arm32) $(LIBS_arm32)
-@mkdir -p $(BINDIR)
@echo "Linking $(MODULENAME)-posix32"
@$(CXX) $< $(LIBS_START) $(LIBS_arm32) $(LIBS_END) $(LINK_FLAGS) $(ARM32_FLAGS) -o $@

$(BINDIR)/$(MODULENAME)-posix32: $(OBJS_posix32) $(LIBS_posix32)
-@mkdir -p $(BINDIR)
@echo "Linking $(MODULENAME)-posix32"
@@ -203,9 +212,15 @@ $(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp
@echo "Compiling $< (64bit)"
@$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@

$(OBJDIR)/$(MODULENAME).cpp.arm32.o: $(MODULENAME).cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (ARM32)"
@$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -c -o $@

# ----------------------------------------------------------------------------------------------------------------------------

-include $(OBJS_native:%.o=%.d)
-include $(OBJS_arm32:%.o=%.d)
-include $(OBJS_posix32:%.o=%.d)
-include $(OBJS_posix64:%.o=%.d)
-include $(OBJS_win32:%.o=%.d)


+ 14
- 0
source/jackbridge/Makefile View File

@@ -38,6 +38,7 @@ endif
# ----------------------------------------------------------------------------------------------------------------------------

OBJS = $(OBJDIR)/JackBridge1.cpp.o $(OBJDIR)/JackBridge2.cpp.o
OBJS_arm32 = $(OBJDIR)/JackBridge1.cpp.arm32.o $(OBJDIR)/JackBridge2.cpp.arm32.o
OBJS_posix32 = $(OBJDIR)/JackBridge1.cpp.posix32.o $(OBJDIR)/JackBridge2.cpp.posix32.o
OBJS_posix64 = $(OBJDIR)/JackBridge1.cpp.posix64.o $(OBJDIR)/JackBridge2.cpp.posix64.o
OBJS_win32 = $(OBJDIR)/JackBridge1.cpp.win32.o $(OBJDIR)/JackBridge2.cpp.win32.o
@@ -66,6 +67,7 @@ win64e: $(MODULEDIR)/$(MODULENAME).win64e.a
wine32:
wine64:
else
arm32: $(MODULEDIR)/$(MODULENAME).arm32.a
posix32: $(MODULEDIR)/$(MODULENAME).posix32.a
posix64: $(MODULEDIR)/$(MODULENAME).posix64.a
posix32e: $(MODULEDIR)/$(MODULENAME).posix32e.a
@@ -94,6 +96,12 @@ $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
@rm -f $@
@$(AR) crs $@ $^

$(MODULEDIR)/$(MODULENAME).arm32.a: $(OBJS_arm32)
-@mkdir -p $(MODULEDIR)
@echo "Creating $(MODULENAME).arm32.a"
@rm -f $@
@$(AR) crs $@ $^

$(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
-@mkdir -p $(MODULEDIR)
@echo "Creating $(MODULENAME).posix32.a"
@@ -182,6 +190,11 @@ $(OBJDIR)/JackBridgeExport.cpp.%64e.o: JackBridgeExport.cpp

# ----------------------------------------------------------------------------------------------------------------------------

$(OBJDIR)/%.cpp.arm32.o: %.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (arm32)"
@$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -c -o $@

$(OBJDIR)/%.cpp.posix32.o: %.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (posix32)"
@@ -215,6 +228,7 @@ $(OBJDIR)/%.cpp.wine64.o: %.cpp
# ----------------------------------------------------------------------------------------------------------------------------

-include $(OBJS:%.o=%.d)
-include $(OBJS_arm32:%.o=%.d)
-include $(OBJS_posix32:%.o=%.d)
-include $(OBJS_posix32e:%.o=%.d)
-include $(OBJS_posix64:%.o=%.d)


+ 29
- 0
source/modules/lilv/Makefile View File

@@ -22,6 +22,7 @@ BUILD_C_FLAGS += $(LILV_FLAGS) -Iconfig -w
# ----------------------------------------------------------------------------------------------------------------------------

OBJS = $(OBJDIR)/serd.c.o $(OBJDIR)/sord.c.o $(OBJDIR)/sratom.c.o $(OBJDIR)/lilv.c.o
OBJS_arm32 = $(OBJDIR)/serd.c.arm32.o $(OBJDIR)/sord.c.arm32.o $(OBJDIR)/sratom.c.arm32.o $(OBJDIR)/lilv.c.arm32.o
OBJS_posix32 = $(OBJDIR)/serd.c.posix32.o $(OBJDIR)/sord.c.posix32.o $(OBJDIR)/sratom.c.posix32.o $(OBJDIR)/lilv.c.posix32.o
OBJS_posix64 = $(OBJDIR)/serd.c.posix64.o $(OBJDIR)/sord.c.posix64.o $(OBJDIR)/sratom.c.posix64.o $(OBJDIR)/lilv.c.posix64.o
OBJS_win32 = $(OBJDIR)/serd.c.win32.o $(OBJDIR)/sord.c.win32.o $(OBJDIR)/sratom.c.win32.o $(OBJDIR)/lilv.c.win32.o
@@ -30,6 +31,7 @@ OBJS_win64 = $(OBJDIR)/serd.c.win64.o $(OBJDIR)/sord.c.win64.o $(OBJDIR)/s
# ----------------------------------------------------------------------------------------------------------------------------

all: $(MODULEDIR)/$(MODULENAME).a
arm32: $(MODULEDIR)/$(MODULENAME).arm32.a
posix32: $(MODULEDIR)/$(MODULENAME).posix32.a
posix64: $(MODULEDIR)/$(MODULENAME).posix64.a
win32: $(MODULEDIR)/$(MODULENAME).win32.a
@@ -51,6 +53,12 @@ $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
@rm -f $@
@$(AR) crs $@ $^

$(MODULEDIR)/$(MODULENAME).arm32.a: $(OBJS_arm32)
-@mkdir -p $(MODULEDIR)
@echo "Creating $(MODULENAME).arm32.a"
@rm -f $@
@$(AR) crs $@ $^

$(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
-@mkdir -p $(MODULEDIR)
@echo "Creating $(MODULENAME).posix32.a"
@@ -92,6 +100,11 @@ $(OBJDIR)/serd.c.%64.o: serd.c
@echo "Compiling $< (64bit)"
@$(CC) $< $(BUILD_C_FLAGS) -Iserd-$(SERD_VERSION) $(64BIT_FLAGS) -c -o $@

$(OBJDIR)/serd.c.arm32.o: serd.c
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (ARM32)"
@$(CC) $< $(BUILD_C_FLAGS) -Iserd-$(SERD_VERSION) $(ARM32_FLAGS) -c -o $@

# ----------------------------------------------------------------------------------------------------------------------------

$(OBJDIR)/sord.c.o: sord.c
@@ -109,6 +122,11 @@ $(OBJDIR)/sord.c.%64.o: sord.c
@echo "Compiling $< (64bit)"
@$(CC) $< $(BUILD_C_FLAGS) -Isord-$(SORD_VERSION) -Isord-$(SORD_VERSION)/src $(64BIT_FLAGS) -c -o $@

$(OBJDIR)/sord.c.arm32.o: sord.c
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (ARM32)"
@$(CC) $< $(BUILD_C_FLAGS) -Isord-$(SORD_VERSION) -Isord-$(SORD_VERSION)/src $(ARM32_FLAGS) -c -o $@

# ----------------------------------------------------------------------------------------------------------------------------

$(OBJDIR)/sratom.c.o: sratom.c
@@ -126,6 +144,11 @@ $(OBJDIR)/sratom.c.%64.o: sratom.c
@echo "Compiling $< (64bit)"
@$(CC) $< $(BUILD_C_FLAGS) -Isratom-$(SRATOM_VERSION) $(64BIT_FLAGS) -c -o $@

$(OBJDIR)/sratom.c.arm32.o: sratom.c
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (ARM32)"
@$(CC) $< $(BUILD_C_FLAGS) -Isratom-$(SRATOM_VERSION) $(ARM32_FLAGS) -c -o $@

# ----------------------------------------------------------------------------------------------------------------------------

$(OBJDIR)/lilv.c.o: lilv.c
@@ -143,9 +166,15 @@ $(OBJDIR)/lilv.c.%64.o: lilv.c
@echo "Compiling $< (64bit)"
@$(CC) $< $(BUILD_C_FLAGS) -Ililv-$(LILV_VERSION) -Ililv-$(LILV_VERSION)/src $(64BIT_FLAGS) -c -o $@

$(OBJDIR)/lilv.c.arm32.o: lilv.c
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (ARM32)"
@$(CC) $< $(BUILD_C_FLAGS) -Ililv-$(LILV_VERSION) -Ililv-$(LILV_VERSION)/src $(ARM32_FLAGS) -c -o $@

# ----------------------------------------------------------------------------------------------------------------------------

-include $(OBJS:%.o=%.d)
-include $(OBJS_arm32:%.o=%.d)
-include $(OBJS_posix32:%.o=%.d)
-include $(OBJS_posix64:%.o=%.d)
-include $(OBJS_win32:%.o=%.d)


+ 14
- 0
source/modules/rtmempool/Makefile View File

@@ -15,6 +15,7 @@ BUILD_C_FLAGS += $(RTMEMPOOL_FLAGS)
# ----------------------------------------------------------------------------------------------------------------------------

OBJS = $(OBJDIR)/$(MODULENAME).c.o
OBJS_arm32 = $(OBJDIR)/$(MODULENAME).c.arm32.o
OBJS_posix32 = $(OBJDIR)/$(MODULENAME).c.posix32.o
OBJS_posix64 = $(OBJDIR)/$(MODULENAME).c.posix64.o
OBJS_win32 = $(OBJDIR)/$(MODULENAME).c.win32.o
@@ -23,6 +24,7 @@ OBJS_win64 = $(OBJDIR)/$(MODULENAME).c.win64.o
# ----------------------------------------------------------------------------------------------------------------------------

all: $(MODULEDIR)/$(MODULENAME).a
arm32: $(MODULEDIR)/$(MODULENAME).arm32.a
posix32: $(MODULEDIR)/$(MODULENAME).posix32.a
posix64: $(MODULEDIR)/$(MODULENAME).posix64.a
win32: $(MODULEDIR)/$(MODULENAME).win32.a
@@ -44,6 +46,12 @@ $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
@rm -f $@
@$(AR) crs $@ $^

$(MODULEDIR)/$(MODULENAME).arm32.a: $(OBJS_arm32)
-@mkdir -p $(MODULEDIR)
@echo "Creating $(MODULENAME).arm32.a"
@rm -f $@
@$(AR) crs $@ $^

$(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
-@mkdir -p $(MODULEDIR)
@echo "Creating $(MODULENAME).posix32.a"
@@ -85,9 +93,15 @@ $(OBJDIR)/$(MODULENAME).c.%64.o: $(MODULENAME).c
@echo "Compiling $< (64bit)"
@$(CC) $< $(BUILD_C_FLAGS) $(64BIT_FLAGS) -c -o $@

$(OBJDIR)/$(MODULENAME).c.arm32.o: $(MODULENAME).c
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (ARM32)"
@$(CC) $< $(BUILD_C_FLAGS) $(ARM32_FLAGS) -c -o $@

# ----------------------------------------------------------------------------------------------------------------------------

-include $(OBJS:%.o=%.d)
-include $(OBJS_arm32:%.o=%.d)
-include $(OBJS_posix32:%.o=%.d)
-include $(OBJS_posix64:%.o=%.d)
-include $(OBJS_win32:%.o=%.d)


+ 14
- 0
source/modules/water/Makefile View File

@@ -22,6 +22,7 @@ OBJS_posix64 = $(OBJDIR)/$(MODULENAME).mm.posix64.o
else
OBJS = $(OBJDIR)/$(MODULENAME).cpp.o
OBJS_files = $(OBJDIR)/$(MODULENAME).cpp.files.o
OBJS_arm32 = $(OBJDIR)/$(MODULENAME).cpp.arm32.o
OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o
OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o
endif
@@ -31,6 +32,7 @@ OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o
# ----------------------------------------------------------------------------------------------------------------------------

all: $(MODULEDIR)/$(MODULENAME).a $(MODULEDIR)/$(MODULENAME).files.a
arm32: $(MODULEDIR)/$(MODULENAME).arm32.a
posix32: $(MODULEDIR)/$(MODULENAME).posix32.a
posix64: $(MODULEDIR)/$(MODULENAME).posix64.a
win32: $(MODULEDIR)/$(MODULENAME).win32.a
@@ -58,6 +60,12 @@ $(MODULEDIR)/$(MODULENAME).files.a: $(OBJS_files)
@rm -f $@
@$(AR) crs $@ $^

$(MODULEDIR)/$(MODULENAME).arm32.a: $(OBJS_arm32)
-@mkdir -p $(MODULEDIR)
@echo "Creating $(MODULENAME).arm32.a"
@rm -f $@
@$(AR) crs $@ $^

$(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
-@mkdir -p $(MODULEDIR)
@echo "Creating $(MODULENAME).posix32.a"
@@ -104,6 +112,11 @@ $(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp
@echo "Compiling $< (64bit)"
@$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@

$(OBJDIR)/$(MODULENAME).cpp.arm32.o: $(MODULENAME).cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (ARM32)"
@$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -c -o $@

# ----------------------------------------------------------------------------------------------------------------------------

$(OBJDIR)/$(MODULENAME).mm.o: $(MODULENAME).mm $(MODULENAME).cpp
@@ -130,6 +143,7 @@ $(OBJDIR)/$(MODULENAME).mm.%64.o: $(MODULENAME).cpp

-include $(OBJS:%.o=%.d)
-include $(OBJS_files:%.o=%.d)
-include $(OBJS_arm32:%.o=%.d)
-include $(OBJS_posix32:%.o=%.d)
-include $(OBJS_posix64:%.o=%.d)
-include $(OBJS_win32:%.o=%.d)


Loading…
Cancel
Save