X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fthirdparty%2FMakefile;h=2da7d7ee068dfa1cec59fd88483a4a40d3b56d72;hb=8b0e73a6d3623764c261f64f5f3e96349d1f9032;hp=6e84efaa0b263290ec7179bf693a2984952e218b;hpb=c6f91f271145ad9cd637f6b8f1560146178d3d41;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile index 6e84efaa..2da7d7ee 100644 --- a/cinelerra-5.1/thirdparty/Makefile +++ b/cinelerra-5.1/thirdparty/Makefile @@ -28,6 +28,8 @@ include $(TOPDIR)/global_config -include $(TOPDIR)/cin_config BLD := $(THIRDPARTY)/build +ifneq ($(WANT_CIN_3RDPARTY),no) + # package build flags, if needed # need frame pointer for debugs and helps with profiling # NOTE: the trailing blank is MANDITORY or the builds fail @@ -105,14 +107,10 @@ esound.cfg_vars+= AUDIOFILE_LIBS="$(call ld_path,audiofile,libaudiofile/.libs)" esound.cfg_params= --enable-shared=no --with-pic esound.mak_vars+= CFLAGS="" esound.ldflags=" -lm -lstdc++" -#fdk.cfg_vars= ./autogen.sh ; CFLAGS+=" -Wno-narrowing" CXXFLAGS+=" -Wno-narrowing" -fdk.cfg_params= --enable-shared=no -fdk.mak_params= ; for f in $(call bld_path,fdk,/lib*/include); do ln -s . $$$$f/fdk-aac; done fftw.cfg_params= --disable-fortran --enable-shared=no ffmpeg.cfg_params= \ --enable-pthreads --enable-gpl \ --disable-ffplay --disable-vaapi \ - $(call if_pkg,fdk,--enable-libfdk-aac) \ $(call if_pkg,twolame,--enable-libtwolame) \ $(call if_pkg,openjpeg,--enable-libopenjpeg) \ $(call if_pkg,lame,--enable-libmp3lame) \ @@ -121,7 +119,6 @@ ffmpeg.cfg_params= \ $(call if_pkg,libvpx,--enable-libvpx) \ $(call if_pkg,x264,--enable-libx264) \ $(call if_pkg,x265,--enable-libx265) \ - --enable-nonfree \ --extra-cflags="\ $(call inc_path,twolame,libtwolame) \ $(call inc_path,lame,include) \ @@ -133,11 +130,7 @@ ffmpeg.cfg_params= \ $(call inc_path,libvpx) \ $(call inc_path,x264) \ $(call inc_path,x265) \ - $(call inc_path,x265,source) \ - $(call inc_path,fdk,libAACdec) \ - $(call inc_path,fdk,libAACenc) \ - $(call inc_path,fdk,libSYS) \ - $(call inc_path,fdk,libSYS/include)" \ + $(call inc_path,x265,source)" \ --extra-cxxflags="-D__STDC_CONSTANT_MACROS" \ --pkg-config=true \ --extra-libs="-Wl,--start-group \ @@ -151,7 +144,6 @@ ffmpeg.cfg_params= \ $(call ld_path,libvpx) \ $(call ld_path,x264) \ $(call ld_path,x265) \ - $(call ld_path,fdk,.libs) \ -Wl,--end-group -lm -lstdc++ -pthread \ $(EXTRA_LIBS)" $(FFMPEG_EXTRA_CFG) \ @@ -213,6 +205,48 @@ x265.cfg_vars?=$(call cmake_config,source) x265.cfg_params?= -DENABLE_SHARED=no libvpx.cfg_params?= --enable-pic +DS:=$$$$$$$$ +pkg_cfg=$(call bld_path,$(1),usr/local/lib/pkgconfig): +LV2_PKGCFG:=$(subst : ,:,$(foreach p,lv2 serd sord sratom lilv suil,$(call pkg_cfg,$(p)))) + +# lv2 +define waf-setup +$(1).cfg_vars+=./waf --version; find .waf* -type f -name "*.py" | \ + while read f; do sed -e '/StopIter/d' -i "$(DS)f"; done; \ + echo 'exec ./waf configure "$(DS)@"' > ./configure; chmod +x \ + ./configure; PKG_CONFIG_PATH=$(LV2_PKGCFG) LD_LIBRARY_PATH=$(LV2_LIBPATH) +$(1).cfg_params+=\ + CFLAGS="-I$(call bld_path,lv2) $(foreach f,$(2), $(call inc_path,$(f))) -fPIC "\ + LDFLAGS="-lm $(foreach f,$(2), $(call ld_path,$(f),usr/local/lib)) " +$(1).mak_vars=(echo "all:"; echo " ./waf -v build") > $(call bld_path,$(1),Makefile); +$(1).mak_params+=; ( cd $(1)*; ./waf install --destdir=$(call bld_path,$(1)) ) +endef + +SYS_LIB:=$(notdir $(lastword $(wildcard /usr/lib /usrlib32 /usr/lib64))) +SYS_LV2:=$(lastword $(wildcard /usr/$(SYS_LIB)/lv2 /usr/local/$(SYS_LIB)/lv2)) +$(if $(SYS_LV2),,$(eval SYS_LV2:=/usr/$(SYS_LIB)/lv2)) +lv2.cfg_params?= --lv2dir=$(SYS_LV2) +SYS_LV2_PATH:=/usr/$(SYS_LIB)/lv2: /usr/local/$(SYS_LIB)/lv2: +DFT_LV2_PATH:= /usr/lib64/lv2: /usr/lib/lv2: /usr/local/lib64/lv2: /usr/local/lib/lv2: +LV2_PATH:=$(subst : ,:,$(SYS_LV2_PATH)$(filter-out $(SYS_LV2_PATH),$(DFT_LV2_PATH))) +lilv.cfg_params?= --static --default-lv2-path=$(LV2_PATH) +sratom.cfg_params?= --static --no-shared +serd.cfg_params?= --static --no-shared +sord.cfg_params?= --static --no-shared +lilv.cfg_params?= --static --dyn-manifest +suil.cfg_params?= --static --no-qt + +$(eval $(call waf-setup,lv2)) +$(eval $(call waf-setup,serd)) +$(eval $(call waf-setup,sord, serd)) +$(eval $(call waf-setup,sratom, serd sord lv2)) +$(eval $(call waf-setup,lilv, lv2 sratom serd sord)) +$(eval $(call waf-setup,suil, lv2)) + +# add softlinks for legacy paths +waf_link=$(1).mak_params+=; (cd $(1)*; ln -s $(1)-0/$(1) usr/local/include/.) +$(foreach p,sratom serd sord lilv suil,$(eval $(call waf_link,$(p)))) + # compile flag vars $(foreach tgt,$(TARGETS), \ $(if $($(tgt).cflags),$(eval $(tgt).cfg_vars+=CFLAGS+=$($(tgt).cflags)))) @@ -238,8 +272,7 @@ $(call rules,$(call std-build,djbfft)) $(call rules,$(call std-build,audiofile)) $(call rules,$(call std-build,encore)) $(call rules,$(call std-build,esound,audiofile)) -$(call rules,$(call std-build,fdk)) -$(call rules,$(call std-build,ffmpeg, fdk twolame lame openjpeg opus libtheora x264 x265 libvpx)) +$(call rules,$(call std-build,ffmpeg, twolame lame openjpeg opus libtheora x264 x265 libvpx)) $(call rules,$(call std-build,fftw)) $(call rules,$(call std-build,flac,libogg)) $(call rules,$(call std-build,giflib)) @@ -267,6 +300,12 @@ $(call rules,$(call std-build,twolame)) $(call rules,$(call std-build,x264)) $(call rules,$(call std-build,x265)) $(call rules,$(call std-build,libvpx)) +$(call rules,$(call std-build,lv2)) +$(call rules,$(call std-build,serd)) +$(call rules,$(call std-build,sord, serd)) +$(call rules,$(call std-build,sratom, serd sord lv2)) +$(call rules,$(call std-build,lilv, lv2 sratom serd sord)) +$(call rules,$(call std-build,suil, lv2)) # specialize festival, multiple tarballs festival: @@ -297,7 +336,13 @@ clean: install: cp -a $(ver_mjpegtools)/mpeg2enc/mpeg2enc $(BINDIR)/. cp -a $(ver_mjpegtools)/mplex/mplex $(BINDIR)/. +else +# not WANT_CIN_3RDPARTY +all: +clean: +install: +endif val-%: @echo $($(subst val-,,$@))