Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

577 lines
16KB

  1. #!/usr/bin/make -f
  2. # Makefile for Carla C++ code #
  3. # --------------------------- #
  4. # Created by falkTX
  5. #
  6. # ---------------------------------------------------------------------------------------------------------------------
  7. # Base environment vars
  8. AR ?= ar
  9. CC ?= gcc
  10. CXX ?= g++
  11. WINECC ?= winegcc
  12. # ---------------------------------------------------------------------------------------------------------------------
  13. # Auto-detect OS if not defined
  14. ifneq ($(BSD),true)
  15. ifneq ($(HAIKU),true)
  16. ifneq ($(HURD),true)
  17. ifneq ($(LINUX),true)
  18. ifneq ($(MACOS),true)
  19. ifneq ($(WIN32),true)
  20. TARGET_MACHINE := $(shell $(CC) -dumpmachine)
  21. ifneq (,$(findstring bsd,$(TARGET_MACHINE)))
  22. BSD=true
  23. endif
  24. ifneq (,$(findstring haiku,$(TARGET_MACHINE)))
  25. HAIKU=true
  26. endif
  27. ifneq (,$(findstring gnu,$(TARGET_MACHINE)))
  28. HURD=true
  29. endif
  30. ifneq (,$(findstring linux,$(TARGET_MACHINE)))
  31. LINUX=true
  32. endif
  33. ifneq (,$(findstring apple,$(TARGET_MACHINE)))
  34. MACOS=true
  35. endif
  36. ifneq (,$(findstring mingw,$(TARGET_MACHINE)))
  37. WIN32=true
  38. endif
  39. endif
  40. endif
  41. endif
  42. endif
  43. endif
  44. endif
  45. # ---------------------------------------------------------------------------------------------------------------------
  46. # Set LINUX_OR_MACOS
  47. ifeq ($(LINUX),true)
  48. LINUX_OR_MACOS=true
  49. endif
  50. ifeq ($(MACOS),true)
  51. LINUX_OR_MACOS=true
  52. endif
  53. # ---------------------------------------------------------------------------------------------------------------------
  54. # Set MACOS_OR_WIN32
  55. ifeq ($(MACOS),true)
  56. MACOS_OR_WIN32=true
  57. endif
  58. ifeq ($(WIN32),true)
  59. MACOS_OR_WIN32=true
  60. endif
  61. # ---------------------------------------------------------------------------------------------------------------------
  62. # Set UNIX
  63. ifeq ($(BSD),true)
  64. UNIX=true
  65. endif
  66. ifeq ($(HURD),true)
  67. UNIX=true
  68. endif
  69. ifeq ($(LINUX),true)
  70. UNIX=true
  71. endif
  72. ifeq ($(MACOS),true)
  73. UNIX=true
  74. endif
  75. # ---------------------------------------------------------------------------------------------------------------------
  76. # Set USING_JUCE
  77. ifeq ($(MACOS_OR_WIN32),true)
  78. USING_JUCE=true
  79. endif
  80. # ---------------------------------------------------------------------------------------------------------------------
  81. # Set build and link flags
  82. BASE_FLAGS = -Wall -Wextra -pipe -DBUILDING_CARLA -DREAL_BUILD -MD -MP
  83. BASE_OPTS = -O3 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse -fdata-sections -ffunction-sections
  84. ifeq ($(MACOS),true)
  85. # MacOS linker flags
  86. LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs
  87. else
  88. # Common linker flags
  89. LINK_OPTS = -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-O1 -Wl,--as-needed
  90. ifneq ($(SKIP_STRIPPING),true)
  91. LINK_OPTS += -Wl,--strip-all
  92. endif
  93. endif
  94. ifeq ($(NOOPT),true)
  95. # No CPU-specific optimization flags
  96. BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections
  97. endif
  98. ifeq ($(WIN32),true)
  99. # mingw has issues with this specific optimization
  100. # See https://github.com/falkTX/Carla/issues/696
  101. BASE_OPTS += -fno-rerun-cse-after-loop
  102. ifeq ($(BUILDING_FOR_WINDOWS),true)
  103. BASE_FLAGS += -DBUILDING_CARLA_FOR_WINDOWS
  104. endif
  105. else
  106. # Not needed for Windows
  107. BASE_FLAGS += -fPIC -DPIC
  108. endif
  109. ifeq ($(CLANG),true)
  110. BASE_FLAGS += -Wabsolute-value
  111. endif
  112. ifeq ($(DEBUG),true)
  113. BASE_FLAGS += -DDEBUG -O0 -g
  114. LINK_OPTS =
  115. else
  116. BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
  117. CXXFLAGS += -fvisibility-inlines-hidden
  118. endif
  119. 32BIT_FLAGS = -m32
  120. 64BIT_FLAGS = -m64
  121. BUILD_C_FLAGS = $(BASE_FLAGS) -std=gnu99 $(CFLAGS)
  122. BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=gnu++0x $(CXXFLAGS)
  123. LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
  124. ifneq ($(MACOS),true)
  125. # Not available on MacOS
  126. LINK_FLAGS += -Wl,--no-undefined
  127. endif
  128. ifeq ($(MACOS_OLD),true)
  129. BUILD_CXX_FLAGS = $(BASE_FLAGS) $(CXXFLAGS) -DHAVE_CPP11_SUPPORT=0
  130. endif
  131. ifeq ($(WIN32),true)
  132. # Always build statically on windows
  133. LINK_FLAGS += -static
  134. endif
  135. # ---------------------------------------------------------------------------------------------------------------------
  136. # Strict test build
  137. ifeq ($(TESTBUILD),true)
  138. BASE_FLAGS += -Werror -Wabi=98 -Wcast-qual -Wclobbered -Wconversion -Wdisabled-optimization -Wfloat-equal -Wformat=2 -Winit-self -Wmissing-declarations
  139. BASE_FLAGS += -Woverlength-strings -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wundef -Wuninitialized -Wunused
  140. BASE_FLAGS += -Wstrict-aliasing -fstrict-aliasing
  141. BASE_FLAGS += -Wstrict-overflow -fstrict-overflow
  142. CFLAGS += -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings
  143. CXXFLAGS += -Wc++0x-compat -Wc++11-compat -Weffc++ -Wnon-virtual-dtor -Woverloaded-virtual -Wzero-as-null-pointer-constant
  144. ifeq ($(LINUX),true)
  145. BASE_FLAGS += -isystem /opt/kxstudio/include
  146. CXXFLAGS += -isystem /usr/include/glib-2.0
  147. CXXFLAGS += -isystem /usr/include/glib-2.0/glib
  148. CXXFLAGS += -isystem /usr/include/gtk-2.0
  149. CXXFLAGS += -isystem /usr/include/gtk-2.0/gio
  150. CXXFLAGS += -isystem /usr/include/qt5
  151. endif
  152. ifeq ($(MACOS),true)
  153. BASE_FLAGS += -isystem /opt/kxstudio/include
  154. CXXFLAGS += -isystem /System/Library/Frameworks
  155. endif
  156. ifeq ($(WIN64),true)
  157. BASE_FLAGS += -isystem /opt/mingw64/include
  158. else
  159. ifeq ($(WIN32),true)
  160. BASE_FLAGS += -isystem /opt/mingw32/include
  161. endif
  162. endif
  163. endif
  164. # ---------------------------------------------------------------------------------------------------------------------
  165. # Check for optional libs (required by backend or bridges)
  166. ifeq ($(LINUX),true)
  167. HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
  168. HAVE_HYLIA = true
  169. endif
  170. ifeq ($(MACOS),true)
  171. ifneq ($(MACOS_OLD),true)
  172. HAVE_HYLIA = true
  173. endif
  174. endif
  175. ifeq ($(MACOS_OR_WIN32),true)
  176. HAVE_DGL = true
  177. else
  178. HAVE_DGL = $(shell pkg-config --exists gl x11 && echo true)
  179. HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true)
  180. HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true)
  181. HAVE_X11 = $(shell pkg-config --exists x11 && echo true)
  182. endif
  183. ifeq ($(UNIX),true)
  184. ifneq ($(MACOS),true)
  185. HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
  186. endif
  187. endif
  188. HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && echo true)
  189. HAVE_FLUIDSYNTH = $(shell pkg-config --atleast-version=1.1.7 fluidsynth && echo true)
  190. HAVE_LIBLO = $(shell pkg-config --exists liblo && echo true)
  191. HAVE_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true)
  192. HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true)
  193. HAVE_SNDFILE = $(shell pkg-config --exists sndfile && echo true)
  194. # ---------------------------------------------------------------------------------------------------------------------
  195. # Check for optional libs (special non-pkgconfig tests)
  196. ifneq ($(WIN32),true)
  197. # libmagic doesn't have a pkg-config file, so we need to call the compiler to test it
  198. HAVE_LIBMAGIC = $(shell echo '\#include <magic.h>' | $(CC) $(CFLAGS) -x c -w -c - -o .libmagic-tmp 2>/dev/null && echo true)
  199. endif
  200. # ---------------------------------------------------------------------------------------------------------------------
  201. # Set Qt tools
  202. ifeq ($(HAVE_QT4),true)
  203. MOC_QT4 ?= $(shell pkg-config --variable=moc_location QtCore)
  204. RCC_QT4 ?= $(shell pkg-config --variable=rcc_location QtCore)
  205. UIC_QT4 ?= $(shell pkg-config --variable=uic_location QtCore)
  206. ifeq (,$(wildcard $(MOC_QT4)))
  207. HAVE_QT4=false
  208. endif
  209. ifeq (,$(wildcard $(RCC_QT4)))
  210. HAVE_QT4=false
  211. endif
  212. endif
  213. ifeq ($(HAVE_QT5),true)
  214. QT5_HOSTBINS = $(shell pkg-config --variable=host_bins Qt5Core)
  215. MOC_QT5 ?= $(QT5_HOSTBINS)/moc
  216. RCC_QT5 ?= $(QT5_HOSTBINS)/rcc
  217. UIC_QT5 ?= $(QT5_HOSTBINS)/uic
  218. ifeq (,$(wildcard $(MOC_QT5)))
  219. HAVE_QT5=false
  220. endif
  221. ifeq (,$(wildcard $(RCC_QT5)))
  222. HAVE_QT5=false
  223. endif
  224. endif
  225. ifeq ($(HAVE_QT4),true)
  226. HAVE_QT=true
  227. endif
  228. ifeq ($(HAVE_QT5),true)
  229. HAVE_QT=true
  230. endif
  231. ifeq ($(WIN32),true)
  232. HAVE_QT=true
  233. endif
  234. # ---------------------------------------------------------------------------------------------------------------------
  235. # Set PyQt tools
  236. PYRCC5 ?= $(shell which pyrcc5 2>/dev/null)
  237. PYUIC5 ?= $(shell which pyuic5 2>/dev/null)
  238. ifneq ($(PYUIC5),)
  239. ifneq ($(PYRCC5),)
  240. HAVE_PYQT=true
  241. endif
  242. endif
  243. # ---------------------------------------------------------------------------------------------------------------------
  244. # Set PyQt tools, part2
  245. PYUIC ?= pyuic5
  246. PYRCC ?= pyrcc5
  247. ifeq ($(HAVE_QT5),true)
  248. HAVE_THEME = true
  249. endif
  250. # ---------------------------------------------------------------------------------------------------------------------
  251. # Set base defines
  252. ifeq ($(HAVE_DGL),true)
  253. BASE_FLAGS += -DHAVE_DGL
  254. BASE_FLAGS += -DDGL_NAMESPACE=CarlaDGL -DDGL_FILE_BROWSER_DISABLED -DDGL_NO_SHARED_RESOURCES
  255. endif
  256. ifeq ($(HAVE_FLUIDSYNTH),true)
  257. BASE_FLAGS += -DHAVE_FLUIDSYNTH
  258. endif
  259. ifeq ($(HAVE_FFMPEG),true)
  260. BASE_FLAGS += -DHAVE_FFMPEG
  261. endif
  262. ifeq ($(HAVE_HYLIA),true)
  263. BASE_FLAGS += -DHAVE_HYLIA
  264. endif
  265. ifeq ($(HAVE_LIBLO),true)
  266. BASE_FLAGS += -DHAVE_LIBLO
  267. endif
  268. ifeq ($(HAVE_LIBMAGIC),true)
  269. BASE_FLAGS += -DHAVE_LIBMAGIC
  270. endif
  271. ifeq ($(HAVE_PYQT),true)
  272. BASE_FLAGS += -DHAVE_PYQT
  273. endif
  274. ifeq ($(HAVE_SNDFILE),true)
  275. BASE_FLAGS += -DHAVE_SNDFILE
  276. endif
  277. ifeq ($(HAVE_X11),true)
  278. BASE_FLAGS += -DHAVE_X11
  279. endif
  280. ifeq ($(USING_JUCE),true)
  281. BASE_FLAGS += -DUSING_JUCE
  282. BUILD_CXX_FLAGS += -DJUCE_APP_CONFIG_HEADER='<AppConfig.h>'
  283. endif
  284. # ---------------------------------------------------------------------------------------------------------------------
  285. # Set libs stuff (part 1)
  286. ifeq ($(LINUX_OR_MACOS),true)
  287. LIBDL_LIBS = -ldl
  288. endif
  289. ifeq ($(WIN32),true)
  290. PKG_CONFIG_FLAGS = --static
  291. endif
  292. ifeq ($(HAVE_DGL),true)
  293. ifeq ($(MACOS),true)
  294. DGL_LIBS = -framework OpenGL -framework Cocoa
  295. endif
  296. ifeq ($(WIN32),true)
  297. DGL_LIBS = -lopengl32 -lgdi32
  298. endif
  299. ifneq ($(MACOS_OR_WIN32),true)
  300. DGL_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags gl x11)
  301. DGL_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs gl x11)
  302. endif
  303. endif
  304. ifeq ($(HAVE_LIBLO),true)
  305. LIBLO_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags liblo)
  306. LIBLO_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs liblo)
  307. endif
  308. ifeq ($(HAVE_LIBMAGIC),true)
  309. MAGIC_LIBS += -lmagic
  310. ifeq ($(LINUX_OR_MACOS),true)
  311. MAGIC_LIBS += -lz
  312. endif
  313. endif
  314. ifeq ($(HAVE_FFMPEG),true)
  315. FFMPEG_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags libavcodec libavformat libavutil)
  316. FFMPEG_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs libavcodec libavformat libavutil)
  317. endif
  318. ifeq ($(HAVE_FLUIDSYNTH),true)
  319. FLUIDSYNTH_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags fluidsynth)
  320. FLUIDSYNTH_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs fluidsynth)
  321. endif
  322. ifeq ($(HAVE_SNDFILE),true)
  323. SNDFILE_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags sndfile)
  324. SNDFILE_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs sndfile)
  325. endif
  326. ifeq ($(HAVE_X11),true)
  327. X11_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags x11)
  328. X11_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs x11)
  329. endif
  330. # ---------------------------------------------------------------------------------------------------------------------
  331. # Set libs stuff (part 2)
  332. ifneq ($(USING_JUCE),true)
  333. RTAUDIO_FLAGS = -DHAVE_GETTIMEOFDAY
  334. RTMIDI_FLAGS =
  335. ifeq ($(DEBUG),true)
  336. RTAUDIO_FLAGS += -D__RTAUDIO_DEBUG__
  337. RTMIDI_FLAGS += -D__RTMIDI_DEBUG__
  338. endif
  339. ifeq ($(UNIX),true)
  340. RTAUDIO_FLAGS += -D__UNIX_JACK__
  341. ifeq ($(HAVE_PULSEAUDIO),true)
  342. RTAUDIO_FLAGS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags libpulse-simple) -D__UNIX_PULSE__
  343. RTAUDIO_LIBS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs libpulse-simple)
  344. endif
  345. endif
  346. endif # USING_JUCE
  347. ifeq ($(BSD),true)
  348. JACKBRIDGE_LIBS = -lpthread -lrt
  349. LILV_LIBS = -lm -lrt
  350. RTMEMPOOL_LIBS = -lpthread
  351. WATER_LIBS = -lpthread -lrt
  352. endif
  353. ifeq ($(HAIKU),true)
  354. JACKBRIDGE_LIBS = -lpthread
  355. LILV_LIBS = -lm
  356. RTMEMPOOL_LIBS = -lpthread
  357. WATER_LIBS = -lpthread
  358. endif
  359. ifeq ($(HURD),true)
  360. JACKBRIDGE_LIBS = -ldl -lpthread -lrt
  361. LILV_LIBS = -ldl -lm -lrt
  362. RTMEMPOOL_LIBS = -lpthread -lrt
  363. WATER_LIBS = -ldl -lpthread -lrt
  364. endif
  365. ifeq ($(LINUX),true)
  366. HYLIA_FLAGS = -DLINK_PLATFORM_LINUX=1
  367. JACKBRIDGE_LIBS = -ldl -lpthread -lrt
  368. LILV_LIBS = -ldl -lm -lrt
  369. RTMEMPOOL_LIBS = -lpthread -lrt
  370. WATER_LIBS = -ldl -lpthread -lrt
  371. ifeq ($(USING_JUCE),true)
  372. JUCE_CORE_LIBS = -ldl -lpthread -lrt
  373. JUCE_AUDIO_DEVICES_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs alsa)
  374. else
  375. ifeq ($(HAVE_ALSA),true)
  376. RTAUDIO_FLAGS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags alsa) -D__LINUX_ALSA__
  377. RTAUDIO_LIBS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs alsa) -lpthread
  378. RTMIDI_FLAGS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags alsa) -D__LINUX_ALSA__
  379. RTMIDI_LIBS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs alsa)
  380. endif
  381. endif
  382. endif
  383. ifeq ($(MACOS),true)
  384. HYLIA_FLAGS = -DLINK_PLATFORM_MACOSX=1
  385. JACKBRIDGE_LIBS = -ldl -lpthread
  386. LILV_LIBS = -ldl -lm
  387. RTMEMPOOL_LIBS = -lpthread
  388. WATER_LIBS = -framework AppKit
  389. ifeq ($(USING_JUCE),true)
  390. JUCE_AUDIO_BASICS_LIBS = -framework Accelerate
  391. JUCE_AUDIO_DEVICES_LIBS = -framework AppKit -framework AudioToolbox -framework CoreAudio -framework CoreMIDI
  392. JUCE_AUDIO_FORMATS_LIBS = -framework AudioToolbox -framework CoreFoundation
  393. JUCE_AUDIO_PROCESSORS_LIBS = -framework AudioToolbox -framework AudioUnit -framework CoreAudio -framework CoreAudioKit -framework Cocoa -framework Carbon
  394. JUCE_CORE_LIBS = -framework AppKit
  395. JUCE_EVENTS_LIBS = -framework AppKit
  396. JUCE_GRAPHICS_LIBS = -framework Cocoa -framework QuartzCore
  397. JUCE_GUI_BASICS_LIBS = -framework Cocoa
  398. else
  399. RTAUDIO_FLAGS += -D__MACOSX_CORE__
  400. RTAUDIO_LIBS += -framework CoreAudio
  401. RTMIDI_FLAGS += -D__MACOSX_CORE__
  402. RTMIDI_LIBS += -framework CoreMIDI
  403. endif
  404. endif
  405. ifeq ($(WIN32),true)
  406. HYLIA_FLAGS = -DLINK_PLATFORM_WINDOWS=1
  407. JACKBRIDGE_LIBS = -lpthread
  408. LILV_LIBS = -lm
  409. RTMEMPOOL_LIBS = -lpthread
  410. WATER_LIBS = -luuid -lwsock32 -lwininet -lversion -lole32 -lws2_32 -loleaut32 -limm32 -lcomdlg32 -lshlwapi -lrpcrt4 -lwinmm
  411. ifeq ($(USING_JUCE),true)
  412. JUCE_AUDIO_DEVICES_LIBS = -lwinmm -lole32
  413. JUCE_CORE_LIBS = -luuid -lwsock32 -lwininet -lversion -lole32 -lws2_32 -loleaut32 -limm32 -lcomdlg32 -lshlwapi -lrpcrt4 -lwinmm
  414. JUCE_GRAPHICS_LIBS = -lgdi32
  415. JUCE_GUI_BASICS_LIBS = -lgdi32 -limm32 -lcomdlg32 -lole32
  416. else
  417. RTAUDIO_FLAGS += -D__WINDOWS_ASIO__ -D__WINDOWS_DS__ -D__WINDOWS_WASAPI__
  418. RTAUDIO_LIBS += -ldsound -luuid -lksuser -lwinmm
  419. RTMIDI_FLAGS += -D__WINDOWS_MM__
  420. endif
  421. endif
  422. # ---------------------------------------------------------------------------------------------------------------------
  423. NATIVE_PLUGINS_LIBS += $(DGL_LIBS)
  424. NATIVE_PLUGINS_LIBS += $(FFMPEG_LIBS)
  425. NATIVE_PLUGINS_LIBS += $(SNDFILE_LIBS)
  426. # ---------------------------------------------------------------------------------------------------------------------
  427. # Set app extension
  428. ifeq ($(WIN32),true)
  429. APP_EXT = .exe
  430. endif
  431. # ---------------------------------------------------------------------------------------------------------------------
  432. # Set shared lib extension
  433. LIB_EXT = .so
  434. ifeq ($(MACOS),true)
  435. LIB_EXT = .dylib
  436. endif
  437. ifeq ($(WIN32),true)
  438. LIB_EXT = .dll
  439. endif
  440. BASE_FLAGS += -DCARLA_LIB_EXT=\"$(LIB_EXT)\"
  441. # ---------------------------------------------------------------------------------------------------------------------
  442. # Set static libs start & end
  443. ifneq ($(MACOS),true)
  444. LIBS_START = -Wl,--start-group
  445. LIBS_END = -Wl,--end-group
  446. endif
  447. # ---------------------------------------------------------------------------------------------------------------------
  448. # Set shared library CLI arg
  449. ifeq ($(MACOS),true)
  450. SHARED = -dynamiclib
  451. else
  452. SHARED = -shared
  453. endif
  454. # ---------------------------------------------------------------------------------------------------------------------
  455. # Set arguments used for inline 'sed'
  456. ifeq ($(BSD),true)
  457. SED_ARGS=-i '' -e
  458. else
  459. SED_ARGS=-i -e
  460. endif
  461. # ---------------------------------------------------------------------------------------------------------------------
  462. # Set command used for file symlinking
  463. LINK := ln -sf
  464. # ---------------------------------------------------------------------------------------------------------------------
  465. ifneq (,$(wildcard $(CWD)/native-plugins/external/Makefile.mk))
  466. EXTERNAL_PLUGINS = true
  467. BASE_FLAGS += -DHAVE_EXTERNAL_PLUGINS
  468. include $(CWD)/native-plugins/external/Makefile.mk
  469. endif
  470. # ---------------------------------------------------------------------------------------------------------------------