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