diff --git a/build/makefile_base.mak b/build/makefile_base.mak index d35e2bef..e44f079d 100644 --- a/build/makefile_base.mak +++ b/build/makefile_base.mak @@ -29,6 +29,7 @@ else # (Rest of the file is the else) # SRCDIR - Path to source # BUILD_NAME - Name of the build for manifests etc. # NO_DXVK - 1 if skipping DXVK steps +# WITH_FFMPEG - 1 if including ffmpeg steps # OSX - 1 if OS X build # STEAMRT64_MODE - 'docker' or '' for automatic Steam Runtime container # STEAMRT64_IMAGE - Name of the image if mode is set @@ -128,8 +129,6 @@ INSTALL_PROGRAM_FLAGS := GOAL_TARGETS = $(GOAL_TARGETS_LIBS) # Excluding goals like wine and dist that are either long running or slow per invocation GOAL_TARGETS_LIBS = -# Targets that have to be asked for explicitly -OPTIONAL_TARGETS = # Any explicit thing, superset ALL_TARGETS = @@ -796,7 +795,7 @@ openal32: $(OPENAL_CONFIGURE_FILES32) ## ffmpeg ## -## Create & configure object directory for ffmpeg +ifeq ($(WITH_FFMPEG),1) FFMPEG_CONFIGURE_FILES32 := $(FFMPEG_OBJ32)/Makefile FFMPEG_CONFIGURE_FILES64 := $(FFMPEG_OBJ64)/Makefile @@ -876,7 +875,7 @@ $(FFMPEG_CONFIGURE_FILES32): $(FFMPEG)/configure $(MAKEFILE_DEP) | $(FFMPEG_OBJ3 FFMPEG_TARGETS = ffmpeg ffmpeg_configure ffmpeg32 ffmpeg64 ffmpeg_configure32 ffmpeg_configure64 ALL_TARGETS += $(FFMPEG_TARGETS) -OPTIONAL_TARGETS += $(FFMPEG_TARGETS) +GOAL_TARGETS_LIBS += ffmpeg .PHONY: $(FFMPEG_TARGETS) @@ -902,6 +901,8 @@ ffmpeg32: $(FFMPEG_CONFIGURE_FILES32) $(MAKE) install && \ cp -L ../$(TOOLS_DIR32)/lib/{libavcodec,libavutil}* ../$(DST_DIR)/lib +endif # ifeq ($(WITH_FFMPEG),1) + ## ## lsteamclient ## @@ -1343,7 +1344,7 @@ GOAL_TARGETS_CONFIGURE64 := $(filter $(addsuffix _configure64,$(GOAL_TARGETS)),$ GOAL_TARGETS_CONFIGURE32 := $(filter $(addsuffix _configure32,$(GOAL_TARGETS)),$(ALL_TARGETS)) # Anything in all-targets that didn't end up in here -OTHER_TARGETS := $(filter-out $(ALL_TARGETS),$(GOAL_TARGETS) $(OPTIONAL_TARGETS) $(GOAL_TARGETS64) $(GOAL_TARGETS32) \ +OTHER_TARGETS := $(filter-out $(ALL_TARGETS),$(GOAL_TARGETS) $(GOAL_TARGETS64) $(GOAL_TARGETS32) \ $(GOAL_TARGETS_LIBS64) $(GOAL_TARGETS_LIBS32) $(GOAL_TARGETS_CONFIGURE) \ $(GOAL_TARGETS_CONFIGURE64) $(GOAL_TARGETS_CONFIGURE32)) @@ -1358,7 +1359,6 @@ targets: $(info Default targets (make all32_lib): $(strip $(GOAL_TARGETS_LIBS32))) $(info Reconfigure targets (make all64_configure): $(strip $(GOAL_TARGETS_CONFIGURE64))) $(info Reconfigure targets (make all32_configure): $(strip $(GOAL_TARGETS_CONFIGURE32))) - $(info Optional targets: $(OPTIONAL_TARGETS)) $(info Other targets: $(OTHER_TARGETS)) # All target diff --git a/configure.sh b/configure.sh index d0653f19..81b9c5e7 100755 --- a/configure.sh +++ b/configure.sh @@ -102,6 +102,11 @@ function configure() { echo >> "$MAKEFILE" "NO_DXVK := 1" fi + # ffmpeg? + if [[ -n $arg_ffmpeg ]]; then + echo >> "$MAKEFILE" "WITH_FFMPEG := 1" + fi + # OS X? if [[ -n $OSX ]]; then echo >> "$MAKEFILE" "OSX := 1" @@ -129,6 +134,7 @@ arg_steamrt32="" arg_steamrt64="" arg_no_steamrt="" arg_force_dxvk="" +arg_ffmpeg="" arg_build_name="" arg_help="" invalid_args="" @@ -166,6 +172,8 @@ function parse_args() { elif [[ $arg = --build-name ]]; then arg_build_name="$val" val_used=1 + elif [[ $arg = --with-ffmpeg ]]; then + arg_ffmpeg=1 elif [[ $arg = --osx-force-dxvk ]]; then arg_force_dxvk=1 elif [[ $arg = --steam-runtime32 ]]; then @@ -216,11 +224,14 @@ usage() { "$1" "" "$1" " Options" "$1" " --help / --usage Show this help text and exit" + "$1" "" "$1" " --build-name= Set the name of the build that displays when used in Steam" "$1" "" "$1" " --osx-force-dxvk Attempt to build DXVK on OS X - not currently functioning," "$1" " development use" "$1" "" + "$1" " --with-ffmpeg Build ffmpeg for WMA audio support" + "$1" "" "$1" " Steam Runtime" "$1" " Proton builds that are to be installed & run under the steam client must be built with" "$1" " the Steam Runtime SDK to ensure compatibility. See BUILDING.md for more information."