From 815e77aff3e30a8fcbdefc42cb37823f71e5f167 Mon Sep 17 00:00:00 2001 From: Thomas BERNARD Date: Thu, 28 Jun 2018 23:27:29 +0200 Subject: [PATCH] Allow to compile for X11 under OS X --- src/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Makefile b/src/Makefile index 383ebdd5..c36b0d30 100644 --- a/src/Makefile +++ b/src/Makefile @@ -172,6 +172,7 @@ endif FWDIR = /Library/Frameworks BIN = ../bin/grafx2 +ifeq ($(API),sdl) SDLCONFIG := $(shell which sdl-config) ifneq ($(SDLCONFIG), ) # these are for use with macports @@ -182,6 +183,7 @@ else #-framework SDL_ttf SDLLOPT = -isysroot $(MACOSX_SYSROOT) $(MACOSX_ARCH) -L/usr/lib -framework SDL -framework SDL_image -framework Cocoa -framework Carbon -framework OpenGL SDLCOPT = $(MACOSX_ARCH) -I$(FWDIR)/SDL.framework/Headers -I$(FWDIR)/SDL_image.framework/Headers -I$(FWDIR)/SDL_ttf.framework/Headers -D_THREAD_SAFE +endif endif # these are for use with macports @@ -216,10 +218,15 @@ endif endif COPT += -DENABLE_FILENAMES_ICONV LOPT += -liconv +ifeq ($(API),x11) + LOPT += -Wl,-framework,CoreFoundation +endif # Use gcc for compiling. Use ncc to build a callgraph and analyze the code. #CC = nccgen -ncgcc -ncld -ncfabs OBJDIR = ../obj/macosx +ifeq ($(API),sdl) PLATFORMOBJ = SDLMain.o +endif FCLOPT = MACAPPEXE = Grafx2.app/Contents/MacOS/Grafx2 NOTTF = 1