From df38031f493c0cdb35218fda566077103ee1a68e Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Mon, 29 Oct 2018 22:00:34 +0900 Subject: fixed SDL OSX build --- common/fmplayer_file_unix.c | 4 ++++ sdl/.gitignore | 1 + sdl/osx/.gitignore | 1 + sdl/osx/Info.plist | 2 ++ sdl/osx/Makefile | 12 +++++++----- 5 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 sdl/.gitignore create mode 100644 sdl/osx/.gitignore diff --git a/common/fmplayer_file_unix.c b/common/fmplayer_file_unix.c index 88f1815..13d9450 100644 --- a/common/fmplayer_file_unix.c +++ b/common/fmplayer_file_unix.c @@ -7,7 +7,11 @@ #include #include #include +#ifdef __APPLE__ +#include +#else #include +#endif #include static void *fileread(const char *path, size_t maxsize, size_t *filesize, enum fmplayer_file_error *error) { diff --git a/sdl/.gitignore b/sdl/.gitignore new file mode 100644 index 0000000..fc5cf8f --- /dev/null +++ b/sdl/.gitignore @@ -0,0 +1 @@ +98fmplayersdl diff --git a/sdl/osx/.gitignore b/sdl/osx/.gitignore new file mode 100644 index 0000000..b275077 --- /dev/null +++ b/sdl/osx/.gitignore @@ -0,0 +1 @@ +98fmplayersdl.app diff --git a/sdl/osx/Info.plist b/sdl/osx/Info.plist index 4de59e7..ac36dce 100644 --- a/sdl/osx/Info.plist +++ b/sdl/osx/Info.plist @@ -6,6 +6,8 @@ 98fmplayersdl CFBundleIdentifier com.github.takamichih.98fmplayersdl + NSHighResolutionCapable + True CFBundleDocumentTypes diff --git a/sdl/osx/Makefile b/sdl/osx/Makefile index b04d76e..7cb67d9 100644 --- a/sdl/osx/Makefile +++ b/sdl/osx/Makefile @@ -5,31 +5,33 @@ vpath %.c ../../libopna vpath %.c ../../common vpath %.c ../../fmdriver vpath %.c ../../fft -XCRUN:=xcrun --sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ +#XCRUN:=xcrun --sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ +XCRUN:=xcrun CC:=$(XCRUN) cc OBJS:=main.o OBJS+=pacc-gl.o -OBJS+=fmdsp-pacc.o font_fmdsp_small.o fmdsp_platform_mach.o +OBJS+=fmdsp-pacc.o font_fmdsp_small.o fmdsp_platform_mach.o font_rom.o OBJS+=opna.o opnafm.o opnassg.o opnadrum.o opnaadpcm.o opnatimer.o opnassg-sinc-c.o opnassg-sinc-sse2.o OBJS+=fmdriver_pmd.o fmdriver_fmp.o ppz8.o fmdriver_common.o -OBJS+=fmplayer_file.o fmplayer_work_opna.o fmplayer_file_unix.o fmplayer_drumrom_unix.o +OBJS+=fmplayer_file.o fmplayer_work_opna.o fmplayer_file_unix.o fmplayer_drumrom_unix.o fmplayer_fontrom_unix.o OBJS+=fft.o TARGET:=98fmplayersdl CFLAGS:=-Wall -Wextra -O2 -g +CFLAGS:=-DLIBOPNA_ENABLE_LEVELDATA CFLAGS+=-DPACC_GL_3 #CFLAGS+=-DPACC_GL_ES #CFLAGS+=-DPACC_GL_ES -DPACC_GL_3 CFLAGS+=-I. -I.. -I../.. SDLFW:=/Library/Frameworks/SDL2.framework CFLAGS+=-I$(SDLFW)/Headers -LIBS:=-framework SDL2 -framework OpenGL +LIBS:=-framework SDL2 -framework OpenGL -liconv LIBS+=-F/Library/Frameworks $(TARGET): $(OBJS) $(CC) -o $@ $^ $(LIBS) clean: - rm -f $(TARGET) $(OBJS) + rm -rf $(TARGET).app $(TARGET) $(OBJS) bundle: $(TARGET) rm -rf $(TARGET).app -- cgit v1.2.3