Browse Source

Tweak wine linkage

tags/1.9.4
falkTX 11 years ago
parent
commit
b4ae671740
3 changed files with 19 additions and 13 deletions
  1. +5
    -0
      source/backend/engine/CarlaEngineJack.cpp
  2. +8
    -7
      source/libs/jackbridge/JackBridge2.cpp
  3. +6
    -6
      source/libs/jackbridge/Makefile

+ 5
- 0
source/backend/engine/CarlaEngineJack.cpp View File

@@ -871,6 +871,11 @@ public:
#ifdef BUILD_BRIDGE #ifdef BUILD_BRIDGE
client = fClient = jackbridge_client_open(plugin->name(), JackNullOption, nullptr); client = fClient = jackbridge_client_open(plugin->name(), JackNullOption, nullptr);


CARLA_ASSERT(client != nullptr);

if (client == nullptr)
return nullptr;

fBufferSize = jackbridge_get_buffer_size(client); fBufferSize = jackbridge_get_buffer_size(client);
fSampleRate = jackbridge_get_sample_rate(client); fSampleRate = jackbridge_get_sample_rate(client);




+ 8
- 7
source/libs/jackbridge/JackBridge2.cpp View File

@@ -50,15 +50,16 @@ bool jackbridge_sem_timedwait(void*, int)


#include <semaphore.h> #include <semaphore.h>


//#ifdef __WINE__
//# define _STRUCT_TIMEVAL 1
//# define _SYS_SELECT_H 1
//# include <bits/types.h>
//struct timespec {
// #ifdef __WINE__
// # warning Using Wine
// # define _STRUCT_TIMEVAL 1
// # define _SYS_SELECT_H 1
// # include <bits/types.h>
// struct timespec {
// __time_t tv_sec; /* Seconds. */ // __time_t tv_sec; /* Seconds. */
// long int tv_nsec; /* Nanoseconds. */ // long int tv_nsec; /* Nanoseconds. */
//};
//#endif
// };
// #endif


#ifdef CARLA_OS_WIN #ifdef CARLA_OS_WIN
# include <sys/time.h> # include <sys/time.h>


+ 6
- 6
source/libs/jackbridge/Makefile View File

@@ -24,10 +24,10 @@ WIN_32BIT_FLAGS = $(32BIT_FLAGS)
WIN_64BIT_FLAGS = $(64BIT_FLAGS) WIN_64BIT_FLAGS = $(64BIT_FLAGS)
WIN_LINK_FLAGS = $(LINK_FLAGS) WIN_LINK_FLAGS = $(LINK_FLAGS)


WINE_BUILD_FLAGS = $(BUILD_CXX_FLAGS) -DJACKBRIDGE_DIRECT=1 -fPIC
WINE_BUILD_FLAGS = $(BUILD_CXX_FLAGS) -fPIC
WINE_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32/wine -L/usr/lib/i386-linux-gnu/wine WINE_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32/wine -L/usr/lib/i386-linux-gnu/wine
WINE_64BIT_FLAGS = $(64BIT_FLAGS) -L/usr/lib64/wine -L/usr/lib/x86_64-linux-gnu/wine WINE_64BIT_FLAGS = $(64BIT_FLAGS) -L/usr/lib64/wine -L/usr/lib/x86_64-linux-gnu/wine
WINE_LINK_FLAGS = $(LINK_FLAGS) -ldl -lrt -lpthread -ljack
WINE_LINK_FLAGS = $(LINK_FLAGS) -ldl -lrt -lpthread


OBJS = JackBridge1.cpp JackBridge2.cpp OBJS = JackBridge1.cpp JackBridge2.cpp
OBJSw32 = JackBridge1.w32.o JackBridge2.w32.o OBJSw32 = JackBridge1.w32.o JackBridge2.w32.o
@@ -58,10 +58,10 @@ JackBridge%.w64.o: JackBridge%.cpp
../jackbridge-win64.dll: $(OBJS) ../jackbridge-win64.dll: $(OBJS)
$(CXX) $^ $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -Wl,--output-def,$@.def,--out-implib,$@.a -o $@ $(CMD_STRIP) $@ $(CXX) $^ $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -Wl,--output-def,$@.def,--out-implib,$@.a -o $@ $(CMD_STRIP) $@


../jackbridge-win32.dll.so: JackBridge1.cpp JackBridge2.cpp ../jackbridge-win32.dll.def
$(WINECXX) $^ $(WIN_BUILD_FLAGS) $(WINE_32BIT_FLAGS) $(WINE_LINK_FLAGS) -mno-cygwin -o $@ $(CMD_STRIP) $@
../jackbridge-win32.dll.so: $(OBJSw32) ../jackbridge-win32.dll.def
$(WINECXX) $^ $(WINE_32BIT_FLAGS) $(WINE_LINK_FLAGS) -o $@ $(CMD_STRIP) $@


../jackbridge-win64.dll.so: JackBridge1.cpp JackBridge2.cpp ../jackbridge-win64.dll.def
$(WINECXX) $^ $(WIN_BUILD_FLAGS) $(WINE_64BIT_FLAGS) $(WINE_LINK_FLAGS) -mno-cygwin -o $@ $(CMD_STRIP) $@
../jackbridge-win64.dll.so: $(OBJS) ../jackbridge-win64.dll.def
$(WINECXX) $^ $(WINE_64BIT_FLAGS) $(WINE_LINK_FLAGS) -o $@ $(CMD_STRIP) $@


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

Loading…
Cancel
Save