Exception handling in the cache means that Wagic runs slightly, but noticeably slower. However, it also means that the cache works the way it was intended to, and should prevent all sorts of awkward errors I introduced because things were half-allocated or worse. I've learned my lesson from tonight, and once I get this stuff put back together without exception handling I think I'll self-impose a manditory 24 hours debugging time before any commits. Sorry for the inconvenience. If for some reason you can't compile with exceptions, r862 should be completely without them. Again, wow, this was stupid-- I hadn't even realized exceptions were off for like 24 hours, as the compiler wasn't producing warnings. Apologies, —Jeck
94 lines
3.7 KiB
Makefile
94 lines
3.7 KiB
Makefile
OBJS = objs/ActionElement.o objs/ActionLayer.o objs/ActionStack.o objs/AIMomirPlayer.o objs/AIPlayer.o objs/AIStats.o objs/Blocker.o objs/CardGui.o objs/CardDescriptor.o objs/CardDisplay.o objs/CardEffect.o objs/CardSelector.o objs/ConstraintResolver.o objs/Counters.o objs/Credits.o objs/Damage.o objs/DamagerDamaged.o objs/DeckDataWrapper.o objs/DeckStats.o objs/DuelLayers.o objs/Effects.o objs/ExtraCost.o objs/GameApp.o objs/GameLauncher.o objs/GameObserver.o objs/GameOptions.o objs/GameState.o objs/GameStateDeckViewer.o objs/GameStateDuel.o objs/GameStateMenu.o objs/GameStateOptions.o objs/GameStateShop.o objs/GuiAvatars.o objs/GuiBackground.o objs/GuiCardsController.o objs/GuiCombat.o objs/GuiFrame.o objs/GuiHand.o objs/GuiLayers.o objs/GuiMana.o objs/GuiPhaseBar.o objs/GuiPlay.o objs/GuiStatic.o objs/Logger.o objs/ManaCost.o objs/ManaCostHybrid.o objs/MenuItem.o objs/MTGAbility.o objs/MTGCardInstance.o objs/MTGCard.o objs/MTGDeck.o objs/MTGDefinitions.o objs/MTGGamePhase.o objs/MTGGameZones.o objs/MTGRules.o objs/OptionItem.o objs/PhaseRing.o objs/Player.o objs/PlayerData.o objs/PlayGuiObjectController.o objs/PlayGuiObject.o objs/Pos.o objs/PriceList.o objs/ReplacementEffects.o objs/ShopItem.o objs/SimpleMenu.o objs/SimpleMenuItem.o objs/Subtypes.o objs/TargetChooser.o objs/TargetsList.o objs/TextScroller.o objs/SimplePad.o objs/Token.o objs/Translate.o objs/Trash.o objs/utils.o objs/WEvent.o objs/WResourceManager.o objs/WCachedResource.o
|
|
DEPS = $(patsubst objs/%.o, deps/%.d, $(OBJS))
|
|
|
|
RESULT = $(shell psp-config --psp-prefix 2> Makefile.cache)
|
|
ifeq ($(RESULT),)
|
|
DEFAULT_RULE = linux
|
|
TARGET_ARCHITECTURE = linux
|
|
TARGET = bin/wagic
|
|
else
|
|
DEFAULT_RULE = 3xx
|
|
TARGET_ARCHITECTURE = psp
|
|
PSPSDK = $(shell psp-config --pspsdk-path)
|
|
PSPDIR = $(shell psp-config --psp-prefix)
|
|
TARGET = wagic
|
|
endif
|
|
ifeq ($(MAKECMDGOALS),debug)
|
|
DEFAULT_RULE = debug
|
|
TARGET_ARCHITECTURE = linux
|
|
endif
|
|
ifeq ($(MAKECMDGOALS),linux)
|
|
DEFAULT_RULE = linux
|
|
TARGET_ARCHITECTURE = linux
|
|
endif
|
|
|
|
ifeq ($(TARGET_ARCHITECTURE),psp)
|
|
DEFAULT_RULE = 3xx
|
|
TARGET_ARCHITECTURE = psp
|
|
PSP_FW_VERSION=371
|
|
BUILD_PRX = 1
|
|
LIBS = -ljge300 -lhgetools -lfreetype -ljpeg -lgif -lpng -lz -lm -lmikmod -lpsppower -lpspmpeg -lpspaudiocodec -lpspaudiolib -lpspaudio -lpspmp3 -lpspgum -lpspgu -lpsprtc -lstdc++ -lpspfpu
|
|
|
|
EXTRA_TARGETS = EBOOT.PBP
|
|
PSP_EBOOT_TITLE = Wagic, the Homebrew?!
|
|
PSP_EBOOT_ICON = icon.png
|
|
PSP_EBOOT_UNKPNG = NULL
|
|
#PSP_EBOOT_PIC1 = pic1.png
|
|
CXXFLAGS = -O2 -G0 -Wall -Werror -DDEVHOOK -DPSPFW3XX
|
|
INCDIR = ../../JGE/include ../../JGE/include/psp ../../JGE/include/psp/freetype2 ../../JGE/src
|
|
LIBDIR = ../../JGE/lib/psp
|
|
else
|
|
OBJS += objs/TestSuiteAI.o
|
|
INCDIR = -I ../../JGE/include -I ../../JGE/src
|
|
LIBDIR = -L ../../JGE/lib/linux -L ../../JGE
|
|
LIBS = -ljge -lfreetype -ljpeg -lgif -lpng -lz -lm -lstdc++ -lglut -lhgetools -lfmod-3.75
|
|
CFLAGS = $(INCDIR) -O2 -Wall -W -Werror -Wno-unused -DDEVHOOK -DLINUX
|
|
CXXFLAGS += $(CFLAGS) -fno-exceptions
|
|
ASFLAGS = $(CXXFLAGS)
|
|
|
|
all: $(DEFAULT_RULE)
|
|
|
|
endif
|
|
|
|
LDFLAGS = $(LIBS)
|
|
|
|
|
|
|
|
debug: CXXFLAGS = -Wall -W -Werror -Wno-unused -DDEVHOOK -DPSPFW3XX -ggdb3 -D_DEBUG -DDEBUG -DLINUX $(INCDIR)
|
|
|
|
|
|
|
|
|
|
ifeq ($(TARGET_ARCHITECTURE),psp)
|
|
include $(PSPSDK)/lib/build.mak
|
|
|
|
3xx:
|
|
@echo Rule 3xx is deprecated. Did you want to use just "make" ?
|
|
|
|
else
|
|
|
|
|
|
|
|
$(TARGET): $(OBJS) ../../JGE/lib/linux/libjge.a
|
|
g++ -o $(TARGET) $(OBJS) $(LIBS) $(LIBDIR)
|
|
|
|
linux: $(TARGET)
|
|
|
|
debug: linux
|
|
|
|
clean:
|
|
$(RM) $(OBJS)
|
|
|
|
endif
|
|
|
|
$(OBJS): objs/%.o: src/%.cpp
|
|
$(CXX) -c -o $@ $(CXXFLAGS) $<
|
|
|
|
$(DEPS): deps/%.d: src/%.cpp
|
|
@$(CXX) -MM $(CXXFLAGS) -MQ $(patsubst deps/%.d, objs/%.o, $(@)) -MQ $@ $< > $@
|
|
|
|
.DEFAULT:
|
|
@echo $@ has been deleted : updating deps.
|
|
|
|
-include $(DEPS)
|