From b7050dbd461c0ca4a48c7dd1d26d9e3cedbb83ad Mon Sep 17 00:00:00 2001 From: Eukara Date: Sun, 24 Jan 2021 20:54:42 +0000 Subject: [PATCH] Fixed building avplug plugin on OpenBSD git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5803 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- plugins/Makefile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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)