* Modularize build system

This commit is contained in:
Phillip Stephens 2015-01-24 19:40:35 -08:00
parent d400e7fdc1
commit e6d53f33a9
6 changed files with 175 additions and 260 deletions

View File

@ -1,122 +1,4 @@
INCLUDEPATH += $$PWD/include
unix:LIBS += -lz
win32:LIBS += -lzlib
QMAKE_CXXFLAGS += -std=c++11
SOURCES += \
$$PWD/src/Athena/Utility.cpp \
$$PWD/src/Athena/FileReader.cpp \
$$PWD/src/Athena/FileWriter.cpp \
$$PWD/src/Athena/BinaryReader.cpp \
$$PWD/src/Athena/BinaryWriter.cpp \
$$PWD/src/Athena/Global.cpp \
$$PWD/src/Athena/ALTTPFile.cpp \
$$PWD/src/Athena/ALTTPFileReader.cpp \
$$PWD/src/Athena/ALTTPFileWriter.cpp \
$$PWD/src/Athena/ALTTPQuest.cpp \
$$PWD/src/Athena/Checksums.cpp \
$$PWD/src/Athena/Compression.cpp \
$$PWD/src/Athena/MCFile.cpp \
$$PWD/src/Athena/MCFileReader.cpp \
$$PWD/src/Athena/MCFileWriter.cpp \
$$PWD/src/Athena/SkywardSwordFile.cpp \
$$PWD/src/Athena/SkywardSwordFileReader.cpp \
$$PWD/src/Athena/SkywardSwordFileWriter.cpp \
$$PWD/src/Athena/SkywardSwordQuest.cpp \
$$PWD/src/Athena/Sprite.cpp \
$$PWD/src/Athena/SpriteFile.cpp \
$$PWD/src/Athena/SpriteFileReader.cpp \
$$PWD/src/Athena/SpriteFileWriter.cpp \
$$PWD/src/Athena/SpriteFrame.cpp \
$$PWD/src/Athena/SpritePart.cpp \
$$PWD/src/Athena/WiiBanner.cpp \
$$PWD/src/Athena/WiiFile.cpp \
$$PWD/src/Athena/WiiImage.cpp \
$$PWD/src/Athena/WiiSave.cpp \
$$PWD/src/Athena/WiiSaveReader.cpp \
$$PWD/src/Athena/WiiSaveWriter.cpp \
$$PWD/src/Athena/ZQuestFile.cpp \
$$PWD/src/Athena/ZQuestFileReader.cpp \
$$PWD/src/Athena/ZQuestFileWriter.cpp \
$$PWD/src/bn.cpp \
$$PWD/src/ec.cpp \
$$PWD/src/md5.cpp \
$$PWD/src/sha1.cpp \
$$PWD/src/aes.c \
$$PWD/src/lzo.c \
$$PWD/src/Athena/PHYSFSFileReader.cpp \
$$PWD/src/LZ77/LZLookupTable.cpp \
$$PWD/src/LZ77/LZType10.cpp \
$$PWD/src/LZ77/LZType11.cpp \
$$PWD/src/LZ77/LZBase.cpp \
$$PWD/src/Athena/MCSlot.cpp
win32:SOURCES += $$PWD/src/win32_largefilewrapper.c
HEADERS += \
$$PWD/include/Athena/Stream.hpp \
$$PWD/include/Athena/Types.hpp \
$$PWD/include/Athena/Utility.hpp \
$$PWD/include/Athena/Global.hpp \
$$PWD/include/Athena/Exception.hpp \
$$PWD/include/Athena/FileNotFoundException.hpp \
$$PWD/include/Athena/IOException.hpp \
$$PWD/include/Athena/InvalidDataException.hpp \
$$PWD/include/Athena/InvalidOperationException.hpp \
$$PWD/include/Athena/FileReader.hpp \
$$PWD/include/Athena/FileWriter.hpp \
$$PWD/include/utf8.h \
$$PWD/include/utf8/checked.h \
$$PWD/include/utf8/core.h \
$$PWD/include/utf8/unchecked.h \
$$PWD/include/Athena/BinaryReader.hpp \
$$PWD/include/Athena/BinaryWriter.hpp \
$$PWD/include/Athena/NotImplementedException.hpp \
$$PWD/include/aes.h \
$$PWD/include/bn.h \
$$PWD/include/ec.h \
$$PWD/include/lzo.h \
$$PWD/include/md5.h \
$$PWD/include/sha1.h \
$$PWD/include/Athena/ALTTPEnums.hpp \
$$PWD/include/Athena/ALTTPFile.hpp \
$$PWD/include/Athena/ALTTPFileReader.hpp \
$$PWD/include/Athena/ALTTPFileWriter.hpp \
$$PWD/include/Athena/ALTTPQuest.hpp \
$$PWD/include/Athena/ALTTPStructs.hpp \
$$PWD/include/Athena/Checksums.hpp \
$$PWD/include/Athena/Compression.hpp \
$$PWD/include/Athena/MCFile.hpp \
$$PWD/include/Athena/MCFileReader.hpp \
$$PWD/include/Athena/MCFileWriter.hpp \
$$PWD/include/Athena/SkywardSwordFile.hpp \
$$PWD/include/Athena/SkywardSwordFileReader.hpp \
$$PWD/include/Athena/SkywardSwordFileWriter.hpp \
$$PWD/include/Athena/SkywardSwordQuest.hpp \
$$PWD/include/Athena/Sprite.hpp \
$$PWD/include/Athena/SpriteFile.hpp \
$$PWD/include/Athena/SpriteFileReader.hpp \
$$PWD/include/Athena/SpriteFileWriter.hpp \
$$PWD/include/Athena/SpriteFrame.hpp \
$$PWD/include/Athena/SpritePart.hpp \
$$PWD/include/Athena/WiiBanner.hpp \
$$PWD/include/Athena/WiiFile.hpp \
$$PWD/include/Athena/WiiImage.hpp \
$$PWD/include/Athena/WiiSave.hpp \
$$PWD/include/Athena/WiiSaveReader.hpp \
$$PWD/include/Athena/WiiSaveWriter.hpp \
$$PWD/include/Athena/ZQuestFile.hpp \
$$PWD/include/Athena/ZQuestFileReader.hpp \
$$PWD/include/Athena/ZQuestFileWriter.hpp \
$$PWD/include/Athena/PHYSFSFileReader.hpp \
$$PWD/include/LZ77/LZBase.hpp \
$$PWD/include/LZ77/LZLookupTable.hpp \
$$PWD/include/LZ77/LZType10.hpp \
$$PWD/include/LZ77/LZType11.hpp \
$$PWD/src/Athena/MCSlot.hpp
win32:HEADERS += \
$$PWD/include/win32_largefilewrapper.h
OTHER_FILES += \
.travis.yml
include(AthenaCore.pri)
include(AthenaZelda.pri)
include(AthenaWiiSave.pri)
include(AthenaSakura.pri)

View File

@ -1,7 +1,6 @@
CONFIG += staticlib c++11
TEMPLATE= lib
DESTDIR = ./lib
unix:QMAKE_CXXFLAGS += -std=c++11
# Uncomment this if you wish to use Qt with libAthena
#DEFINES += ATHENA_USE_QT
@ -12,7 +11,7 @@ contains(DEFINES, ATHENA_USE_QT){
QT =
}
CONFIG(debug, debug|release){
CONFIG(debug, debug|release): {
DEFINES += DEBUG
TARGET=Athena-d
# We don't want the objects,
@ -21,7 +20,7 @@ CONFIG(debug, debug|release){
OBJECTS_DIR = obj/debug
}
CONFIG(release, release|debug){
CONFIG(release, release|debug): {
DEFINES -= DEBUG
TARGET=Athena
# We don't want the objects,
@ -30,143 +29,9 @@ CONFIG(release, release|debug){
OBJECTS_DIR = obj/release
}
INCLUDEPATH += include
include(Athena.pri)
SOURCES += \
src/Athena/Utility.cpp \
src/Athena/FileReader.cpp \
src/Athena/FileWriter.cpp \
src/Athena/BinaryReader.cpp \
src/Athena/BinaryWriter.cpp \
src/Athena/Global.cpp \
src/Athena/ALTTPFile.cpp \
src/Athena/ALTTPFileReader.cpp \
src/Athena/ALTTPFileWriter.cpp \
src/Athena/ALTTPQuest.cpp \
src/Athena/Checksums.cpp \
src/Athena/Compression.cpp \
src/Athena/MCFile.cpp \
src/Athena/MCFileReader.cpp \
src/Athena/MCFileWriter.cpp \
src/Athena/SkywardSwordFile.cpp \
src/Athena/SkywardSwordFileReader.cpp \
src/Athena/SkywardSwordFileWriter.cpp \
src/Athena/SkywardSwordQuest.cpp \
src/Athena/Sprite.cpp \
src/Athena/SpriteFile.cpp \
src/Athena/SpriteFileReader.cpp \
src/Athena/SpriteFileWriter.cpp \
src/Athena/SpriteFrame.cpp \
src/Athena/SpritePart.cpp \
src/Athena/WiiBanner.cpp \
src/Athena/WiiFile.cpp \
src/Athena/WiiImage.cpp \
src/Athena/WiiSave.cpp \
src/Athena/WiiSaveReader.cpp \
src/Athena/WiiSaveWriter.cpp \
src/Athena/ZQuestFile.cpp \
src/Athena/ZQuestFileReader.cpp \
src/Athena/ZQuestFileWriter.cpp \
src/Athena/PHYSFSFileReader.cpp \
src/LZ77/LZBase.cpp \
src/LZ77/LZLookupTable.cpp \
src/LZ77/LZType10.cpp \
src/LZ77/LZType11.cpp \
src/bn.cpp \
src/ec.cpp \
src/md5.cpp \
src/sha1.cpp \
src/aes.c \
src/lzo.c
win32:SOURCES += src/win32_largefilewrapper.c
INCLUDEPATH += \
include
HEADERS += \
include/Athena/Global.hpp \
include/Athena/Stream.hpp \
include/Athena/Types.hpp \
include/Athena/Utility.hpp \
include/Athena/Exception.hpp \
include/Athena/FileNotFoundException.hpp \
include/Athena/IOException.hpp \
include/Athena/InvalidDataException.hpp \
include/Athena/InvalidOperationException.hpp \
include/Athena/FileReader.hpp \
include/Athena/FileWriter.hpp \
include/Athena/BinaryReader.hpp \
include/Athena/BinaryWriter.hpp \
include/Athena/NotImplementedException.hpp \
include/Athena/ALTTPEnums.hpp \
include/Athena/ALTTPFile.hpp \
include/Athena/ALTTPFileReader.hpp \
include/Athena/ALTTPFileWriter.hpp \
include/Athena/ALTTPQuest.hpp \
include/Athena/ALTTPStructs.hpp \
include/Athena/Checksums.hpp \
include/Athena/Compression.hpp \
include/Athena/MCFile.hpp \
include/Athena/MCFileReader.hpp \
include/Athena/MCFileWriter.hpp \
include/Athena/SkywardSwordFile.hpp \
include/Athena/SkywardSwordFileReader.hpp \
include/Athena/SkywardSwordFileWriter.hpp \
include/Athena/SkywardSwordQuest.hpp \
include/Athena/Sprite.hpp \
include/Athena/SpriteFile.hpp \
include/Athena/SpriteFileReader.hpp \
include/Athena/SpriteFileWriter.hpp \
include/Athena/SpriteFrame.hpp \
include/Athena/SpritePart.hpp \
include/Athena/WiiBanner.hpp \
include/Athena/WiiFile.hpp \
include/Athena/WiiImage.hpp \
include/Athena/WiiSave.hpp \
include/Athena/WiiSaveReader.hpp \
include/Athena/WiiSaveWriter.hpp \
include/Athena/ZQuestFile.hpp \
include/Athena/ZQuestFileReader.hpp \
include/Athena/ZQuestFileWriter.hpp \
include/Athena/PHYSFSFileReader.hpp \
include/LZ77/LZBase.hpp \
include/LZ77/LZLookupTable.hpp \
include/LZ77/LZType10.hpp \
include/LZ77/LZType11.hpp \
include/utf8.h \
include/utf8/checked.h \
include/utf8/core.h \
include/utf8/unchecked.h \
include/aes.h \
include/bn.h \
include/ec.h \
include/lzo.h \
include/md5.h \
include/sha1.h
win32:HEADERS += include/win32_largefilewrapper.h
OTHER_FILES += \
.travis.yml
unix {
isEmpty(PREFIX) {
PREFIX = /usr/local
}
libFiles.path = $$PREFIX/lib
libFiles.files = $$PWD/lib/*
headerFiles.files = $$PWD/include/*
headerFiles.path = $$PREFIX/include/Athena
INSTALLS += libFiles headerFiles
}
win32 {
isEmpty(PREFIX) {
PREFIX = $$PWD/pkg
}
libFiles.path = $$PREFIX/lib
libFiles.files = $$PWD/lib/*
headerFiles.path = $$PREFIX/include/Athena
headerFiles.files = $$PWD/include/*
INSTALLS += libFiles headerFiles
}

51
AthenaCore.pri Normal file
View File

@ -0,0 +1,51 @@
!contains($$INCLUDEPATH, $$PWD/include): {
INCLUDEPATH += $$PWD/include
unix:LIBS += -lz
win32:LIBS += -lzlib
QMAKE_CXXFLAGS += -std=c++11
}
SOURCES += \
$$PWD/src/Athena/Utility.cpp \
$$PWD/src/Athena/FileReader.cpp \
$$PWD/src/Athena/FileWriter.cpp \
$$PWD/src/Athena/BinaryReader.cpp \
$$PWD/src/Athena/BinaryWriter.cpp \
$$PWD/src/Athena/Global.cpp \
$$PWD/src/Athena/Checksums.cpp \
$$PWD/src/Athena/Compression.cpp \
$$PWD/src/LZ77/LZLookupTable.cpp \
$$PWD/src/LZ77/LZType10.cpp \
$$PWD/src/LZ77/LZType11.cpp \
$$PWD/src/LZ77/LZBase.cpp
win32:SOURCES += $$PWD/src/win32_largefilewrapper.c
HEADERS += \
$$PWD/include/Athena/Stream.hpp \
$$PWD/include/Athena/Types.hpp \
$$PWD/include/Athena/Utility.hpp \
$$PWD/include/Athena/Global.hpp \
$$PWD/include/Athena/Exception.hpp \
$$PWD/include/Athena/FileNotFoundException.hpp \
$$PWD/include/Athena/IOException.hpp \
$$PWD/include/Athena/InvalidDataException.hpp \
$$PWD/include/Athena/InvalidOperationException.hpp \
$$PWD/include/Athena/FileReader.hpp \
$$PWD/include/Athena/FileWriter.hpp \
$$PWD/include/Athena/BinaryReader.hpp \
$$PWD/include/Athena/BinaryWriter.hpp \
$$PWD/include/Athena/NotImplementedException.hpp \
$$PWD/include/Athena/Checksums.hpp \
$$PWD/include/Athena/Compression.hpp \
$$PWD/include/LZ77/LZBase.hpp \
$$PWD/include/LZ77/LZLookupTable.hpp \
$$PWD/include/LZ77/LZType10.hpp \
$$PWD/include/LZ77/LZType11.hpp \
$$PWD/include/utf8.h \
$$PWD/include/utf8/checked.h \
$$PWD/include/utf8/core.h \
$$PWD/include/utf8/unchecked.h
win32:HEADERS += \
$$PWD/include/win32_largefilewrapper.h

19
AthenaSakura.pri Normal file
View File

@ -0,0 +1,19 @@
!contains($$INCLUDEPATH, $$PWD/include): {
include(AthenaCore.pri)
}
SOURCES += \
$$PWD/src/Athena/Sprite.cpp \
$$PWD/src/Athena/SpriteFile.cpp \
$$PWD/src/Athena/SpriteFileReader.cpp \
$$PWD/src/Athena/SpriteFileWriter.cpp \
$$PWD/src/Athena/SpriteFrame.cpp \
$$PWD/src/Athena/SpritePart.cpp
HEADERS += \
$$PWD/include/Athena/Sprite.hpp \
$$PWD/include/Athena/SpriteFile.hpp \
$$PWD/include/Athena/SpriteFileReader.hpp \
$$PWD/include/Athena/SpriteFileWriter.hpp \
$$PWD/include/Athena/SpriteFrame.hpp \
$$PWD/include/Athena/SpritePart.hpp

54
AthenaWiiSave.pri Normal file
View File

@ -0,0 +1,54 @@
!contains($$INCLUDEPATH, $$PWD/include): {
include(AthenaCore.pri)
}
SOURCES += \
$$PWD/src/Athena/WiiBanner.cpp \
$$PWD/src/Athena/WiiFile.cpp \
$$PWD/src/Athena/WiiImage.cpp \
$$PWD/src/Athena/WiiSave.cpp \
$$PWD/src/Athena/WiiSaveReader.cpp \
$$PWD/src/Athena/WiiSaveWriter.cpp \
$$PWD/src/Athena/ZQuestFile.cpp \
$$PWD/src/Athena/ZQuestFileReader.cpp \
$$PWD/src/Athena/ZQuestFileWriter.cpp \
$$PWD/src/bn.cpp \
$$PWD/src/ec.cpp \
$$PWD/src/md5.cpp \
$$PWD/src/sha1.cpp \
$$PWD/src/aes.c
HEADERS += \
$$PWD/include/Athena/ALTTPEnums.hpp \
$$PWD/include/Athena/ALTTPFile.hpp \
$$PWD/include/Athena/ALTTPFileReader.hpp \
$$PWD/include/Athena/ALTTPFileWriter.hpp \
$$PWD/include/Athena/ALTTPQuest.hpp \
$$PWD/include/Athena/ALTTPStructs.hpp \
$$PWD/include/Athena/Checksums.hpp \
$$PWD/include/Athena/Compression.hpp \
$$PWD/include/Athena/MCFile.hpp \
$$PWD/include/Athena/MCFileReader.hpp \
$$PWD/include/Athena/MCFileWriter.hpp \
$$PWD/include/Athena/SkywardSwordFile.hpp \
$$PWD/include/Athena/SkywardSwordFileReader.hpp \
$$PWD/include/Athena/SkywardSwordFileWriter.hpp \
$$PWD/include/Athena/SkywardSwordQuest.hpp \
$$PWD/include/Athena/Sprite.hpp \
$$PWD/include/Athena/SpriteFile.hpp \
$$PWD/include/Athena/SpriteFileReader.hpp \
$$PWD/include/Athena/SpriteFileWriter.hpp \
$$PWD/include/Athena/SpriteFrame.hpp \
$$PWD/include/Athena/SpritePart.hpp \
$$PWD/include/Athena/WiiBanner.hpp \
$$PWD/include/Athena/WiiFile.hpp \
$$PWD/include/Athena/WiiImage.hpp \
$$PWD/include/Athena/WiiSave.hpp \
$$PWD/include/Athena/WiiSaveReader.hpp \
$$PWD/include/Athena/WiiSaveWriter.hpp \
$$PWD/include/aes.h \
$$PWD/include/bn.h \
$$PWD/include/ec.h \
$$PWD/include/lzo.h \
$$PWD/include/md5.h \
$$PWD/include/sha1.h

44
AthenaZelda.pri Normal file
View File

@ -0,0 +1,44 @@
!contains($$INCLUDEPATH, $$PWD/include): {
include(AthenaCore.pri)
}
SOURCES += \
$$PWD/src/Athena/ALTTPFile.cpp \
$$PWD/src/Athena/ALTTPFileReader.cpp \
$$PWD/src/Athena/ALTTPFileWriter.cpp \
$$PWD/src/Athena/ALTTPQuest.cpp \
$$PWD/src/Athena/MCFile.cpp \
$$PWD/src/Athena/MCFileReader.cpp \
$$PWD/src/Athena/MCFileWriter.cpp \
$$PWD/src/Athena/MCSlot.cpp \
$$PWD/src/Athena/SkywardSwordFile.cpp \
$$PWD/src/Athena/SkywardSwordFileReader.cpp \
$$PWD/src/Athena/SkywardSwordFileWriter.cpp \
$$PWD/src/Athena/SkywardSwordQuest.cpp \
$$PWD/src/Athena/ZQuestFile.cpp \
$$PWD/src/Athena/ZQuestFileReader.cpp \
$$PWD/src/Athena/ZQuestFileWriter.cpp
HEADERS += \
$$PWD/include/Athena/ALTTPEnums.hpp \
$$PWD/include/Athena/ALTTPFile.hpp \
$$PWD/include/Athena/ALTTPFileReader.hpp \
$$PWD/include/Athena/ALTTPFileWriter.hpp \
$$PWD/include/Athena/ALTTPQuest.hpp \
$$PWD/include/Athena/ALTTPStructs.hpp \
$$PWD/include/Athena/MCFile.hpp \
$$PWD/include/Athena/MCFileReader.hpp \
$$PWD/include/Athena/MCFileWriter.hpp \
$$PWD/include/Athena/SkywardSwordFile.hpp \
$$PWD/include/Athena/SkywardSwordFileReader.hpp \
$$PWD/include/Athena/SkywardSwordFileWriter.hpp \
$$PWD/include/Athena/SkywardSwordQuest.hpp \
$$PWD/include/Athena/Sprite.hpp \
$$PWD/include/Athena/SpriteFile.hpp \
$$PWD/include/Athena/SpriteFileReader.hpp \
$$PWD/include/Athena/SpriteFileWriter.hpp \
$$PWD/include/Athena/SpriteFrame.hpp \
$$PWD/include/Athena/SpritePart.hpp \
$$PWD/include/Athena/ZQuestFile.hpp \
$$PWD/include/Athena/ZQuestFileReader.hpp \
$$PWD/include/Athena/ZQuestFileWriter.hpp