Fix SDL/tester release builds on ARM64 Macs, strip and codesign Quick Look
This commit is contained in:
parent
0dbfaef4cf
commit
eceb2e4830
18
Makefile
18
Makefile
@ -177,9 +177,11 @@ CFLAGS += -g
|
|||||||
else ifeq ($(CONF), release)
|
else ifeq ($(CONF), release)
|
||||||
CFLAGS += -O3 -DNDEBUG
|
CFLAGS += -O3 -DNDEBUG
|
||||||
STRIP := strip
|
STRIP := strip
|
||||||
|
CODESIGN := true
|
||||||
ifeq ($(PLATFORM),Darwin)
|
ifeq ($(PLATFORM),Darwin)
|
||||||
LDFLAGS += -Wl,-exported_symbols_list,$(NULL)
|
LDFLAGS += -Wl,-exported_symbols_list,$(NULL)
|
||||||
STRIP := strip -x
|
STRIP := strip -x
|
||||||
|
CODESIGN := codesign -fs -
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),windows32)
|
ifeq ($(PLATFORM),windows32)
|
||||||
LDFLAGS += -fuse-ld=lld
|
LDFLAGS += -fuse-ld=lld
|
||||||
@ -302,7 +304,7 @@ $(BIN)/SameBoy.app: $(BIN)/SameBoy.app/Contents/MacOS/SameBoy \
|
|||||||
$(MKDIR) -p $(BIN)/SameBoy.app/Contents/Library/QuickLook/
|
$(MKDIR) -p $(BIN)/SameBoy.app/Contents/Library/QuickLook/
|
||||||
cp -rf $(BIN)/SameBoy.qlgenerator $(BIN)/SameBoy.app/Contents/Library/QuickLook/
|
cp -rf $(BIN)/SameBoy.qlgenerator $(BIN)/SameBoy.app/Contents/Library/QuickLook/
|
||||||
ifeq ($(CONF), release)
|
ifeq ($(CONF), release)
|
||||||
codesign -fs - $@
|
$(CODESIGN) $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(BIN)/SameBoy.app/Contents/MacOS/SameBoy: $(CORE_OBJECTS) $(COCOA_OBJECTS)
|
$(BIN)/SameBoy.app/Contents/MacOS/SameBoy: $(CORE_OBJECTS) $(COCOA_OBJECTS)
|
||||||
@ -324,12 +326,18 @@ $(BIN)/SameBoy.qlgenerator: $(BIN)/SameBoy.qlgenerator/Contents/MacOS/SameBoyQL
|
|||||||
$(MKDIR) -p $(BIN)/SameBoy.qlgenerator/Contents/Resources
|
$(MKDIR) -p $(BIN)/SameBoy.qlgenerator/Contents/Resources
|
||||||
cp QuickLook/*.png $(BIN)/SameBoy.qlgenerator/Contents/Resources/
|
cp QuickLook/*.png $(BIN)/SameBoy.qlgenerator/Contents/Resources/
|
||||||
sed s/@VERSION/$(VERSION)/ < QuickLook/Info.plist > $(BIN)/SameBoy.qlgenerator/Contents/Info.plist
|
sed s/@VERSION/$(VERSION)/ < QuickLook/Info.plist > $(BIN)/SameBoy.qlgenerator/Contents/Info.plist
|
||||||
|
ifeq ($(CONF), release)
|
||||||
|
$(CODESIGN) $@
|
||||||
|
endif
|
||||||
|
|
||||||
# Currently, SameBoy.app includes two "copies" of each Core .o file once in the app itself and
|
# 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.
|
# 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: $(CORE_OBJECTS) $(QUICKLOOK_OBJECTS)
|
||||||
-@$(MKDIR) -p $(dir $@)
|
-@$(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) -Wl,-exported_symbols_list,QuickLook/exports.sym -bundle -framework Cocoa -framework Quicklook
|
||||||
|
ifeq ($(CONF), release)
|
||||||
|
$(STRIP) $@
|
||||||
|
endif
|
||||||
|
|
||||||
# cgb_boot_fast.bin is not a standard boot ROM, we don't expect it to exist in the user-provided
|
# cgb_boot_fast.bin is not a standard boot ROM, we don't expect it to exist in the user-provided
|
||||||
# boot ROM directory.
|
# boot ROM directory.
|
||||||
@ -345,6 +353,7 @@ $(BIN)/SDL/sameboy: $(CORE_OBJECTS) $(SDL_OBJECTS)
|
|||||||
$(CC) $^ -o $@ $(LDFLAGS) $(FAT_FLAGS) $(SDL_LDFLAGS) $(GL_LDFLAGS)
|
$(CC) $^ -o $@ $(LDFLAGS) $(FAT_FLAGS) $(SDL_LDFLAGS) $(GL_LDFLAGS)
|
||||||
ifeq ($(CONF), release)
|
ifeq ($(CONF), release)
|
||||||
$(STRIP) $@
|
$(STRIP) $@
|
||||||
|
$(CODESIGN) $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Windows version builds two, one with a conole and one without it
|
# Windows version builds two, one with a conole and one without it
|
||||||
@ -381,6 +390,7 @@ $(BIN)/tester/sameboy_tester: $(CORE_OBJECTS) $(TESTER_OBJECTS)
|
|||||||
$(CC) $^ -o $@ $(LDFLAGS)
|
$(CC) $^ -o $@ $(LDFLAGS)
|
||||||
ifeq ($(CONF), release)
|
ifeq ($(CONF), release)
|
||||||
$(STRIP) $@
|
$(STRIP) $@
|
||||||
|
$(CODESIGN) $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(BIN)/tester/sameboy_tester.exe: $(CORE_OBJECTS) $(SDL_OBJECTS)
|
$(BIN)/tester/sameboy_tester.exe: $(CORE_OBJECTS) $(SDL_OBJECTS)
|
||||||
@ -472,15 +482,15 @@ endif
|
|||||||
$(DESTDIR)$(PREFIX)/share/icons/hicolor/%/apps/sameboy.png: FreeDesktop/AppIcon/%.png
|
$(DESTDIR)$(PREFIX)/share/icons/hicolor/%/apps/sameboy.png: FreeDesktop/AppIcon/%.png
|
||||||
-@$(MKDIR) -p $(dir $@)
|
-@$(MKDIR) -p $(dir $@)
|
||||||
cp -f $^ $@
|
cp -f $^ $@
|
||||||
|
|
||||||
$(DESTDIR)$(PREFIX)/share/icons/hicolor/%/mimetypes/x-gameboy-rom.png: FreeDesktop/Cartridge/%.png
|
$(DESTDIR)$(PREFIX)/share/icons/hicolor/%/mimetypes/x-gameboy-rom.png: FreeDesktop/Cartridge/%.png
|
||||||
-@$(MKDIR) -p $(dir $@)
|
-@$(MKDIR) -p $(dir $@)
|
||||||
cp -f $^ $@
|
cp -f $^ $@
|
||||||
|
|
||||||
$(DESTDIR)$(PREFIX)/share/icons/hicolor/%/mimetypes/x-gameboy-color-rom.png: FreeDesktop/ColorCartridge/%.png
|
$(DESTDIR)$(PREFIX)/share/icons/hicolor/%/mimetypes/x-gameboy-color-rom.png: FreeDesktop/ColorCartridge/%.png
|
||||||
-@$(MKDIR) -p $(dir $@)
|
-@$(MKDIR) -p $(dir $@)
|
||||||
cp -f $^ $@
|
cp -f $^ $@
|
||||||
|
|
||||||
$(DESTDIR)$(PREFIX)/share/mime/packages/sameboy.xml: FreeDesktop/sameboy.xml
|
$(DESTDIR)$(PREFIX)/share/mime/packages/sameboy.xml: FreeDesktop/sameboy.xml
|
||||||
-@$(MKDIR) -p $(dir $@)
|
-@$(MKDIR) -p $(dir $@)
|
||||||
cp -f $^ $@
|
cp -f $^ $@
|
||||||
|
Loading…
Reference in New Issue
Block a user