diff --git a/plugins/Makefile b/plugins/Makefile index 5b9c246fd..2ef6352f5 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -18,7 +18,13 @@ PLUG_LDFLAGS_ZLIB=-L../engine/libs/mingw64-libs -lz endif PLUG_PREFIX=$(OUT_DIR)/fteplug_ + +ifeq ($(FTE_TARGET),bsd) +PLUG_LDFLAGS_DL?=-ldl -lc +else PLUG_LDFLAGS_DL?=-ldl -static-libgcc +endif + PLUG_LDFLAGS?=-L/usr/local/lib -Wl,-R/usr/local/lib -lm PLUG_LDFLAGS_ZLIB?=-lz @@ -132,7 +138,11 @@ AV_PRE64_BIN=$(AV_VER)-win64-shared/ ifeq ($(findstring win,$(FTE_TARGET)),win) AV_BASE=$(abspath $(OUT_DIR)/../fte_libav_$(AV_VER))/ else - AV_BASE=/usr/include/ffmpeg/ + ifeq ($(FTE_TARGET),bsd) + AV_BASE=/usr/local/include/ + else + AV_BASE=/usr/include/ffmpeg/ + endif endif ifneq ($(AV_BASE),) @@ -143,6 +153,10 @@ else AV_LDFLAGS=-lavcodec -lavformat -lavutil -lswscale endif +ifeq ($(FTE_TARGET),bsd) + AV_LDFLAGS+=-lc +endif + AVPLUG_OBJS= avplug/avaudio.c avplug/avencode.c avplug/avdecode.c plugin.c ifeq ($(FTE_TARGET),win32)