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.

576 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. endif
  283. # ---------------------------------------------------------------------------------------------------------------------
  284. # Set libs stuff (part 1)
  285. ifeq ($(LINUX_OR_MACOS),true)
  286. LIBDL_LIBS = -ldl
  287. endif
  288. ifeq ($(WIN32),true)
  289. PKG_CONFIG_FLAGS = --static
  290. endif
  291. ifeq ($(HAVE_DGL),true)
  292. ifeq ($(MACOS),true)
  293. DGL_LIBS = -framework OpenGL -framework Cocoa
  294. endif
  295. ifeq ($(WIN32),true)
  296. DGL_LIBS = -lopengl32 -lgdi32
  297. endif
  298. ifneq ($(MACOS_OR_WIN32),true)
  299. DGL_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags gl x11)
  300. DGL_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs gl x11)
  301. endif
  302. endif
  303. ifeq ($(HAVE_LIBLO),true)
  304. LIBLO_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags liblo)
  305. LIBLO_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs liblo)
  306. endif
  307. ifeq ($(HAVE_LIBMAGIC),true)
  308. MAGIC_LIBS += -lmagic
  309. ifeq ($(LINUX_OR_MACOS),true)
  310. MAGIC_LIBS += -lz
  311. endif
  312. endif
  313. ifeq ($(HAVE_FFMPEG),true)
  314. FFMPEG_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags libavcodec libavformat libavutil)
  315. FFMPEG_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs libavcodec libavformat libavutil)
  316. endif
  317. ifeq ($(HAVE_FLUIDSYNTH),true)
  318. FLUIDSYNTH_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags fluidsynth)
  319. FLUIDSYNTH_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs fluidsynth)
  320. endif
  321. ifeq ($(HAVE_SNDFILE),true)
  322. SNDFILE_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags sndfile)
  323. SNDFILE_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs sndfile)
  324. endif
  325. ifeq ($(HAVE_X11),true)
  326. X11_FLAGS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags x11)
  327. X11_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs x11)
  328. endif
  329. # ---------------------------------------------------------------------------------------------------------------------
  330. # Set libs stuff (part 2)
  331. ifneq ($(USING_JUCE),true)
  332. RTAUDIO_FLAGS = -DHAVE_GETTIMEOFDAY
  333. RTMIDI_FLAGS =
  334. ifeq ($(DEBUG),true)
  335. RTAUDIO_FLAGS += -D__RTAUDIO_DEBUG__
  336. RTMIDI_FLAGS += -D__RTMIDI_DEBUG__
  337. endif
  338. ifeq ($(UNIX),true)
  339. RTAUDIO_FLAGS += -D__UNIX_JACK__
  340. ifeq ($(HAVE_PULSEAUDIO),true)
  341. RTAUDIO_FLAGS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags libpulse-simple) -D__UNIX_PULSE__
  342. RTAUDIO_LIBS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs libpulse-simple)
  343. endif
  344. endif
  345. endif # USING_JUCE
  346. ifeq ($(BSD),true)
  347. JACKBRIDGE_LIBS = -lpthread -lrt
  348. LILV_LIBS = -lm -lrt
  349. RTMEMPOOL_LIBS = -lpthread
  350. WATER_LIBS = -lpthread -lrt
  351. endif
  352. ifeq ($(HAIKU),true)
  353. JACKBRIDGE_LIBS = -lpthread
  354. LILV_LIBS = -lm
  355. RTMEMPOOL_LIBS = -lpthread
  356. WATER_LIBS = -lpthread
  357. endif
  358. ifeq ($(HURD),true)
  359. JACKBRIDGE_LIBS = -ldl -lpthread -lrt
  360. LILV_LIBS = -ldl -lm -lrt
  361. RTMEMPOOL_LIBS = -lpthread -lrt
  362. WATER_LIBS = -ldl -lpthread -lrt
  363. endif
  364. ifeq ($(LINUX),true)
  365. HYLIA_FLAGS = -DLINK_PLATFORM_LINUX=1
  366. JACKBRIDGE_LIBS = -ldl -lpthread -lrt
  367. LILV_LIBS = -ldl -lm -lrt
  368. RTMEMPOOL_LIBS = -lpthread -lrt
  369. WATER_LIBS = -ldl -lpthread -lrt
  370. ifeq ($(USING_JUCE),true)
  371. JUCE_CORE_LIBS = -ldl -lpthread -lrt
  372. JUCE_AUDIO_DEVICES_LIBS = $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs alsa)
  373. else
  374. ifeq ($(HAVE_ALSA),true)
  375. RTAUDIO_FLAGS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags alsa) -D__LINUX_ALSA__
  376. RTAUDIO_LIBS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs alsa) -lpthread
  377. RTMIDI_FLAGS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --cflags alsa) -D__LINUX_ALSA__
  378. RTMIDI_LIBS += $(shell pkg-config $(PKG_CONFIG_FLAGS) --libs alsa)
  379. endif
  380. endif
  381. endif
  382. ifeq ($(MACOS),true)
  383. HYLIA_FLAGS = -DLINK_PLATFORM_MACOSX=1
  384. JACKBRIDGE_LIBS = -ldl -lpthread
  385. LILV_LIBS = -ldl -lm
  386. RTMEMPOOL_LIBS = -lpthread
  387. WATER_LIBS = -framework AppKit
  388. ifeq ($(USING_JUCE),true)
  389. JUCE_AUDIO_BASICS_LIBS = -framework Accelerate
  390. JUCE_AUDIO_DEVICES_LIBS = -framework AppKit -framework AudioToolbox -framework CoreAudio -framework CoreMIDI
  391. JUCE_AUDIO_FORMATS_LIBS = -framework AudioToolbox -framework CoreFoundation
  392. JUCE_AUDIO_PROCESSORS_LIBS = -framework AudioToolbox -framework AudioUnit -framework CoreAudio -framework CoreAudioKit -framework Cocoa -framework Carbon
  393. JUCE_CORE_LIBS = -framework AppKit
  394. JUCE_EVENTS_LIBS = -framework AppKit
  395. JUCE_GRAPHICS_LIBS = -framework Cocoa -framework QuartzCore
  396. JUCE_GUI_BASICS_LIBS = -framework Cocoa
  397. else
  398. RTAUDIO_FLAGS += -D__MACOSX_CORE__
  399. RTAUDIO_LIBS += -framework CoreAudio
  400. RTMIDI_FLAGS += -D__MACOSX_CORE__
  401. RTMIDI_LIBS += -framework CoreMIDI
  402. endif
  403. endif
  404. ifeq ($(WIN32),true)
  405. HYLIA_FLAGS = -DLINK_PLATFORM_WINDOWS=1
  406. JACKBRIDGE_LIBS = -lpthread
  407. LILV_LIBS = -lm
  408. RTMEMPOOL_LIBS = -lpthread
  409. WATER_LIBS = -luuid -lwsock32 -lwininet -lversion -lole32 -lws2_32 -loleaut32 -limm32 -lcomdlg32 -lshlwapi -lrpcrt4 -lwinmm
  410. ifeq ($(USING_JUCE),true)
  411. JUCE_AUDIO_DEVICES_LIBS = -lwinmm -lole32
  412. JUCE_CORE_LIBS = -luuid -lwsock32 -lwininet -lversion -lole32 -lws2_32 -loleaut32 -limm32 -lcomdlg32 -lshlwapi -lrpcrt4 -lwinmm
  413. JUCE_GRAPHICS_LIBS = -lgdi32
  414. JUCE_GUI_BASICS_LIBS = -lgdi32 -limm32 -lcomdlg32 -lole32
  415. else
  416. RTAUDIO_FLAGS += -D__WINDOWS_ASIO__ -D__WINDOWS_DS__ -D__WINDOWS_WASAPI__
  417. RTAUDIO_LIBS += -ldsound -luuid -lksuser -lwinmm
  418. RTMIDI_FLAGS += -D__WINDOWS_MM__
  419. endif
  420. endif
  421. # ---------------------------------------------------------------------------------------------------------------------
  422. NATIVE_PLUGINS_LIBS += $(DGL_LIBS)
  423. NATIVE_PLUGINS_LIBS += $(FFMPEG_LIBS)
  424. NATIVE_PLUGINS_LIBS += $(SNDFILE_LIBS)
  425. # ---------------------------------------------------------------------------------------------------------------------
  426. # Set app extension
  427. ifeq ($(WIN32),true)
  428. APP_EXT = .exe
  429. endif
  430. # ---------------------------------------------------------------------------------------------------------------------
  431. # Set shared lib extension
  432. LIB_EXT = .so
  433. ifeq ($(MACOS),true)
  434. LIB_EXT = .dylib
  435. endif
  436. ifeq ($(WIN32),true)
  437. LIB_EXT = .dll
  438. endif
  439. BASE_FLAGS += -DCARLA_LIB_EXT=\"$(LIB_EXT)\"
  440. # ---------------------------------------------------------------------------------------------------------------------
  441. # Set static libs start & end
  442. ifneq ($(MACOS),true)
  443. LIBS_START = -Wl,--start-group
  444. LIBS_END = -Wl,--end-group
  445. endif
  446. # ---------------------------------------------------------------------------------------------------------------------
  447. # Set shared library CLI arg
  448. ifeq ($(MACOS),true)
  449. SHARED = -dynamiclib
  450. else
  451. SHARED = -shared
  452. endif
  453. # ---------------------------------------------------------------------------------------------------------------------
  454. # Set arguments used for inline 'sed'
  455. ifeq ($(BSD),true)
  456. SED_ARGS=-i '' -e
  457. else
  458. SED_ARGS=-i -e
  459. endif
  460. # ---------------------------------------------------------------------------------------------------------------------
  461. # Set command used for file symlinking
  462. LINK := ln -sf
  463. # ---------------------------------------------------------------------------------------------------------------------
  464. ifneq (,$(wildcard $(CWD)/native-plugins/external/Makefile.mk))
  465. EXTERNAL_PLUGINS = true
  466. BASE_FLAGS += -DHAVE_EXTERNAL_PLUGINS
  467. include $(CWD)/native-plugins/external/Makefile.mk
  468. endif
  469. # ---------------------------------------------------------------------------------------------------------------------