Allow compilation with precompiled boot ROMs.
This commit is contained in:
parent
ee4907949b
commit
833cd88aea
16
Makefile
16
Makefile
@ -1,3 +1,6 @@
|
|||||||
|
# Make hacks
|
||||||
|
.INTERMEDIATE:
|
||||||
|
|
||||||
# Set target, configuration, version and destination folders
|
# Set target, configuration, version and destination folders
|
||||||
|
|
||||||
PLATFORM := $(shell uname -s)
|
PLATFORM := $(shell uname -s)
|
||||||
@ -19,6 +22,7 @@ CONF ?= debug
|
|||||||
|
|
||||||
BIN := build/bin
|
BIN := build/bin
|
||||||
OBJ := build/obj
|
OBJ := build/obj
|
||||||
|
BOOTROMS_DIR ?= $(BIN)/BootROMs
|
||||||
|
|
||||||
# Set tools
|
# Set tools
|
||||||
|
|
||||||
@ -135,14 +139,14 @@ $(BIN)/Sameboy.app: $(BIN)/Sameboy.app/Contents/MacOS/Sameboy \
|
|||||||
$(shell ls Cocoa/*.icns) \
|
$(shell ls Cocoa/*.icns) \
|
||||||
Cocoa/License.html \
|
Cocoa/License.html \
|
||||||
Cocoa/info.plist \
|
Cocoa/info.plist \
|
||||||
$(BIN)/BootROMs/dmg_boot.bin \
|
$(BIN)/Sameboy.app/Contents/Resources/dmg_boot.bin \
|
||||||
$(BIN)/BootROMs/cgb_boot.bin \
|
$(BIN)/Sameboy.app/Contents/Resources/cgb_boot.bin \
|
||||||
$(BIN)/Sameboy.app/Contents/Resources/Base.lproj/Document.nib \
|
$(BIN)/Sameboy.app/Contents/Resources/Base.lproj/Document.nib \
|
||||||
$(BIN)/Sameboy.app/Contents/Resources/Base.lproj/MainMenu.nib \
|
$(BIN)/Sameboy.app/Contents/Resources/Base.lproj/MainMenu.nib \
|
||||||
$(BIN)/Sameboy.app/Contents/Resources/Base.lproj/Preferences.nib \
|
$(BIN)/Sameboy.app/Contents/Resources/Base.lproj/Preferences.nib \
|
||||||
Shaders
|
Shaders
|
||||||
$(MKDIR) -p $(BIN)/Sameboy.app/Contents/Resources
|
$(MKDIR) -p $(BIN)/Sameboy.app/Contents/Resources
|
||||||
cp Cocoa/*.icns $(BIN)/BootROMs/dmg_boot.bin $(BIN)/BootROMs/cgb_boot.bin $(BIN)/Sameboy.app/Contents/Resources/
|
cp Cocoa/*.icns $(BIN)/Sameboy.app/Contents/Resources/
|
||||||
sed s/@VERSION/$(VERSION)/ < Cocoa/info.plist > $(BIN)/Sameboy.app/Contents/info.plist
|
sed s/@VERSION/$(VERSION)/ < Cocoa/info.plist > $(BIN)/Sameboy.app/Contents/info.plist
|
||||||
cp Cocoa/License.html $(BIN)/Sameboy.app/Contents/Resources/Credits.html
|
cp Cocoa/License.html $(BIN)/Sameboy.app/Contents/Resources/Credits.html
|
||||||
$(MKDIR) -p $(BIN)/Sameboy.app/Contents/Resources/Shaders
|
$(MKDIR) -p $(BIN)/Sameboy.app/Contents/Resources/Shaders
|
||||||
@ -192,7 +196,11 @@ $(BIN)/sdl/SDL.dll:
|
|||||||
@$(eval MATCH := $(shell ls $(POTENTIAL_MATCHES) 2> NUL | head -n 1))
|
@$(eval MATCH := $(shell ls $(POTENTIAL_MATCHES) 2> NUL | head -n 1))
|
||||||
cp "$(MATCH)" $@
|
cp "$(MATCH)" $@
|
||||||
|
|
||||||
$(BIN)/sdl/%.bin: $(BIN)/BootROMs/%.bin
|
$(BIN)/sdl/%.bin: $(BOOTROMS_DIR)/%.bin
|
||||||
|
-@$(MKDIR) -p $(dir $@)
|
||||||
|
cp -f $^ $@
|
||||||
|
|
||||||
|
$(BIN)/Sameboy.app/Contents/Resources/%.bin: $(BOOTROMS_DIR)/%.bin
|
||||||
-@$(MKDIR) -p $(dir $@)
|
-@$(MKDIR) -p $(dir $@)
|
||||||
cp -f $^ $@
|
cp -f $^ $@
|
||||||
|
|
||||||
|
@ -43,6 +43,6 @@ On Windows, SameBoy also requires:
|
|||||||
* [GnuWin](http://gnuwin32.sourceforge.net/)
|
* [GnuWin](http://gnuwin32.sourceforge.net/)
|
||||||
* Running vcvars32 before running make. Make sure all required tools and libraries are in %PATH% and %lib%, repsectively.
|
* Running vcvars32 before running make. Make sure all required tools and libraries are in %PATH% and %lib%, repsectively.
|
||||||
|
|
||||||
To compile, simply run: `make [CONF=(release|debug)] (cocoa|sdl|bootroms)`
|
To compile, simply run `make`. The targets are cocoa (Default for OS X), sdl (Default for everything else) and bootroms. You may also specify CONF=debug (default) or CONF=release to control optimization and symbols, and specify BOOTROMS_DIR=... to a directory containing precomiled dmg_boot.bin and cgb_boot.bin files, otherwise the build system will compile and use SameBoy's own boot ROMs.
|
||||||
|
|
||||||
SameBoy was compiled and tested on OS X, Ubuntu and Windows 7 32-bit.
|
SameBoy was compiled and tested on OS X, Ubuntu and Windows 7 32-bit.
|
||||||
|
Loading…
Reference in New Issue
Block a user