From 9d645a0059d185291f63c1375bd4e5ae844acde6 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sun, 11 Nov 2012 16:33:18 +0100 Subject: [PATCH] switched to hand-written makefiles Build configurations are now in `/build'. See readme file for further build instructions. --- .gitignore | 3 +- Debug/makefile | 67 ----------------------------- Debug/objects.mk | 8 ---- Debug/sources.mk | 35 --------------- Debug/src/app/subdir.mk | 33 -------------- Debug/src/battle/states/subdir.mk | 48 --------------------- Debug/src/battle/subdir.mk | 57 ------------------------ Debug/src/common/subdir.mk | 54 ----------------------- Debug/src/geometry/subdir.mk | 8 ---- Debug/src/graphics/subdir.mk | 51 ---------------------- Debug/src/loader/subdir.mk | 45 ------------------- Debug/src/map/subdir.mk | 42 ------------------ Debug/src/sdl/subdir.mk | 33 -------------- Debug/src/subdir.mk | 24 ----------- Release/makefile | 67 ----------------------------- Release/objects.mk | 8 ---- Release/sources.mk | 35 --------------- Release/src/app/subdir.mk | 33 -------------- Release/src/battle/states/subdir.mk | 48 --------------------- Release/src/battle/subdir.mk | 57 ------------------------ Release/src/common/subdir.mk | 54 ----------------------- Release/src/geometry/subdir.mk | 8 ---- Release/src/graphics/subdir.mk | 51 ---------------------- Release/src/loader/subdir.mk | 45 ------------------- Release/src/map/subdir.mk | 42 ------------------ Release/src/sdl/subdir.mk | 33 -------------- Release/src/subdir.mk | 24 ----------- build/config.mk | 29 +++++++++++++ build/debug/Makefile | 7 +++ build/l2e.mk | 43 ++++++++++++++++++ build/release/Makefile | 8 ++++ build/targets.mk | 6 +++ readme | 30 ++++++++++++- 33 files changed, 122 insertions(+), 1014 deletions(-) delete mode 100644 Debug/makefile delete mode 100644 Debug/objects.mk delete mode 100644 Debug/sources.mk delete mode 100644 Debug/src/app/subdir.mk delete mode 100644 Debug/src/battle/states/subdir.mk delete mode 100644 Debug/src/battle/subdir.mk delete mode 100644 Debug/src/common/subdir.mk delete mode 100644 Debug/src/geometry/subdir.mk delete mode 100644 Debug/src/graphics/subdir.mk delete mode 100644 Debug/src/loader/subdir.mk delete mode 100644 Debug/src/map/subdir.mk delete mode 100644 Debug/src/sdl/subdir.mk delete mode 100644 Debug/src/subdir.mk delete mode 100644 Release/makefile delete mode 100644 Release/objects.mk delete mode 100644 Release/sources.mk delete mode 100644 Release/src/app/subdir.mk delete mode 100644 Release/src/battle/states/subdir.mk delete mode 100644 Release/src/battle/subdir.mk delete mode 100644 Release/src/common/subdir.mk delete mode 100644 Release/src/geometry/subdir.mk delete mode 100644 Release/src/graphics/subdir.mk delete mode 100644 Release/src/loader/subdir.mk delete mode 100644 Release/src/map/subdir.mk delete mode 100644 Release/src/sdl/subdir.mk delete mode 100644 Release/src/subdir.mk create mode 100644 build/config.mk create mode 100644 build/debug/Makefile create mode 100644 build/l2e.mk create mode 100644 build/release/Makefile create mode 100644 build/targets.mk diff --git a/.gitignore b/.gitignore index 6bcdc12..c85cc26 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,7 @@ *.o *.d *.l2o -Debug/l2e -Release/l2e +build/*/l2e shots/ bin/* l2e.depend diff --git a/Debug/makefile b/Debug/makefile deleted file mode 100644 index fb78d77..0000000 --- a/Debug/makefile +++ /dev/null @@ -1,67 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - --include ../makefile.init - -RM := rm -rf - -# All of the sources participating in the build are defined here --include sources.mk --include src/sdl/subdir.mk --include src/map/subdir.mk --include src/loader/subdir.mk --include src/graphics/subdir.mk --include src/common/subdir.mk --include src/battle/states/subdir.mk --include src/battle/subdir.mk --include src/app/subdir.mk --include src/subdir.mk --include subdir.mk --include objects.mk - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(strip $(C++_DEPS)),) --include $(C++_DEPS) -endif -ifneq ($(strip $(C_DEPS)),) --include $(C_DEPS) -endif -ifneq ($(strip $(CC_DEPS)),) --include $(CC_DEPS) -endif -ifneq ($(strip $(CPP_DEPS)),) --include $(CPP_DEPS) -endif -ifneq ($(strip $(CXX_DEPS)),) --include $(CXX_DEPS) -endif -ifneq ($(strip $(C_UPPER_DEPS)),) --include $(C_UPPER_DEPS) -endif -endif - --include ../makefile.defs - -# Add inputs and outputs from these tool invocations to the build variables - -# All Target -all: l2e - -# Tool invocations -l2e: $(OBJS) $(USER_OBJS) - @echo 'Building target: $@' - @echo 'Invoking: GCC C++ Linker' - g++ -o "l2e" $(OBJS) $(USER_OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -# Other Targets -clean: - -$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) l2e - -@echo ' ' - -.PHONY: all clean dependents -.SECONDARY: - --include ../makefile.targets diff --git a/Debug/objects.mk b/Debug/objects.mk deleted file mode 100644 index 718d8a1..0000000 --- a/Debug/objects.mk +++ /dev/null @@ -1,8 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -USER_OBJS := - -LIBS := -lSDL -lSDL_image - diff --git a/Debug/sources.mk b/Debug/sources.mk deleted file mode 100644 index ccb0eeb..0000000 --- a/Debug/sources.mk +++ /dev/null @@ -1,35 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -O_SRCS := -CPP_SRCS := -C_UPPER_SRCS := -C_SRCS := -S_UPPER_SRCS := -OBJ_SRCS := -ASM_SRCS := -CXX_SRCS := -C++_SRCS := -CC_SRCS := -OBJS := -C++_DEPS := -C_DEPS := -CC_DEPS := -CPP_DEPS := -EXECUTABLES := -CXX_DEPS := -C_UPPER_DEPS := - -# Every subdirectory with source files must be described here -SUBDIRS := \ -src/sdl \ -src/map \ -src \ -src/loader \ -src/graphics \ -src/common \ -src/battle/states \ -src/battle \ -src/app \ - diff --git a/Debug/src/app/subdir.mk b/Debug/src/app/subdir.mk deleted file mode 100644 index caae915..0000000 --- a/Debug/src/app/subdir.mk +++ /dev/null @@ -1,33 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/app/Application.cpp \ -../src/app/Arguments.cpp \ -../src/app/Input.cpp \ -../src/app/State.cpp - -OBJS += \ -./src/app/Application.o \ -./src/app/Arguments.o \ -./src/app/Input.o \ -./src/app/State.o - -CPP_DEPS += \ -./src/app/Application.d \ -./src/app/Arguments.d \ -./src/app/Input.d \ -./src/app/State.d - - -# Each subdirectory must supply rules for building sources it contributes -src/app/%.o: ../src/app/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Debug/src/battle/states/subdir.mk b/Debug/src/battle/states/subdir.mk deleted file mode 100644 index d817c33..0000000 --- a/Debug/src/battle/states/subdir.mk +++ /dev/null @@ -1,48 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/battle/states/PerformAttacks.cpp \ -../src/battle/states/RunState.cpp \ -../src/battle/states/SelectAttackType.cpp \ -../src/battle/states/SelectIkari.cpp \ -../src/battle/states/SelectItem.cpp \ -../src/battle/states/SelectMoveAction.cpp \ -../src/battle/states/SelectSpell.cpp \ -../src/battle/states/SelectTarget.cpp \ -../src/battle/states/SwapHeroes.cpp - -OBJS += \ -./src/battle/states/PerformAttacks.o \ -./src/battle/states/RunState.o \ -./src/battle/states/SelectAttackType.o \ -./src/battle/states/SelectIkari.o \ -./src/battle/states/SelectItem.o \ -./src/battle/states/SelectMoveAction.o \ -./src/battle/states/SelectSpell.o \ -./src/battle/states/SelectTarget.o \ -./src/battle/states/SwapHeroes.o - -CPP_DEPS += \ -./src/battle/states/PerformAttacks.d \ -./src/battle/states/RunState.d \ -./src/battle/states/SelectAttackType.d \ -./src/battle/states/SelectIkari.d \ -./src/battle/states/SelectItem.d \ -./src/battle/states/SelectMoveAction.d \ -./src/battle/states/SelectSpell.d \ -./src/battle/states/SelectTarget.d \ -./src/battle/states/SwapHeroes.d - - -# Each subdirectory must supply rules for building sources it contributes -src/battle/states/%.o: ../src/battle/states/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Debug/src/battle/subdir.mk b/Debug/src/battle/subdir.mk deleted file mode 100644 index 0f0ff35..0000000 --- a/Debug/src/battle/subdir.mk +++ /dev/null @@ -1,57 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/battle/AttackChoice.cpp \ -../src/battle/AttackTypeMenu.cpp \ -../src/battle/BattleState.cpp \ -../src/battle/Hero.cpp \ -../src/battle/HeroTag.cpp \ -../src/battle/Monster.cpp \ -../src/battle/MoveMenu.cpp \ -../src/battle/NumberAnimation.cpp \ -../src/battle/PartyLayout.cpp \ -../src/battle/Resources.cpp \ -../src/battle/SmallHeroTag.cpp \ -../src/battle/TargetSelection.cpp - -OBJS += \ -./src/battle/AttackChoice.o \ -./src/battle/AttackTypeMenu.o \ -./src/battle/BattleState.o \ -./src/battle/Hero.o \ -./src/battle/HeroTag.o \ -./src/battle/Monster.o \ -./src/battle/MoveMenu.o \ -./src/battle/NumberAnimation.o \ -./src/battle/PartyLayout.o \ -./src/battle/Resources.o \ -./src/battle/SmallHeroTag.o \ -./src/battle/TargetSelection.o - -CPP_DEPS += \ -./src/battle/AttackChoice.d \ -./src/battle/AttackTypeMenu.d \ -./src/battle/BattleState.d \ -./src/battle/Hero.d \ -./src/battle/HeroTag.d \ -./src/battle/Monster.d \ -./src/battle/MoveMenu.d \ -./src/battle/NumberAnimation.d \ -./src/battle/PartyLayout.d \ -./src/battle/Resources.d \ -./src/battle/SmallHeroTag.d \ -./src/battle/TargetSelection.d - - -# Each subdirectory must supply rules for building sources it contributes -src/battle/%.o: ../src/battle/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Debug/src/common/subdir.mk b/Debug/src/common/subdir.mk deleted file mode 100644 index ee57f9b..0000000 --- a/Debug/src/common/subdir.mk +++ /dev/null @@ -1,54 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/common/GameConfig.cpp \ -../src/common/GameState.cpp \ -../src/common/Hero.cpp \ -../src/common/Ikari.cpp \ -../src/common/Inventory.cpp \ -../src/common/Item.cpp \ -../src/common/Script.cpp \ -../src/common/ScriptRunner.cpp \ -../src/common/Spell.cpp \ -../src/common/Stats.cpp \ -../src/common/TargetingMode.cpp - -OBJS += \ -./src/common/GameConfig.o \ -./src/common/GameState.o \ -./src/common/Hero.o \ -./src/common/Ikari.o \ -./src/common/Inventory.o \ -./src/common/Item.o \ -./src/common/Script.o \ -./src/common/ScriptRunner.o \ -./src/common/Spell.o \ -./src/common/Stats.o \ -./src/common/TargetingMode.o - -CPP_DEPS += \ -./src/common/GameConfig.d \ -./src/common/GameState.d \ -./src/common/Hero.d \ -./src/common/Ikari.d \ -./src/common/Inventory.d \ -./src/common/Item.d \ -./src/common/Script.d \ -./src/common/ScriptRunner.d \ -./src/common/Spell.d \ -./src/common/Stats.d \ -./src/common/TargetingMode.d - - -# Each subdirectory must supply rules for building sources it contributes -src/common/%.o: ../src/common/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Debug/src/geometry/subdir.mk b/Debug/src/geometry/subdir.mk deleted file mode 100644 index 1957028..0000000 --- a/Debug/src/geometry/subdir.mk +++ /dev/null @@ -1,8 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables - -# Each subdirectory must supply rules for building sources it contributes - diff --git a/Debug/src/graphics/subdir.mk b/Debug/src/graphics/subdir.mk deleted file mode 100644 index 23f43a8..0000000 --- a/Debug/src/graphics/subdir.mk +++ /dev/null @@ -1,51 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/graphics/Animation.cpp \ -../src/graphics/Camera.cpp \ -../src/graphics/ColorFade.cpp \ -../src/graphics/ComplexAnimation.cpp \ -../src/graphics/Font.cpp \ -../src/graphics/Frame.cpp \ -../src/graphics/Gauge.cpp \ -../src/graphics/Menu.cpp \ -../src/graphics/SimpleAnimation.cpp \ -../src/graphics/Sprite.cpp - -OBJS += \ -./src/graphics/Animation.o \ -./src/graphics/Camera.o \ -./src/graphics/ColorFade.o \ -./src/graphics/ComplexAnimation.o \ -./src/graphics/Font.o \ -./src/graphics/Frame.o \ -./src/graphics/Gauge.o \ -./src/graphics/Menu.o \ -./src/graphics/SimpleAnimation.o \ -./src/graphics/Sprite.o - -CPP_DEPS += \ -./src/graphics/Animation.d \ -./src/graphics/Camera.d \ -./src/graphics/ColorFade.d \ -./src/graphics/ComplexAnimation.d \ -./src/graphics/Font.d \ -./src/graphics/Frame.d \ -./src/graphics/Gauge.d \ -./src/graphics/Menu.d \ -./src/graphics/SimpleAnimation.d \ -./src/graphics/Sprite.d - - -# Each subdirectory must supply rules for building sources it contributes -src/graphics/%.o: ../src/graphics/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Debug/src/loader/subdir.mk b/Debug/src/loader/subdir.mk deleted file mode 100644 index a7ad663..0000000 --- a/Debug/src/loader/subdir.mk +++ /dev/null @@ -1,45 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/loader/Caster.cpp \ -../src/loader/Interpreter.cpp \ -../src/loader/PagedAllocator.cpp \ -../src/loader/ParsedSource.cpp \ -../src/loader/Parser.cpp \ -../src/loader/Tokenizer.cpp \ -../src/loader/TypeDescription.cpp \ -../src/loader/utility.cpp - -OBJS += \ -./src/loader/Caster.o \ -./src/loader/Interpreter.o \ -./src/loader/PagedAllocator.o \ -./src/loader/ParsedSource.o \ -./src/loader/Parser.o \ -./src/loader/Tokenizer.o \ -./src/loader/TypeDescription.o \ -./src/loader/utility.o - -CPP_DEPS += \ -./src/loader/Caster.d \ -./src/loader/Interpreter.d \ -./src/loader/PagedAllocator.d \ -./src/loader/ParsedSource.d \ -./src/loader/Parser.d \ -./src/loader/Tokenizer.d \ -./src/loader/TypeDescription.d \ -./src/loader/utility.d - - -# Each subdirectory must supply rules for building sources it contributes -src/loader/%.o: ../src/loader/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Debug/src/map/subdir.mk b/Debug/src/map/subdir.mk deleted file mode 100644 index 5faffc5..0000000 --- a/Debug/src/map/subdir.mk +++ /dev/null @@ -1,42 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/map/Area.cpp \ -../src/map/Entity.cpp \ -../src/map/Map.cpp \ -../src/map/MapState.cpp \ -../src/map/Tile.cpp \ -../src/map/TransitionState.cpp \ -../src/map/Trigger.cpp - -OBJS += \ -./src/map/Area.o \ -./src/map/Entity.o \ -./src/map/Map.o \ -./src/map/MapState.o \ -./src/map/Tile.o \ -./src/map/TransitionState.o \ -./src/map/Trigger.o - -CPP_DEPS += \ -./src/map/Area.d \ -./src/map/Entity.d \ -./src/map/Map.d \ -./src/map/MapState.d \ -./src/map/Tile.d \ -./src/map/TransitionState.d \ -./src/map/Trigger.d - - -# Each subdirectory must supply rules for building sources it contributes -src/map/%.o: ../src/map/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Debug/src/sdl/subdir.mk b/Debug/src/sdl/subdir.mk deleted file mode 100644 index 43bc0e6..0000000 --- a/Debug/src/sdl/subdir.mk +++ /dev/null @@ -1,33 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/sdl/InitImage.cpp \ -../src/sdl/InitSDL.cpp \ -../src/sdl/InitScreen.cpp \ -../src/sdl/utility.cpp - -OBJS += \ -./src/sdl/InitImage.o \ -./src/sdl/InitSDL.o \ -./src/sdl/InitScreen.o \ -./src/sdl/utility.o - -CPP_DEPS += \ -./src/sdl/InitImage.d \ -./src/sdl/InitSDL.d \ -./src/sdl/InitScreen.d \ -./src/sdl/utility.d - - -# Each subdirectory must supply rules for building sources it contributes -src/sdl/%.o: ../src/sdl/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Debug/src/subdir.mk b/Debug/src/subdir.mk deleted file mode 100644 index 773b36c..0000000 --- a/Debug/src/subdir.mk +++ /dev/null @@ -1,24 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/main.cpp - -OBJS += \ -./src/main.o - -CPP_DEPS += \ -./src/main.d - - -# Each subdirectory must supply rules for building sources it contributes -src/%.o: ../src/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Release/makefile b/Release/makefile deleted file mode 100644 index fb78d77..0000000 --- a/Release/makefile +++ /dev/null @@ -1,67 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - --include ../makefile.init - -RM := rm -rf - -# All of the sources participating in the build are defined here --include sources.mk --include src/sdl/subdir.mk --include src/map/subdir.mk --include src/loader/subdir.mk --include src/graphics/subdir.mk --include src/common/subdir.mk --include src/battle/states/subdir.mk --include src/battle/subdir.mk --include src/app/subdir.mk --include src/subdir.mk --include subdir.mk --include objects.mk - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(strip $(C++_DEPS)),) --include $(C++_DEPS) -endif -ifneq ($(strip $(C_DEPS)),) --include $(C_DEPS) -endif -ifneq ($(strip $(CC_DEPS)),) --include $(CC_DEPS) -endif -ifneq ($(strip $(CPP_DEPS)),) --include $(CPP_DEPS) -endif -ifneq ($(strip $(CXX_DEPS)),) --include $(CXX_DEPS) -endif -ifneq ($(strip $(C_UPPER_DEPS)),) --include $(C_UPPER_DEPS) -endif -endif - --include ../makefile.defs - -# Add inputs and outputs from these tool invocations to the build variables - -# All Target -all: l2e - -# Tool invocations -l2e: $(OBJS) $(USER_OBJS) - @echo 'Building target: $@' - @echo 'Invoking: GCC C++ Linker' - g++ -o "l2e" $(OBJS) $(USER_OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -# Other Targets -clean: - -$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) l2e - -@echo ' ' - -.PHONY: all clean dependents -.SECONDARY: - --include ../makefile.targets diff --git a/Release/objects.mk b/Release/objects.mk deleted file mode 100644 index 718d8a1..0000000 --- a/Release/objects.mk +++ /dev/null @@ -1,8 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -USER_OBJS := - -LIBS := -lSDL -lSDL_image - diff --git a/Release/sources.mk b/Release/sources.mk deleted file mode 100644 index ccb0eeb..0000000 --- a/Release/sources.mk +++ /dev/null @@ -1,35 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -O_SRCS := -CPP_SRCS := -C_UPPER_SRCS := -C_SRCS := -S_UPPER_SRCS := -OBJ_SRCS := -ASM_SRCS := -CXX_SRCS := -C++_SRCS := -CC_SRCS := -OBJS := -C++_DEPS := -C_DEPS := -CC_DEPS := -CPP_DEPS := -EXECUTABLES := -CXX_DEPS := -C_UPPER_DEPS := - -# Every subdirectory with source files must be described here -SUBDIRS := \ -src/sdl \ -src/map \ -src \ -src/loader \ -src/graphics \ -src/common \ -src/battle/states \ -src/battle \ -src/app \ - diff --git a/Release/src/app/subdir.mk b/Release/src/app/subdir.mk deleted file mode 100644 index 57cbd25..0000000 --- a/Release/src/app/subdir.mk +++ /dev/null @@ -1,33 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/app/Application.cpp \ -../src/app/Arguments.cpp \ -../src/app/Input.cpp \ -../src/app/State.cpp - -OBJS += \ -./src/app/Application.o \ -./src/app/Arguments.o \ -./src/app/Input.o \ -./src/app/State.o - -CPP_DEPS += \ -./src/app/Application.d \ -./src/app/Arguments.d \ -./src/app/Input.d \ -./src/app/State.d - - -# Each subdirectory must supply rules for building sources it contributes -src/app/%.o: ../src/app/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -DNDEBUG -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Release/src/battle/states/subdir.mk b/Release/src/battle/states/subdir.mk deleted file mode 100644 index e526ca7..0000000 --- a/Release/src/battle/states/subdir.mk +++ /dev/null @@ -1,48 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/battle/states/PerformAttacks.cpp \ -../src/battle/states/RunState.cpp \ -../src/battle/states/SelectAttackType.cpp \ -../src/battle/states/SelectIkari.cpp \ -../src/battle/states/SelectItem.cpp \ -../src/battle/states/SelectMoveAction.cpp \ -../src/battle/states/SelectSpell.cpp \ -../src/battle/states/SelectTarget.cpp \ -../src/battle/states/SwapHeroes.cpp - -OBJS += \ -./src/battle/states/PerformAttacks.o \ -./src/battle/states/RunState.o \ -./src/battle/states/SelectAttackType.o \ -./src/battle/states/SelectIkari.o \ -./src/battle/states/SelectItem.o \ -./src/battle/states/SelectMoveAction.o \ -./src/battle/states/SelectSpell.o \ -./src/battle/states/SelectTarget.o \ -./src/battle/states/SwapHeroes.o - -CPP_DEPS += \ -./src/battle/states/PerformAttacks.d \ -./src/battle/states/RunState.d \ -./src/battle/states/SelectAttackType.d \ -./src/battle/states/SelectIkari.d \ -./src/battle/states/SelectItem.d \ -./src/battle/states/SelectMoveAction.d \ -./src/battle/states/SelectSpell.d \ -./src/battle/states/SelectTarget.d \ -./src/battle/states/SwapHeroes.d - - -# Each subdirectory must supply rules for building sources it contributes -src/battle/states/%.o: ../src/battle/states/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -DNDEBUG -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Release/src/battle/subdir.mk b/Release/src/battle/subdir.mk deleted file mode 100644 index c926a31..0000000 --- a/Release/src/battle/subdir.mk +++ /dev/null @@ -1,57 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/battle/AttackChoice.cpp \ -../src/battle/AttackTypeMenu.cpp \ -../src/battle/BattleState.cpp \ -../src/battle/Hero.cpp \ -../src/battle/HeroTag.cpp \ -../src/battle/Monster.cpp \ -../src/battle/MoveMenu.cpp \ -../src/battle/NumberAnimation.cpp \ -../src/battle/PartyLayout.cpp \ -../src/battle/Resources.cpp \ -../src/battle/SmallHeroTag.cpp \ -../src/battle/TargetSelection.cpp - -OBJS += \ -./src/battle/AttackChoice.o \ -./src/battle/AttackTypeMenu.o \ -./src/battle/BattleState.o \ -./src/battle/Hero.o \ -./src/battle/HeroTag.o \ -./src/battle/Monster.o \ -./src/battle/MoveMenu.o \ -./src/battle/NumberAnimation.o \ -./src/battle/PartyLayout.o \ -./src/battle/Resources.o \ -./src/battle/SmallHeroTag.o \ -./src/battle/TargetSelection.o - -CPP_DEPS += \ -./src/battle/AttackChoice.d \ -./src/battle/AttackTypeMenu.d \ -./src/battle/BattleState.d \ -./src/battle/Hero.d \ -./src/battle/HeroTag.d \ -./src/battle/Monster.d \ -./src/battle/MoveMenu.d \ -./src/battle/NumberAnimation.d \ -./src/battle/PartyLayout.d \ -./src/battle/Resources.d \ -./src/battle/SmallHeroTag.d \ -./src/battle/TargetSelection.d - - -# Each subdirectory must supply rules for building sources it contributes -src/battle/%.o: ../src/battle/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -DNDEBUG -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Release/src/common/subdir.mk b/Release/src/common/subdir.mk deleted file mode 100644 index c0683d3..0000000 --- a/Release/src/common/subdir.mk +++ /dev/null @@ -1,54 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/common/GameConfig.cpp \ -../src/common/GameState.cpp \ -../src/common/Hero.cpp \ -../src/common/Ikari.cpp \ -../src/common/Inventory.cpp \ -../src/common/Item.cpp \ -../src/common/Script.cpp \ -../src/common/ScriptRunner.cpp \ -../src/common/Spell.cpp \ -../src/common/Stats.cpp \ -../src/common/TargetingMode.cpp - -OBJS += \ -./src/common/GameConfig.o \ -./src/common/GameState.o \ -./src/common/Hero.o \ -./src/common/Ikari.o \ -./src/common/Inventory.o \ -./src/common/Item.o \ -./src/common/Script.o \ -./src/common/ScriptRunner.o \ -./src/common/Spell.o \ -./src/common/Stats.o \ -./src/common/TargetingMode.o - -CPP_DEPS += \ -./src/common/GameConfig.d \ -./src/common/GameState.d \ -./src/common/Hero.d \ -./src/common/Ikari.d \ -./src/common/Inventory.d \ -./src/common/Item.d \ -./src/common/Script.d \ -./src/common/ScriptRunner.d \ -./src/common/Spell.d \ -./src/common/Stats.d \ -./src/common/TargetingMode.d - - -# Each subdirectory must supply rules for building sources it contributes -src/common/%.o: ../src/common/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -DNDEBUG -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Release/src/geometry/subdir.mk b/Release/src/geometry/subdir.mk deleted file mode 100644 index 1957028..0000000 --- a/Release/src/geometry/subdir.mk +++ /dev/null @@ -1,8 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables - -# Each subdirectory must supply rules for building sources it contributes - diff --git a/Release/src/graphics/subdir.mk b/Release/src/graphics/subdir.mk deleted file mode 100644 index c020692..0000000 --- a/Release/src/graphics/subdir.mk +++ /dev/null @@ -1,51 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/graphics/Animation.cpp \ -../src/graphics/Camera.cpp \ -../src/graphics/ColorFade.cpp \ -../src/graphics/ComplexAnimation.cpp \ -../src/graphics/Font.cpp \ -../src/graphics/Frame.cpp \ -../src/graphics/Gauge.cpp \ -../src/graphics/Menu.cpp \ -../src/graphics/SimpleAnimation.cpp \ -../src/graphics/Sprite.cpp - -OBJS += \ -./src/graphics/Animation.o \ -./src/graphics/Camera.o \ -./src/graphics/ColorFade.o \ -./src/graphics/ComplexAnimation.o \ -./src/graphics/Font.o \ -./src/graphics/Frame.o \ -./src/graphics/Gauge.o \ -./src/graphics/Menu.o \ -./src/graphics/SimpleAnimation.o \ -./src/graphics/Sprite.o - -CPP_DEPS += \ -./src/graphics/Animation.d \ -./src/graphics/Camera.d \ -./src/graphics/ColorFade.d \ -./src/graphics/ComplexAnimation.d \ -./src/graphics/Font.d \ -./src/graphics/Frame.d \ -./src/graphics/Gauge.d \ -./src/graphics/Menu.d \ -./src/graphics/SimpleAnimation.d \ -./src/graphics/Sprite.d - - -# Each subdirectory must supply rules for building sources it contributes -src/graphics/%.o: ../src/graphics/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -DNDEBUG -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Release/src/loader/subdir.mk b/Release/src/loader/subdir.mk deleted file mode 100644 index 86ed9d6..0000000 --- a/Release/src/loader/subdir.mk +++ /dev/null @@ -1,45 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/loader/Caster.cpp \ -../src/loader/Interpreter.cpp \ -../src/loader/PagedAllocator.cpp \ -../src/loader/ParsedSource.cpp \ -../src/loader/Parser.cpp \ -../src/loader/Tokenizer.cpp \ -../src/loader/TypeDescription.cpp \ -../src/loader/utility.cpp - -OBJS += \ -./src/loader/Caster.o \ -./src/loader/Interpreter.o \ -./src/loader/PagedAllocator.o \ -./src/loader/ParsedSource.o \ -./src/loader/Parser.o \ -./src/loader/Tokenizer.o \ -./src/loader/TypeDescription.o \ -./src/loader/utility.o - -CPP_DEPS += \ -./src/loader/Caster.d \ -./src/loader/Interpreter.d \ -./src/loader/PagedAllocator.d \ -./src/loader/ParsedSource.d \ -./src/loader/Parser.d \ -./src/loader/Tokenizer.d \ -./src/loader/TypeDescription.d \ -./src/loader/utility.d - - -# Each subdirectory must supply rules for building sources it contributes -src/loader/%.o: ../src/loader/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -DNDEBUG -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Release/src/map/subdir.mk b/Release/src/map/subdir.mk deleted file mode 100644 index 78e65f3..0000000 --- a/Release/src/map/subdir.mk +++ /dev/null @@ -1,42 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/map/Area.cpp \ -../src/map/Entity.cpp \ -../src/map/Map.cpp \ -../src/map/MapState.cpp \ -../src/map/Tile.cpp \ -../src/map/TransitionState.cpp \ -../src/map/Trigger.cpp - -OBJS += \ -./src/map/Area.o \ -./src/map/Entity.o \ -./src/map/Map.o \ -./src/map/MapState.o \ -./src/map/Tile.o \ -./src/map/TransitionState.o \ -./src/map/Trigger.o - -CPP_DEPS += \ -./src/map/Area.d \ -./src/map/Entity.d \ -./src/map/Map.d \ -./src/map/MapState.d \ -./src/map/Tile.d \ -./src/map/TransitionState.d \ -./src/map/Trigger.d - - -# Each subdirectory must supply rules for building sources it contributes -src/map/%.o: ../src/map/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -DNDEBUG -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Release/src/sdl/subdir.mk b/Release/src/sdl/subdir.mk deleted file mode 100644 index eb0681e..0000000 --- a/Release/src/sdl/subdir.mk +++ /dev/null @@ -1,33 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/sdl/InitImage.cpp \ -../src/sdl/InitSDL.cpp \ -../src/sdl/InitScreen.cpp \ -../src/sdl/utility.cpp - -OBJS += \ -./src/sdl/InitImage.o \ -./src/sdl/InitSDL.o \ -./src/sdl/InitScreen.o \ -./src/sdl/utility.o - -CPP_DEPS += \ -./src/sdl/InitImage.d \ -./src/sdl/InitSDL.d \ -./src/sdl/InitScreen.d \ -./src/sdl/utility.d - - -# Each subdirectory must supply rules for building sources it contributes -src/sdl/%.o: ../src/sdl/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -DNDEBUG -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Release/src/subdir.mk b/Release/src/subdir.mk deleted file mode 100644 index 9aa8e01..0000000 --- a/Release/src/subdir.mk +++ /dev/null @@ -1,24 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -../src/main.cpp - -OBJS += \ -./src/main.o - -CPP_DEPS += \ -./src/main.d - - -# Each subdirectory must supply rules for building sources it contributes -src/%.o: ../src/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -DNDEBUG -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/build/config.mk b/build/config.mk new file mode 100644 index 0000000..899e363 --- /dev/null +++ b/build/config.mk @@ -0,0 +1,29 @@ +# commands +CXX ?= g++ +RM ?= rm -Rf +MKDIR ?= mkdir -p +RMDIR ?= rmdir -p --ignore-fail-on-non-empty + +# names and pathes +BUILD := $(dir $(lastword $(MAKEFILE_LIST))) +TOP := $(BUILD).. +srcdir = $(TOP)/src + +# flags +CPPFLAGS ?= +CXXFLAGS ?= +LDFLAGS ?= + +CXXFLAGS += -Wall -Werror + +# libraries +SDL_FLAGS = $(shell pkg-config --cflags sdl) +SDL_LIBS = $(shell pkg-config --libs sdl) + +SDL_IMG_FLAGS = $(shell pkg-config --cflags SDL_image) +SDL_IMG_LIBS = $(shell pkg-config --libs SDL_image) + +# set to empty to show tool invocations +VERBOSE = @ + +-include $(BUILD)local-config.mk diff --git a/build/debug/Makefile b/build/debug/Makefile new file mode 100644 index 0000000..f500214 --- /dev/null +++ b/build/debug/Makefile @@ -0,0 +1,7 @@ +include ../targets.mk +include ../config.mk +include ../l2e.mk + +CXXFlags += -O0 -g3 + +-include local.mk diff --git a/build/l2e.mk b/build/l2e.mk new file mode 100644 index 0000000..e756cf8 --- /dev/null +++ b/build/l2e.mk @@ -0,0 +1,43 @@ +L2E_DIRS := $(shell cd $(srcdir) && find * -type d) +L2E_SRCS := $(shell cd $(srcdir)&& find * -type f -name '*.cpp') +L2E_DEPS = $(L2E_SRCS:%.cpp=%.d) +L2E_OBJS = $(L2E_SRCS:%.cpp=%.o) +L2E_EXES = l2e + +L2E_FLAGS = $(sort $(strip \ + $(SDL_FLAGS) \ + $(SDL_IMG_FLAGS) \ + )) +L2E_LIBS = $(sort $(strip \ + $(SDL_LIBS) \ + $(SDL_IMG_LIBS) \ + )) + +-include $(L2E_DEPS) + +$(L2E_OBJS): %.o: $(srcdir)/%.cpp + -@$(MKDIR) "$(@D)" + @echo "compile: $@" + $(VERBOSE) $(CXX) -c -o "$@" -MMD -MP -MF"$*.d" -MT"$@)" "$<" \ + $(L2E_FLAGS) $(CPPFLAGS) $(CXXFLAGS) + +$(L2E_EXES): $(L2E_OBJS) + -@$(MKDIR) "$(@D)" + @echo "link: $@" + $(VERBOSE) $(CXX) -o "$@" $^ \ + $(L2E_FLAGS) $(L2E_LIBS) $(LDFLAGS) + +l2e-all: $(L2E_EXES) + +l2e-clean: + $(VERBOSE) -$(RM) $(L2E_DEPS) + $(VERBOSE) -$(RM) $(L2E_OBJS) + $(VERBOSE) -$(RM) $(L2E_EXES) + $(VERBOSE) -$(RMDIR) $(L2E_DIRS) + +all: l2e-all +clean: l2e-clean + +.PHONY: l2e-all l2e-clean + +-include $(BUILD)l2e-local.mk diff --git a/build/release/Makefile b/build/release/Makefile new file mode 100644 index 0000000..0d8faf9 --- /dev/null +++ b/build/release/Makefile @@ -0,0 +1,8 @@ +include ../targets.mk +include ../config.mk +include ../l2e.mk + +CPPFLAGS += -DNDEBUG +CXXFlags += -O3 + +-include local.mk diff --git a/build/targets.mk b/build/targets.mk new file mode 100644 index 0000000..2cdfb7c --- /dev/null +++ b/build/targets.mk @@ -0,0 +1,6 @@ +all: + +clean: + @echo "clean" + +.PHONY: all clean diff --git a/readme b/readme index 4bd0f98..cfef816 100644 --- a/readme +++ b/readme @@ -3,11 +3,37 @@ About Its long-term goal is feature-completeness with Lufia 2. Quickstart - cd Release; make all; cd ..; ./Release/l2e test-data/*.l2s + cd build/release; make all; ./2e ../../test-data/*.l2s Building To build the binary, simply enter the desired build configuration directory - (currently `Release' or `Debug') and execute `make all`. + in `build' (currently `release' or `debug') and execute `make all`. + + The supplied `config.mk' includes `local-config.mk' should it exist. + This can be used to adjust the build configuration to your environment + without messing with files tracked by git. + + All built files can be removed via the `clean' make target. + + There are a number of silent includes in the makefiles should you need to + override any settings. + * Global build settings can be adjusted in `/build/local-config.mk'. + * Settings specific to building the l2e binary should go into + `/build/l2e-local.mk'. + * Build confiuration specific settings should go into + `/build/$config/local.mk', e.g. `/build/debug/local.mk'. + +Dependencies + Runtime + * SDL + * SDL_image + Building with make and supplied configuration + * g++ + * find + * make + * pkg-config + * and a number of core utilities such as rm, mkdir, and an sh-compatible + shell. Launching The current version required huge amounts of symbols to be defined and does -- 2.39.2