makefile: Use sdl tool (sdl-config, sdl2-config) to locate SDL components
As discussed in #489
This commit is contained in:
parent
f594f0c98a
commit
8b1af8b862
1 changed files with 17 additions and 21 deletions
16
makefile
16
makefile
|
@ -489,10 +489,9 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
LIBEXTSAVE := $(LIBEXT)
|
LIBEXTSAVE := $(LIBEXT)
|
||||||
LIBEXT = dll.a
|
LIBEXT = dll.a
|
||||||
endif
|
endif
|
||||||
ifneq (,$(call find_include,SDL2/SDL))
|
ifneq (,$(shell which sdl2-config))
|
||||||
ifneq (,$(call find_lib,SDL2))
|
VIDEO_CCDEFS += -DHAVE_LIBSDL -DUSE_SIM_VIDEO `sdl2-config --cflags`
|
||||||
VIDEO_CCDEFS += -DHAVE_LIBSDL -DUSE_SIM_VIDEO `$(realpath $(dir $(call find_include,SDL2/SDL))../../bin/sdl2-config) --cflags`
|
VIDEO_LDFLAGS += `sdl2-config --libs`
|
||||||
VIDEO_LDFLAGS += `$(realpath $(dir $(call find_include,SDL2/SDL))../../bin/sdl2-config) --libs`
|
|
||||||
VIDEO_FEATURES = - video capabilities provided by libSDL2 (Simple Directmedia Layer)
|
VIDEO_FEATURES = - video capabilities provided by libSDL2 (Simple Directmedia Layer)
|
||||||
DISPLAYL = ${DISPLAYD}/display.c $(DISPLAYD)/sim_ws.c
|
DISPLAYL = ${DISPLAYD}/display.c $(DISPLAYD)/sim_ws.c
|
||||||
DISPLAYVT = ${DISPLAYD}/vt11.c
|
DISPLAYVT = ${DISPLAYD}/vt11.c
|
||||||
|
@ -501,12 +500,10 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
ifeq (Darwin,$(OSTYPE))
|
ifeq (Darwin,$(OSTYPE))
|
||||||
VIDEO_CCDEFS += -DSDL_MAIN_AVAILABLE
|
VIDEO_CCDEFS += -DSDL_MAIN_AVAILABLE
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
ifneq (,$(call find_include,SDL/SDL))
|
ifneq (,$(shell which sdl-config))
|
||||||
ifneq (,$(call find_lib,SDL))
|
VIDEO_CCDEFS += -DHAVE_LIBSDL -DUSE_SIM_VIDEO `sdl-config --cflags`
|
||||||
VIDEO_CCDEFS += -DHAVE_LIBSDL -DUSE_SIM_VIDEO `$(realpath $(dir $(call find_include,SDL/SDL))../../bin/sdl-config) --cflags`
|
VIDEO_LDFLAGS += `sdl-config --libs`
|
||||||
VIDEO_LDFLAGS += `$(realpath $(dir $(call find_include,SDL/SDL))../../bin/sdl-config) --libs`
|
|
||||||
VIDEO_FEATURES = - video capabilities provided by libSDL (Simple Directmedia Layer)
|
VIDEO_FEATURES = - video capabilities provided by libSDL (Simple Directmedia Layer)
|
||||||
DISPLAYL = ${DISPLAYD}/display.c $(DISPLAYD)/sim_ws.c
|
DISPLAYL = ${DISPLAYD}/display.c $(DISPLAYD)/sim_ws.c
|
||||||
DISPLAYVT = ${DISPLAYD}/vt11.c
|
DISPLAYVT = ${DISPLAYD}/vt11.c
|
||||||
|
@ -517,7 +514,6 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
ifeq (cygwin,$(OSTYPE))
|
ifeq (cygwin,$(OSTYPE))
|
||||||
LIBEXT = $(LIBEXTSAVE)
|
LIBEXT = $(LIBEXTSAVE)
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue