Browse Source

First attempt to make it work on Hurd

tags/1.9.8
falkTX 7 years ago
parent
commit
51540d510e
3 changed files with 36 additions and 11 deletions
  1. +33
    -10
      source/Makefile.mk
  2. +2
    -0
      source/includes/CarlaDefines.h
  3. +1
    -1
      source/utils/CarlaThread.hpp

+ 33
- 10
source/Makefile.mk View File

@@ -22,6 +22,7 @@ CXX ?= g++

ifneq ($(BSD),true)
ifneq ($(HAIKU),true)
ifneq ($(HURD),true)
ifneq ($(MACOS),true)
ifneq ($(WIN32),true)
LINUX=true
@@ -29,6 +30,7 @@ endif
endif
endif
endif
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set LINUX_OR_MACOS
@@ -59,6 +61,10 @@ ifeq ($(BSD),true)
UNIX=true
endif

ifeq ($(HURD),true)
UNIX=true
endif

ifeq ($(LINUX),true)
UNIX=true
endif
@@ -176,13 +182,13 @@ endif
# ---------------------------------------------------------------------------------------------------------------------
# Check for optional libs (required by backend or bridges)

ifneq ($(MACOS_OR_WIN32),true)
HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true)
HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true)
HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
HAVE_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true)
HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true)
HAVE_X11 = $(shell pkg-config --exists x11 && echo true)
ifeq ($(HURD),true)
HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
endif
ifeq ($(LINUX),true)
HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
HAVE_HYLIA = true
endif

ifeq ($(MACOS),true)
@@ -191,9 +197,13 @@ HAVE_HYLIA = true
endif
endif

ifeq ($(LINUX),true)
HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
HAVE_HYLIA = true
ifneq ($(MACOS_OR_WIN32),true)
HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true)
HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true)
HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
HAVE_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true)
HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true)
HAVE_X11 = $(shell pkg-config --exists x11 && echo true)
endif

HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && echo true)
@@ -422,6 +432,19 @@ RTMEMPOOL_LIBS = -lpthread
WATER_LIBS = -lpthread
endif

ifeq ($(HURD),true)
JACKBRIDGE_LIBS = -ldl -lpthread -lrt
LILV_LIBS = -ldl -lm -lrt
RTMEMPOOL_LIBS = -lpthread -lrt
WATER_LIBS = -ldl -lpthread -lrt
ifeq ($(HAVE_ALSA),true)
RTAUDIO_FLAGS += $(shell pkg-config --cflags alsa) -D__LINUX_ALSA__
RTAUDIO_LIBS += $(shell pkg-config --libs alsa) -lpthread
RTMIDI_FLAGS += $(shell pkg-config --cflags alsa) -D__LINUX_ALSA__
RTMIDI_LIBS += $(shell pkg-config --libs alsa)
endif
endif

ifeq ($(LINUX),true)
HYLIA_FLAGS = -DLINK_PLATFORM_LINUX=1
JACKBRIDGE_LIBS = -ldl -lpthread -lrt


+ 2
- 0
source/includes/CarlaDefines.h View File

@@ -48,6 +48,8 @@
# define CARLA_OS_LINUX
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
# define CARLA_OS_BSD
#elif defined(__GNU__)
# define CARLA_OS_GNU_HURD
#else
# warning Unsupported platform!
#endif


+ 1
- 1
source/utils/CarlaThread.hpp View File

@@ -207,7 +207,7 @@ public:
#ifdef CARLA_OS_LINUX
prctl(PR_SET_NAME, name, 0, 0, 0);
#endif
#if defined(__GLIBC__) && (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
#if defined(__GLIBC__) && (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012 && !defined(CARLA_OS_GNU_HURD)
pthread_setname_np(pthread_self(), name);
#endif
}


Loading…
Cancel
Save