makefile: Add option to explicitly build without SDL2 video: NOVIDEO=1

This commit is contained in:
Larry Baker 2020-05-28 17:02:40 -07:00 committed by Mark Pizzolato
parent 0f992e1db7
commit 3d40da5539

View file

@ -36,6 +36,10 @@
# simulators without networking support, invoking GNU make with # simulators without networking support, invoking GNU make with
# NONETWORK=1 will do the trick. # NONETWORK=1 will do the trick.
# #
# By default, video support is enabled if the SDL/SDL2 development
# headers and libraries are available. To force a build without video
# support, invoke GNU make with NOVIDEO=1.
#
# The default build will build compiler optimized binaries. # The default build will build compiler optimized binaries.
# If debugging is desired, then GNU make can be invoked with # If debugging is desired, then GNU make can be invoked with
# DEBUG=1 on the command line. # DEBUG=1 on the command line.
@ -145,6 +149,10 @@ endif
ifneq ($(NONETWORK),) ifneq ($(NONETWORK),)
NETWORK_USEFUL = NETWORK_USEFUL =
endif endif
# ... or without video support
ifneq ($(NOVIDEO),)
VIDEO_USEFUL =
endif
find_exe = $(abspath $(strip $(firstword $(foreach dir,$(strip $(subst :, ,${PATH})),$(wildcard $(dir)/$(1)))))) find_exe = $(abspath $(strip $(firstword $(foreach dir,$(strip $(subst :, ,${PATH})),$(wildcard $(dir)/$(1))))))
find_lib = $(abspath $(strip $(firstword $(foreach dir,$(strip ${LIBPATH}),$(wildcard $(dir)/lib$(1).${LIBEXT}))))) find_lib = $(abspath $(strip $(firstword $(foreach dir,$(strip ${LIBPATH}),$(wildcard $(dir)/lib$(1).${LIBEXT})))))
find_include = $(abspath $(strip $(firstword $(foreach dir,$(strip ${INCPATH}),$(wildcard $(dir)/$(1).h))))) find_include = $(abspath $(strip $(firstword $(foreach dir,$(strip ${INCPATH}),$(wildcard $(dir)/$(1).h)))))