Remove Mac CodeBlocks project in favor of Makefile, some file rearranging

This commit is contained in:
Tim Warren 2015-03-31 16:43:42 -04:00
parent 4794e0b2dd
commit 794e660b03
10 changed files with 61 additions and 57 deletions

4
.gitignore vendored
View File

@ -3,4 +3,6 @@
*.layout *.layout
bin/* bin/*
obj/* obj/*
build/*
**/*.o
Tyro.app/*

42
Makefile Normal file
View File

@ -0,0 +1,42 @@
CXX = $(shell wx-config --cxx)
TARGET = build/Tyro
LDLIBS = $(shell wx-config --libs all)
WX_CXXFLAGS = -I./src -static $(shell wx-config --cxxflags)
DEV_CXXFLAGS = -g -Wall -Wextra $(WX_CXXFLAGS)
CXXFLAGS = -Os -s $(WX_CXXFLAGS)
SOURCES = $(wildcard src/**/*.cpp src/*.cpp)
OBJECTS = $(patsubst %.cpp,%.o, $(SOURCES))
all: build $(SOURCES) $(TARGET)
dev: CXXFLAGS= $(DEV_CXXFLAGS)
dev: all
build:
@mkdir -p build
$(TARGET): $(OBJECTS)
$(CXX) $(LDLIBS) $(OBJECTS) -o $@
run:
./build/Tyro
Tyro.app: all platform/osx/Info.plist
SetFile -t APPL $(TARGET)
-mkdir Tyro.app
-mkdir Tyro.app/Contents
-mkdir Tyro.app/Contents/MacOS
-mkdir Tyro.app/Contents/Resources
-mkdir Tyro.app/Contents/Resources/English.lproj
cp platform/osx/Info.plist Tyro.app/Contents/
echo -n 'APPL????' > Tyro.app/Contents/PkgInfo
cp build/Tyro Tyro.app/Contents/MacOS/Tyro
# cp YourAppMacIcons.icns AnotherResource.txt Tyro.app/Contents/Resources/
clean:
rm -f *.o
rm -rf Tyro.app
rm -rf build $(OBJECTS) $(PROGRAM)
find . -name "*.gc*" -exec rm {} \;
rm -rf `find . -name "*.dSYM" -print`

View File

@ -33,10 +33,10 @@
<Linker> <Linker>
<Add option="`wx-config --libs all`" /> <Add option="`wx-config --libs all`" />
</Linker> </Linker>
<Unit filename="TyroApp.cpp" /> <Unit filename="src/TyroApp.cpp" />
<Unit filename="TyroApp.h" /> <Unit filename="src/TyroApp.h" />
<Unit filename="TyroMain.cpp" /> <Unit filename="src/TyroMain.cpp" />
<Unit filename="TyroMain.h" /> <Unit filename="src/TyroMain.h" />
<Extensions> <Extensions>
<code_completion /> <code_completion />
<debugger /> <debugger />

View File

@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="Tyro" />
<Option pch_mode="2" />
<Option compiler="clang" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/Tyro" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-Wextra" />
<Add option="-g" />
<Add option="-mmacosx-version-min=10.5 -I/usr/local/lib/wx/include/osx_cocoa-unicode-static-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__" />
</Compiler>
<Linker>
<Add option="-mmacosx-version-min=10.5 -L/usr/local/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL /usr/local/lib/libwx_osx_cocoau_xrc-3.0.a /usr/local/lib/libwx_osx_cocoau_stc-3.0.a /usr/local/lib/libwx_osx_cocoau_richtext-3.0.a /usr/local/lib/libwx_osx_cocoau_ribbon-3.0.a /usr/local/lib/libwx_osx_cocoau_propgrid-3.0.a /usr/local/lib/libwx_osx_cocoau_aui-3.0.a /usr/local/lib/libwx_osx_cocoau_gl-3.0.a /usr/local/lib/libwx_osx_cocoau_qa-3.0.a /usr/local/lib/libwx_baseu_net-3.0.a /usr/local/lib/libwx_osx_cocoau_html-3.0.a /usr/local/lib/libwx_osx_cocoau_adv-3.0.a /usr/local/lib/libwx_osx_cocoau_core-3.0.a /usr/local/lib/libwx_baseu_xml-3.0.a /usr/local/lib/libwx_baseu-3.0.a -lwxscintilla-3.0 -framework OpenGL -framework AGL -lpng -ljpeg -ltiff -framework WebKit -lexpat -lwxregexu-3.0 -lz -lpthread -liconv" />
</Linker>
</Target>
<Target title="Release">
<Option output="bin/Release/Tyro" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="0" />
<Option compiler="gcc" />
<Option projectLinkerOptionsRelation="2" />
<Compiler>
<Add option="-Os" />
</Compiler>
</Target>
</Build>
<Compiler>
<Add option="`wx-config --cflags`" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
</Linker>
<Unit filename="TyroApp.cpp" />
<Unit filename="TyroApp.h" />
<Unit filename="TyroMain.cpp" />
<Unit filename="TyroMain.h" />
<Extensions>
<code_completion>
<search_path add="/usr/local/lib" />
</code_completion>
<debugger />
<envvars />
</Extensions>
</Project>
</CodeBlocks_project_file>

0
platform/msw/.gitkeep Normal file
View File

12
platform/osx/Info.plist Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>Tyro</string>
<key>CFBundleName</key>
<string>Tyro</string>
<key>CFBundleIconFile</key>
<string></string>
</dict>
</plist>