SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 6eeba2f6f677b0ad966a46bac780b4547edd4e45 parent 52de44049c16928cb61b29c8e977f84f52212e05 Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 27 Sep 2024 16:19:58 +0300 Share code between the main Cocoa binary and QuickLook Diffstat:
| M | Makefile | 16 | ++++++++++------ |
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile @@ -297,7 +297,7 @@ endif CFLAGS += -F/Library/Frameworks -mmacosx-version-min=10.9 -isysroot $(SYSROOT) -IAppleCommon OCFLAGS += -x objective-c -fobjc-arc -Wno-deprecated-declarations -isysroot $(SYSROOT) -LDFLAGS += -framework AppKit -mmacosx-version-min=10.9 -isysroot $(SYSROOT) +LDFLAGS += -mmacosx-version-min=10.9 -isysroot $(SYSROOT) GL_LDFLAGS := -framework OpenGL endif CFLAGS += -Wno-deprecated-declarations @@ -360,7 +360,6 @@ TESTER_TARGET := $(BIN)/tester/sameboy_tester endif cocoa: $(BIN)/SameBoy.app -quicklook: $(BIN)/SameBoy.qlgenerator xdg-thumbnailer: $(BIN)/XdgThumbnailer/sameboy-thumbnailer sdl: $(SDL_TARGET) $(BIN)/SDL/dmg_boot.bin $(BIN)/SDL/mgb_boot.bin $(BIN)/SDL/cgb0_boot.bin $(BIN)/SDL/cgb_boot.bin $(BIN)/SDL/agb_boot.bin $(BIN)/SDL/sgb_boot.bin $(BIN)/SDL/sgb2_boot.bin $(BIN)/SDL/LICENSE $(BIN)/SDL/registers.sym $(BIN)/SDL/background.bmp $(BIN)/SDL/Shaders $(BIN)/SDL/Palettes bootroms: $(BIN)/BootROMs/agb_boot.bin $(BIN)/BootROMs/cgb_boot.bin $(BIN)/BootROMs/cgb0_boot.bin $(BIN)/BootROMs/dmg_boot.bin $(BIN)/BootROMs/mgb_boot.bin $(BIN)/BootROMs/sgb_boot.bin $(BIN)/BootROMs/sgb2_boot.bin @@ -543,11 +542,16 @@ ifeq ($(CONF), release) $(CODESIGN) $@ endif -$(BIN)/SameBoy.app/Contents/MacOS/SameBoy: $(CORE_OBJECTS) $(COCOA_OBJECTS) + +$(BIN)/SameBoy.app/Contents/MacOS/SameBoy: $(BIN)/SameBoy.app/Contents/MacOS/SameBoy.dylib + $(CC) $^ -o $@ $(LDFLAGS) $(FAT_FLAGS) -rpath @executable_path/../../ -Wl,-reexport_library,$^ + +$(BIN)/SameBoy.app/Contents/MacOS/SameBoy.dylib: $(COCOA_OBJECTS) $(CORE_OBJECTS) $(QUICKLOOK_OBJECTS) -@$(MKDIR) -p $(dir $@) - $(CC) $^ -o $@ $(LDFLAGS) $(FAT_FLAGS) -framework OpenGL -framework AudioUnit -framework AVFoundation -framework CoreVideo -framework CoreMedia -framework IOKit -framework PreferencePanes -framework Carbon -framework QuartzCore -framework Security -framework WebKit -weak_framework Metal -weak_framework MetalKit + $(CC) $^ -o $@ $(LDFLAGS) $(FAT_FLAGS) -shared -install_name @rpath/Contents/MacOS/SameBoy.dylib -framework OpenGL -framework AudioUnit -framework AVFoundation -framework CoreVideo -framework CoreMedia -framework IOKit -framework PreferencePanes -framework Carbon -framework QuartzCore -framework Security -framework WebKit -weak_framework Metal -weak_framework MetalKit -framework Quicklook -framework AppKit -Wl,-exported_symbols_list,QuickLook/exports.sym -Wl,-exported_symbol,_main ifeq ($(CONF), release) $(STRIP) $@ + $(CODESIGN) $@ endif $(BIN)/SameBoy.app/Contents/Resources/%.nib: Cocoa/%.xib @@ -571,9 +575,9 @@ endif # Currently, SameBoy.app includes two "copies" of each Core .o file once in the app itself and # once in the QL Generator. It should probably become a dylib instead. -$(BIN)/SameBoy.qlgenerator/Contents/MacOS/SameBoyQL: $(CORE_OBJECTS) $(QUICKLOOK_OBJECTS) +$(BIN)/SameBoy.qlgenerator/Contents/MacOS/SameBoyQL: $(BIN)/SameBoy.app/Contents/MacOS/SameBoy.dylib -@$(MKDIR) -p $(dir $@) - $(CC) $^ -o $@ $(LDFLAGS) $(FAT_FLAGS) -Wl,-exported_symbols_list,QuickLook/exports.sym -bundle -framework Cocoa -framework Quicklook + $(CC) $^ -o $@ $(LDFLAGS) $(FAT_FLAGS) -bundle -Wl,-reexport_library,$^ -rpath @loader_path/../../../../../../ ifeq ($(CONF), release) $(STRIP) $@ endif
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.