SCP/VIDEO: Makefile cleanup for OSX build with libSDL2
This commit is contained in:
parent
6b45d9b2ad
commit
3a5f090a82
1 changed files with 11 additions and 12 deletions
23
makefile
23
makefile
|
@ -313,22 +313,21 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
OS_CCDEFS += -DHAVE_FNMATCH
|
OS_CCDEFS += -DHAVE_FNMATCH
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifneq (,$(call find_include,SDL/SDL))
|
ifneq (,$(call find_include,SDL2/SDL))
|
||||||
SDL_VERSION = $(shell grep SDL_MAJOR_VERSION $(call find_include,SDL/SDL_version) | awk '{ print $$3 }')
|
ifneq (,$(call find_lib,SDL2))
|
||||||
ifeq (2,$(SDL_VERSION))
|
OS_CCDEFS += -DHAVE_LIBSDL -I$(dir $(call find_include,SDL2/SDL))
|
||||||
ifneq (,$(call find_lib,SDL2))
|
OS_LDFLAGS += -lSDL2
|
||||||
OS_CCDEFS += -DHAVE_LIBSDL -I$(dir $(call find_include,SDL/SDL))
|
$(info using libSDL2: $(call find_lib,SDL2) $(call find_include,SDL2/SDL))
|
||||||
OS_LDFLAGS += -lSDL2
|
ifeq (Darwin,$(OSTYPE))
|
||||||
$(info using libSDL2: $(call find_lib,SDL2) $(call find_include,SDL/SDL))
|
OS_LDFLAGS += -lobjc -framework cocoa
|
||||||
ifeq (Darwin,$(OSTYPE))
|
|
||||||
OS_LDFLAGS += -lobjc -framework cocoa
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
else
|
endif
|
||||||
|
else
|
||||||
|
ifneq (,$(call find_include,SDL/SDL))
|
||||||
ifneq (,$(call find_lib,SDL))
|
ifneq (,$(call find_lib,SDL))
|
||||||
OS_CCDEFS += -DHAVE_LIBSDL -I$(dir $(call find_include,SDL/SDL))
|
OS_CCDEFS += -DHAVE_LIBSDL -I$(dir $(call find_include,SDL/SDL))
|
||||||
OS_LDFLAGS += -lSDL
|
OS_LDFLAGS += -lSDL
|
||||||
$(info using libSDL: $(call find_lib,SDL) $(call find_include,SDL/SDL))
|
$(info using libSDL: $(call find_lib,SDL) $(call find_include,SDL/SDL))
|
||||||
ifeq (Darwin,$(OSTYPE))
|
ifeq (Darwin,$(OSTYPE))
|
||||||
OS_LDFLAGS += -lobjc -framework cocoa
|
OS_LDFLAGS += -lobjc -framework cocoa
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue