-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #273 from DigiDwrf/develop
HiROM | FastROM support
- Loading branch information
Showing
26 changed files
with
814 additions
and
421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ ifeq ($(origin SRC), undefined) | |
SRC := src | ||
endif | ||
|
||
LIBDIRSOBJS := $(PVSNESLIB_HOME)/pvsneslib/lib | ||
|
||
# to avoid some bugs if the PVSNESLIB_HOME is not well defined, we let a small check here | ||
ifeq ($(findstring \,$(PVSNESLIB_HOME)),\) | ||
$(error "PVSNESLIB_HOME environment variable is not defined correctly: the path must be in Unix style (on Windows operating system too!). For example, use /c/snesdev instead of c:\snesdev") | ||
|
@@ -18,6 +16,32 @@ DEBUG = 0 | |
$(info The debug mode is NOT enabled, you can do it by executing "export PVSNESLIB_DEBUG=1") | ||
endif | ||
|
||
ifeq ($(HIROM),1) | ||
HIROM = 1 | ||
$(info HiROM compilation is enabled) | ||
ifeq ($(FASTROM),1) | ||
LIBDIRSOBJS := $(PVSNESLIB_HOME)/pvsneslib/lib/HiROM_FastROM | ||
else | ||
LIBDIRSOBJS := $(PVSNESLIB_HOME)/pvsneslib/lib/HiROM_SlowROM | ||
endif | ||
else | ||
HIROM = 0 | ||
$(info LoROM compilation is enabled) | ||
ifeq ($(FASTROM),1) | ||
LIBDIRSOBJS := $(PVSNESLIB_HOME)/pvsneslib/lib/LoROM_FastROM | ||
else | ||
LIBDIRSOBJS := $(PVSNESLIB_HOME)/pvsneslib/lib/LoROM_SlowROM | ||
endif | ||
endif | ||
|
||
ifeq ($(FASTROM),1) | ||
FASTROM = 1 | ||
$(info FastROM compilation is enabled) | ||
else | ||
FASTROM = 0 | ||
$(info SlowROM compilation is enabled) | ||
endif | ||
|
||
#--------------------------------------------------------------------------------- | ||
# on windows, linkfile can only manage path like E:\pvsneslib\lib\crt0_snes.obj | ||
# this one doesn't work /e/pvsneslib/lib/crt0_snes.obj | ||
|
@@ -85,7 +109,20 @@ export OFILES := $(BINFILES:.bin=.obj) $(CFILES:.c=.obj) $(SFILES:.asm=.obj) | |
#--------------------------------------------------------------------------------- | ||
%.ps: %.c | ||
@echo Compiling to .ps ... $(notdir $<) | ||
ifeq ($(HIROM),1) | ||
ifeq ($(FASTROM),1) | ||
$(CC) $(CFLAGS) -Wall -c $< -H -F -o $@ | ||
else | ||
$(CC) $(CFLAGS) -Wall -c $< -H -o $@ | ||
endif | ||
else | ||
ifeq ($(FASTROM),1) | ||
$(CC) $(CFLAGS) -Wall -c $< -F -o $@ | ||
else | ||
$(CC) $(CFLAGS) -Wall -c $< -o $@ | ||
endif | ||
endif | ||
|
||
ifeq ($(DEBUG),1) | ||
cp $@ [email protected] | ||
endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.