From 794e660b030bae9857b242d1112f29d6b145cf76 Mon Sep 17 00:00:00 2001 From: Tim Warren Date: Tue, 31 Mar 2015 16:43:42 -0400 Subject: [PATCH] Remove Mac CodeBlocks project in favor of Makefile, some file rearranging --- .gitignore | 4 ++- Makefile | 42 ++++++++++++++++++++++++++ Tyro.cbp | 8 ++--- TyroMac.cbp | 52 -------------------------------- platform/msw/.gitkeep | 0 platform/osx/Info.plist | 12 ++++++++ TyroApp.cpp => src/TyroApp.cpp | 0 TyroApp.h => src/TyroApp.h | 0 TyroMain.cpp => src/TyroMain.cpp | 0 TyroMain.h => src/TyroMain.h | 0 10 files changed, 61 insertions(+), 57 deletions(-) create mode 100644 Makefile delete mode 100644 TyroMac.cbp create mode 100644 platform/msw/.gitkeep create mode 100644 platform/osx/Info.plist rename TyroApp.cpp => src/TyroApp.cpp (100%) rename TyroApp.h => src/TyroApp.h (100%) rename TyroMain.cpp => src/TyroMain.cpp (100%) rename TyroMain.h => src/TyroMain.h (100%) diff --git a/.gitignore b/.gitignore index 8870888..9f4bbed 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ *.layout bin/* obj/* - +build/* +**/*.o +Tyro.app/* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..87eb92d --- /dev/null +++ b/Makefile @@ -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` diff --git a/Tyro.cbp b/Tyro.cbp index f9ed3be..f3c709e 100644 --- a/Tyro.cbp +++ b/Tyro.cbp @@ -33,10 +33,10 @@ - - - - + + + + diff --git a/TyroMac.cbp b/TyroMac.cbp deleted file mode 100644 index 53cf258..0000000 --- a/TyroMac.cbp +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - diff --git a/platform/msw/.gitkeep b/platform/msw/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/platform/osx/Info.plist b/platform/osx/Info.plist new file mode 100644 index 0000000..cb5c366 --- /dev/null +++ b/platform/osx/Info.plist @@ -0,0 +1,12 @@ + + + + + CFBundleExecutable + Tyro + CFBundleName + Tyro + CFBundleIconFile + + + diff --git a/TyroApp.cpp b/src/TyroApp.cpp similarity index 100% rename from TyroApp.cpp rename to src/TyroApp.cpp diff --git a/TyroApp.h b/src/TyroApp.h similarity index 100% rename from TyroApp.h rename to src/TyroApp.h diff --git a/TyroMain.cpp b/src/TyroMain.cpp similarity index 100% rename from TyroMain.cpp rename to src/TyroMain.cpp diff --git a/TyroMain.h b/src/TyroMain.h similarity index 100% rename from TyroMain.h rename to src/TyroMain.h