Get the makefile basically working in producing an executable of the game
- tinyprint.hpp was renamed to tinyprint.h to conform to the pattern of the makefile rules
This commit is contained in:
41
build.sh
41
build.sh
@@ -1,16 +1,35 @@
|
||||
#!/bin/sh
|
||||
# cboe build - paul_erdos 2015-06-14
|
||||
|
||||
SRC=`ls src/*.{cpp,mm} | grep -v '.win' &&
|
||||
ls src/classes/*.cpp | grep -v '.win' &&
|
||||
ls src/dialogxml/*.cpp | grep -v '.win' &&
|
||||
ls src/dialogxml/xml-parser/*.cpp | grep -v '.win' &&
|
||||
ls src/tools/*.{cpp,mm} | grep -v '.win' &&
|
||||
ls src/tools/gzstream/*.cpp | grep -v '.win'`
|
||||
SRC=`echo $SRC src/pcedit/pc.editors.cpp`
|
||||
COMMON_SRC=`
|
||||
ls src/classes/*.cpp | grep -v '\.win' |
|
||||
sed -E 's/es\/([^\/]*)\.cpp$/_\1.o/ ; s/src/obj/' &&
|
||||
ls src/dialogxml/*.cpp | grep -v '\.win' |
|
||||
sed -E 's/xml\/([^\/]*)\.cpp$/_\1.o/ ; s/src/obj/' &&
|
||||
ls src/dialogxml/xml-parser/*.cpp | grep -v '\.win' |
|
||||
sed 's/dialogxml\/xml-parser\/// ; s/\.cpp/.o/ ; s/src/obj/' &&
|
||||
ls src/tools/*.{cpp,mm} | grep -v '\.win' |
|
||||
sed -E 's/\/([^\/]*)\.(cpp|mm)$/_\1.o/ ; s/src/obj/'
|
||||
`
|
||||
BOE_SRC=`
|
||||
ls src/boe.*.{cpp,mm} | grep -v '.win' |
|
||||
sed -E 's/\.(cpp|mm)$/.o/ ; s/src/obj/'
|
||||
`
|
||||
ED_SRC=`
|
||||
ls src/scenedit/scen.*.{cpp,mm} | grep -v '\.win' |
|
||||
sed -E 's/scenedit\/// ; s/\.(cpp|mm)$/.o/ ; s/src/obj/'
|
||||
`
|
||||
PC_SRC=`
|
||||
ls src/pcedit/pc.*.{cpp,mm} | grep -v '\.win' |
|
||||
sed -E 's/pcedit\/// ; s/\.(cpp|mm)$/.o/ ; s/src/obj/'
|
||||
`
|
||||
COMMON_SRC=`echo $COMMON_SRC`
|
||||
BOE_SRC=`echo $BOE_SRC src/pcedit/pc.editors.cpp`
|
||||
ED_SRC=`echo $ED_SRC`
|
||||
PC_SRC=`echo $PC_SRC`
|
||||
|
||||
function usage {
|
||||
echo "usage: build [-chrw]"
|
||||
echo "usage: $0 [-chrw]"
|
||||
}
|
||||
|
||||
function help {
|
||||
@@ -23,11 +42,13 @@ function help {
|
||||
}
|
||||
|
||||
function clean {
|
||||
rm obj/
|
||||
rm -rf obj/ exe/
|
||||
}
|
||||
|
||||
function build {
|
||||
make game "SRC=$SRC"
|
||||
mkdir -p obj exe
|
||||
echo "$COMMON_SRC" > test.txt
|
||||
make game "COMMON_SRC=$COMMON_SRC" "BOE_SRC=$BOE_SRC"
|
||||
}
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
|
60
makefile
60
makefile
@@ -1,20 +1,62 @@
|
||||
# cboe makefile
|
||||
# oboe makefile
|
||||
|
||||
CC=g++
|
||||
CFLAGS=-ferror-limit=0 -Werror=format -ftemplate-backtrace-limit=0 -Werror=return-type -Werror=parentheses -Werror=dangling-else -isystem/usr/local/Cellar/boost/1.58.0/include -Wfloat-equal -Wno-long-long -std=c++11 -stdlib=libc++ -lc++
|
||||
LIBFLAGS = -lboost_filesystem -lboost_system -L/usr/local/Cellar/boost/1.58.0/lib -lobjc -lz -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio -framework Cocoa -framework CoreFoundation -framework OpenGL
|
||||
CC=clang++
|
||||
CFLAGS=-ferror-limit=0 -Werror=format -ftemplate-backtrace-limit=0 -Werror=return-type -Werror=parentheses -Werror=dangling-else -isystem/usr/local/Cellar/boost/1.58.0/include -Wfloat-equal -Wno-long-long -std=c++11 -stdlib=libc++
|
||||
LIBFLAGS = -lboost_filesystem -lboost_system -L/usr/local/Cellar/boost/1.58.0/lib -lobjc -lz -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio -lc++ -framework Cocoa -framework CoreFoundation -framework OpenGL
|
||||
CINCLUDES=-Isrc -Isrc/classes -Isrc/dialogxml -Isrc/dialogxml/xml-parser -Isrc/tools -Isrc/tools/gzstream -Isrc/tools/resmgr
|
||||
SRC=
|
||||
OBJ=$(SRC:.cpp=.o)
|
||||
#TGT=CBoE
|
||||
|
||||
LIB=/usr/local/lib
|
||||
|
||||
boost_lib=-lboost_filesystem -lboost_system -L$LIB
|
||||
boost_include=-I/usr/local/include/boost
|
||||
|
||||
game:
|
||||
$(CC) $(CFLAGS) $(CINCLUDES) $(SRC) -o obj $(LIBFLAGS)
|
||||
obj/gzstream.o: src/tools/gzstream/gzstream.cpp src/tools/gzstream/gzstream.h
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/oldstructs.o: src/oldstructs.cpp src/oldstructs.hpp
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/tools_%.o: src/tools/%.cpp
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/tools_%.o: src/tools/%.mm
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/class_%.o: src/classes/%.cpp
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/dialog_%.o: src/dialogxml/%.cpp
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/tinyxml%.o: src/dialogxml/xml-parser/tinyxml%.cpp
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS) -DTIXML_USE_TICPP
|
||||
|
||||
obj/ti%.o: src/dialogxml/xml-parser/ti%.cpp src/dialogxml/xml-parser/ti%.h
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS) -DTIXML_USE_TICPP
|
||||
|
||||
obj/boe.%.o: src/boe.%.cpp
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/boe.%.o: src/boe.%.mm
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/pc.%.o: src/pcedit/pc.%.cpp
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/pc.%.o: src/pcedit/pc.%.mm
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/scen.%.o: src/scenedit/scen.%.cpp
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/scen.%.o: src/scenedit/scen.%.mm
|
||||
$(CC) -c $(CINCLUDES) -o $@ $< $(CFLAGS)
|
||||
|
||||
obj/common.o: obj/gzstream.o obj/oldstructs.o $(COMMON_SRC)
|
||||
ld -r $^ -o obj/common.o
|
||||
|
||||
game: obj/common.o $(BOE_SRC)
|
||||
$(CC) $(CFLAGS) $(CINCLUDES) $^ -o exe/boe $(LIBFLAGS)
|
||||
|
||||
#main: $(SRCS)
|
||||
# $(CC) $(CFLAGS) -c $(SRC) -o objs $(OBJS) $(LIBFLAGS)
|
||||
|
@@ -47,7 +47,7 @@
|
||||
<ClInclude Include="..\..\dialogxml\xml-parser\ticpprc.h" />
|
||||
<ClInclude Include="..\..\dialogxml\xml-parser\tinystr.h" />
|
||||
<ClInclude Include="..\..\dialogxml\xml-parser\tinyxml.h" />
|
||||
<ClInclude Include="..\..\dialogxml\xml-parser\tinyprint.hpp" />
|
||||
<ClInclude Include="..\..\dialogxml\xml-parser\tinyprint.h" />
|
||||
<ClInclude Include="..\..\oldstructs.hpp" />
|
||||
<ClInclude Include="..\..\tools\cursors.hpp" />
|
||||
<ClInclude Include="..\..\tools\fileio.hpp" />
|
||||
|
@@ -112,7 +112,7 @@
|
||||
<ClInclude Include="..\..\dialogxml\xml-parser\tinyxml.h">
|
||||
<Filter>DialogXML\TinyXML</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\dialogxml\xml-parser\tinyprint.hpp">
|
||||
<ClInclude Include="..\..\dialogxml\xml-parser\tinyprint.h">
|
||||
<Filter>DialogXML\TinyXML</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\dialogxml\button.hpp">
|
||||
|
@@ -633,7 +633,7 @@
|
||||
917B573F100B956C0096C978 /* undo.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = undo.hpp; sourceTree = "<group>"; };
|
||||
918D59A718EA513900735B66 /* dialog.keys.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = dialog.keys.hpp; sourceTree = "<group>"; };
|
||||
919086DF1A65C8E30071F7A0 /* tinyprint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinyprint.cpp; sourceTree = "<group>"; };
|
||||
919086E11A65D3250071F7A0 /* tinyprint.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = tinyprint.hpp; sourceTree = "<group>"; };
|
||||
919086E11A65D3250071F7A0 /* tinyprint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tinyprint.h; sourceTree = "<group>"; };
|
||||
919145FB18E3A32F005CF3A4 /* boe.appleevents.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = boe.appleevents.mm; sourceTree = "<group>"; };
|
||||
919145FD18E3C750005CF3A4 /* scrollbar.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = scrollbar.hpp; sourceTree = "<group>"; };
|
||||
919145FE18E63B41005CF3A4 /* winutil.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = winutil.hpp; sourceTree = "<group>"; };
|
||||
@@ -878,7 +878,7 @@
|
||||
910BBA2F0FB8C470001E34EA /* ticpprc.h */,
|
||||
910BBA290FB8C459001E34EA /* tinystr.h */,
|
||||
910BBA2B0FB8C459001E34EA /* tinyxml.h */,
|
||||
919086E11A65D3250071F7A0 /* tinyprint.hpp */,
|
||||
919086E11A65D3250071F7A0 /* tinyprint.h */,
|
||||
919086DF1A65C8E30071F7A0 /* tinyprint.cpp */,
|
||||
);
|
||||
path = "xml-parser";
|
||||
|
@@ -6,7 +6,7 @@
|
||||
//
|
||||
//
|
||||
|
||||
#include "tinyprint.hpp"
|
||||
#include "tinyprint.h"
|
||||
#include <stdexcept>
|
||||
|
||||
using namespace ticpp;
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#include "dlogutil.hpp"
|
||||
#include "tarball.hpp"
|
||||
#include "gzstream.h"
|
||||
#include "tinyprint.hpp"
|
||||
#include "tinyprint.h"
|
||||
#include "map_parse.hpp"
|
||||
|
||||
#define DONE_BUTTON_ITEM 1
|
||||
|
Reference in New Issue
Block a user