Skip to content
Snippets Groups Projects
Commit e9e5455e authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

More macOS/Brew fixups

Use sdl-config before falling back to the framework.
Move sdjclean into objodir and link with mt stuff.
parent 319495df
No related branches found
No related tags found
No related merge requests found
Pipeline #7100 passed
......@@ -99,7 +99,19 @@ ifdef USE_SDL
ifeq ($(shell command -v ${SDL_CONFIG} > /dev/null && if [ `${SDL_CONFIG} --version | sed -E 's/\..*$$//'` -ge 2 ] ; then echo 'YES' ; fi),YES)
WITH_SDL := 1
endif
else
endif
ifndef WITH_SDL
ifeq ($(shell command -v sdl2-config > /dev/null && sdl2-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl2-config
WITH_SDL := 1
else
ifeq ($(shell command -v sdl-config > /dev/null && if [ `sdl-config --version | sed -E 's/\..*$$//'` -ge 2 ] ; then echo 'YES' ; fi),YES)
SDL_CONFIG := sdl-config
WITH_SDL := 1
endif
endif
endif
ifndef WITH_SDL
ifeq ($(os),darwin)
ifeq ($(shell if [ -d /Library/Frameworks/SDL2.framework ] ; then echo YES ; fi),YES)
SDL_FRAMEWORK_PATH ?= /Library/Frameworks
......@@ -110,16 +122,6 @@ ifdef USE_SDL
CIOLIB-MT_LDFLAGS += -Wl,-rpath,@executable_path/../Frameworks
CIOLIB-MT_LDFLAGS += -Wl,-rpath,${SDL_FRAMEWORK_PATH}
endif
else
ifeq ($(shell command -v sdl2-config > /dev/null && sdl2-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl2-config
WITH_SDL := 1
else
ifeq ($(shell command -v sdl-config > /dev/null && if [ `sdl-config --version | sed -E 's/\..*$$//'` -ge 2 ] ; then echo 'YES' ; fi),YES)
SDL_CONFIG := sdl-config
WITH_SDL := 1
endif
endif
endif
endif
endif
......
......@@ -30,8 +30,8 @@ $(SBJ): $(OBJS)
endif
$(QUIET)$(CC) $(MT_LDFLAGS) $(XPDEV-MT_LDFLAGS) $(LDFLAGS) $^ -o $@ $(XPDEV-MT_LIBS)
$(SBJCLEAN): sbjclean.o
$(SBJCLEAN): $(MTOBJODIR)$(DIRSEP)sbjclean.o
ifndef bcc
@echo Linking $@
endif
$(QUIET)$(CC) $(CFLAGS) $(XPDEV_LDFLAGS) $(LDFLAGS) sbjclean.o -o $@ $(XPDEV_LIBS)
$(QUIET)$(CC) $(MT_CFLAGS) $(XPDEV-MT_LDFLAGS) $(MD_LDFLAGS) $(MTOBJODIR)$(DIRSEP)sbjclean.o -o $@ $(XPDEV-MT_LIBS)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment