2015-04-02 14:20:35 -04:00
|
|
|
CXX = $(shell wx-config --cxx) -Wno-c++11-compat-deprecated-writable-strings
|
2015-03-31 16:43:42 -04:00
|
|
|
TARGET = build/Tyro
|
2015-04-06 15:42:05 -04:00
|
|
|
LDLIBS = $(shell wx-config --libs all) -lssh2
|
2015-04-02 18:00:50 -04:00
|
|
|
WX_CXXFLAGS = -I./src -I./include -static $(shell wx-config --cxxflags)
|
2015-03-31 16:43:42 -04:00
|
|
|
DEV_CXXFLAGS = -g -Wall -Wextra $(WX_CXXFLAGS)
|
|
|
|
CXXFLAGS = -Os -s $(WX_CXXFLAGS)
|
|
|
|
|
2015-04-02 18:00:50 -04:00
|
|
|
SOURCES = $(wildcard src/**/*.cpp src/*.cpp include/**/*.cpp include/*.cpp)
|
2015-03-31 16:43:42 -04:00
|
|
|
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
|
|
|
|
|
2015-04-07 10:59:08 -04:00
|
|
|
Tyro.app: all resources/platform/osx/Info.plist
|
2015-03-31 16:43:42 -04:00
|
|
|
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
|
2015-04-07 10:59:08 -04:00
|
|
|
cp resources/platform/osx/Info.plist Tyro.app/Contents/
|
2015-03-31 16:43:42 -04:00
|
|
|
echo -n 'APPL????' > Tyro.app/Contents/PkgInfo
|
|
|
|
cp build/Tyro Tyro.app/Contents/MacOS/Tyro
|
2015-04-07 10:59:08 -04:00
|
|
|
cp resources/platform/osx/tyro.icns Tyro.app/Contents/Resources/
|
2015-03-31 16:43:42 -04:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
|
|
|
rm -rf Tyro.app
|
|
|
|
rm -rf build $(OBJECTS) $(PROGRAM)
|
|
|
|
find . -name "*.gc*" -exec rm {} \;
|
|
|
|
rm -rf `find . -name "*.dSYM" -print`
|