X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fthirdparty%2FMakefile;h=4b220efdc16eaf90aeb4aec04af55fa8edee588c;hp=395207cd418fa73a86da3be51680c87a2916139b;hb=4d2d052cc767103a8699b1de0e3a1f36844ac04f;hpb=4d7f82a573a67301c43189fe20d0d4aa96b2b200;ds=sidebyside diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile index 395207cd..4b220efd 100644 --- a/cinelerra-5.1/thirdparty/Makefile +++ b/cinelerra-5.1/thirdparty/Makefile @@ -1,22 +1,21 @@ - # to see the make rules: # make rules # # command uses: -# ./configure # make -clean # make # make rules -# make list # make val- # # to add a new library: -# vi configure -# add inc_ -# add add_library name -# add probe call if the library may be already in system -# fix forced_libs list: for lib in $forced_libs; do -# add dependencies (order matters): for dep in ; do +# vi ../configure.ac +# add PKG_3RD(pkg,, , , ) +# add CHECK_LIB(pkg, , , [opt libs]) if may be in system +# add CHECK_HEADERS(pkg, , <entry_pt>) to check for devel headers +# add CHECK_WANT(<want>, <title>, [ checks ]) around tests if conditional +# see openexr check for example if c++ lib +# add PKG_PROVIDE(pkg,<cond>) to instance pkg if probe succeeds +# add to exec > global_config if additional environment needed # vi Makefile # add pkg.<data> (pkg.x = .flags, .vars, .params) # add $(call rules,$(call std-build,<name>,<dep>...)) @@ -24,24 +23,34 @@ # add config enables if other libraries use the new library # -include ../global_config --include config.mak +TOPDIR ?= $(CURDIR)/.. +include $(TOPDIR)/global_config +-include $(TOPDIR)/cin_config BLD := $(THIRDPARTY)/build +# package build flags, if needed +# need frame pointer for debugs and helps with profiling +# NOTE: the trailing blank is MANDITORY or the builds fail +# due to bugs in the build scripts from auto* +CFLAGS_ ?= -g -O2 -fno-omit-frame-pointer +CFLAGS ?= $(CFLAGS_) +LDFLAGS += $(LDFLAGS_) +CXXFLAGS += $(CXXFLAGS_) + pkg-source=$(BLD)/$(1).source pkg-config=$(BLD)/$(1).configure pkg-built=$(BLD)/$(1).built ext=$(lastword $(subst ., ,$(1))) -tarball=$(lastword $(wildcard src/$(1)*.tar.*)) +tarball=$(lastword $(sort $(wildcard src/$(1)*.tar.*))) unpack=$(call unpack_$(call ext,$(1)),$(1)) unpack_gz=tar -xzf $(1) unpack_bz2=tar -xjf $(1) unpack_xz=tar -xJf $(1) -bld_depends=$(if $(filter $(firstword $($(1))),static),$(call pkg-built,$(1))) -bld_path=`echo $(THIRDPARTY)/$(1)*`/$(2) -inc_path=$(if $(filter $(firstword $($(1))),static),-I$(call bld_path,$(1),$(2))) -ld_path=$(if $(filter $(firstword $($(1))),static),-L$(call bld_path,$(1),$(2))) +bld_depends=$(if $(ver_$(1)),$(call pkg-built,$(1))) +bld_path=$(ver_$(1))/$(2) +inc_path=$(inc_$(1)) +ld_path=$(if $(ver_$(1)),-L$(call bld_path,$(1),$(2))) #$(eval $(call std-build,pkg,deps...)) #$(pkg.cflags) added as CFLAGS+=$(cflags) to pkg.vars @@ -62,7 +71,7 @@ $(1)-clean: $(call pkg-source,$(1)): $(call unpack,$(call tarball,$(1))) \ - $(foreach pch,$(wildcard src/$(1).patch*), + $(foreach pch,$(sort $(wildcard src/$(1).patch*)), patch -d $(1)* -p1 < $(pch)) touch $$@ @@ -78,7 +87,7 @@ $(call pkg-built,$(1)): $(call pkg-config,$(1)) endef -TARGETS := $(static_libs) +TARGETS := $(static_blds) all: $(TARGETS) @@ -92,18 +101,18 @@ encore.cfg_vars= true || esound.cfg_vars:= AUDIOFILE_CFLAGS="$(call inc_path,audiofile,libaudiofile) -laudiofile" esound.cfg_vars+= AUDIOFILE_LIBS="$(call ld_path,audiofile,libaudiofile/.libs)" esound.cfg_params= --enable-shared=no --with-pic -esound.ldflags="-lm -lstdc++" -faac.cfg_params= --enable-shared=no +esound.mak_vars+= CFLAGS="" +esound.ldflags=" -lm -lstdc++" +faac.cfg_params= --enable-shared=no --without-mp4v2 faad2.cfg_params= --enable-shared=no -fdk.cfg_vars= ./autogen.sh ; +#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 include `dirname $$$$f`/fdk-aac ; done +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-ffserver --disable-ffplay \ --disable-vaapi \ - --enable-libfaac \ --enable-libfdk-aac \ --enable-libtwolame \ --enable-libopenjpeg \ @@ -143,16 +152,22 @@ ffmpeg.cfg_params= \ $(call ld_path,x264) \ $(call ld_path,x265) \ $(call ld_path,fdk,.libs) \ - $(EXTRA_LIBS)" $(EXTRA_FFMPEG_CFG) \ + $(EXTRA_LIBS)" $(FFMPEG_EXTRA_CFG) \ cmake_config=echo "exec cmake \$$$$@ $(1)" > ./configure; chmod +x ./configure; a52dec.mak_params?= ; cd $(call bld_path,a52dec,include); ln -sf . a52dec -a52dec.cfg_vars?= CFLAGS+=" -U__FreeBSD__" +a52dec.cfg_vars?= CFLAGS+=" -U__FreeBSD__ $(call inc_path,djbfft)" LIBS+=" $(call ld_path,djbfft)" +a52dec.cfg_params?=--enable-djbfft +djbfft.cfg_vars?=echo "$(call bld_path,djbfft)" > conf-home; \ + (CFLAGS="$(CFLAGS)"; $(CFG_VARS)$(if $(CFG_VARS),; )echo "$(CC) $$$$CFLAGS") > conf-cc; \ + echo > ./configure; chmod +x ./configure; +djbfft.mak_params?=; cd $(call bld_path,djbfft); ln -sf djbfft.a libdjbfft.a audiofile.cfg_params?=--enable-shared=no audiofile.mak_params?=LIBS="-lm -lstdc++" flac.cfg_params?= --enable-shared=no flac.cflags?="$(call inc_path,libogg,include) $(call ld_path,libogg,src/.libs)" giflib.cfg_params?=--enable-shared=no +ilmbase.cfg_vars= CFLAGS+=" -Wno-narrowing" CXXFLAGS+=" -Wno-narrowing" ilmbase.cfg_params?=--prefix=$(call bld_path,ilmbase,usr) ilmbase.mak_params?=; $(MAKE) -C ilmbase* install; cd $(call bld_path,ilmbase); ln -sf lib64 usr/lib lame.cfg_vars?= CFLAGS+=" -O" @@ -161,23 +176,26 @@ lame.mak_params?= ; cd $(call bld_path,lame,include); ln -sf . lame mjpegtools.cflags?="$(call inc_path,libjpeg) $(call ld_path,libjpeg,.libs)" mjpegtools.mak_params?=; ln -s . $(call bld_path,mjpegtools,utils)/mjpegtools mjpegtools.cfg_params?= --enable-shared=no +ladspa.cfg_vars?= CFLAGS+=' -Dinline="" ' ladspa.mak_params?=; $(MAKE) -C ladspa* install DESTDIR=$(call bld_path,ladspa) -libavc1394.cfg_vars?=PKG_CONFIG_PATH=$(bld_path libraw1394) -libavc1394.cflags?="$(inc_path libraw1394)" -libavc1394.ldflags?="$(ld_path libraw1394,src/.libs)" +libavc1394.cfg_vars?=PKG_CONFIG_PATH=$(call bld_path,libraw1394) +libavc1394.cflags?="$(call inc_path,libraw1394)" +libavc1394.ldflags?="$(call ld_path,libraw1394,src/.libs)" libavc1394.cfg_params?= --enable-shared=no +libavc1394.mak_params?=; cd $(call bld_path,libavc1394); ln -sf ../librom1394/rom1394.h libavc1394/. libdv.cfg_params?= --disable-gtk --enable-shared=no -libiec61883.cfg_vars?=PKG_CONFIG_PATH=$(bld_path libraw1394) -libiec61883.cflags?="$(inc_path libraw1394)" -libiec61883.ldflags?="$(ld_path libraw1394,src/.libs)" +libiec61883.cfg_vars?=PKG_CONFIG_PATH=$(call bld_path,libraw1394) +libiec61883.cflags?="$(call inc_path,libraw1394)" +libiec61883.ldflags?="$(call ld_path,libraw1394,src/.libs)" libiec61883.cfg_params?= --enable-shared=no +libiec61883.mak_params?=; cd $(call bld_path,libiec61883,src); ln -sf . libiec61883 libjpeg.cfg_params?= --enable-shared=no libogg.cfg_params?= --enable-shared=no libraw1394.cfg_params?= --enable-shared=no; ln -sf src libraw1394 -libtheora.cfg_vars?=PKG_CONFIG_PATH=$(bld_path libogg):$(bld_path libvorbis) -libtheora.cflags?="$(inc_path libogg,include) $(inc_path libogg,src) $(inc_path libvorbis,include)" -libtheora.ldflags?="$(ld_path libvorbis,lib/.libs) $(ld_path libogg,src/.libs)" -libtheora.cfg_params?= --disable-examples --enable-shared=no +libtheora.cfg_vars?=PKG_CONFIG_PATH=$(call bld_path,libogg):$(call bld_path,libvorbis) +libtheora.cflags?="$(call inc_path,libogg,include) $(call inc_path,libogg,src) $(call inc_path,libvorbis,include)" +libtheora.ldflags?="$(call ld_path,libvorbis,lib/.libs) $(call ld_path,libogg,src/.libs)" +libtheora.cfg_params?= --disable-examples --disable-spec --enable-shared=no libuuid.cfg_params?=--enable-shared=no libvorbis.cfg_params?= --disable-oggtest --enable-shared=no openjpeg.cfg_params?= -DBUILD_SHARED_LIBS:BOOL=OFF @@ -190,9 +208,10 @@ openexr.cfg_vars?=LD_LIBRARY_PATH=$(call bld_path,ilmbase,usr/lib) openexr.cfg_params?=--enable-shared=no --with-ilmbase-prefix=$(call bld_path,ilmbase,usr) speech_tools.mak_params?=-j1 twolame.cfg_params?=--enable-shared=no -x264.cfg_params?= --enable-static +x264.cfg_params?= --enable-static --enable-pic x265.cfg_vars?=$(call cmake_config,source) x265.cfg_params?= -DENABLE_SHARED=no +libvpx.cfg_params?= --enable-pic # compile flag vars $(foreach tgt,$(TARGETS), \ @@ -214,7 +233,8 @@ else rules=$(eval $(1)) endif -$(call rules,$(call std-build,a52dec)) +$(call rules,$(call std-build,a52dec,djbfft)) +$(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)) @@ -228,9 +248,9 @@ $(call rules,$(call std-build,giflib)) $(call rules,$(call std-build,ilmbase)) $(call rules,$(call std-build,ladspa)) $(call rules,$(call std-build,lame)) -$(call rules,$(call std-build,libavc1394)) +$(call rules,$(call std-build,libavc1394,libraw1394)) $(call rules,$(call std-build,libdv)) -$(call rules,$(call std-build,libiec61883)) +$(call rules,$(call std-build,libiec61883,libraw1394)) $(call rules,$(call std-build,libjpeg)) $(call rules,$(call std-build,libogg)) $(call rules,$(call std-build,libraw1394)) @@ -272,9 +292,13 @@ $(call pkg-built,festival): $(call pkg-config,festival) touch $@ clean: - for f in $(thirdparty); do rm -rf $$f*; done + for f in $(static_pkgs); do rm -rf $$f*; done rm -rf $(BLD) +install: + cp -a $(ver_mjpegtools)/mpeg2enc/mpeg2enc $(BINDIR)/. + cp -a $(ver_mjpegtools)/mplex/mplex $(BINDIR)/. + val-%: @echo $($(subst val-,,$@))