2018-06-30 13:10:06 +00:00
|
|
|
cxx = clang++
|
2018-07-13 06:30:16 +00:00
|
|
|
cflags = -std=c++14 -g -Wall -I./include -I./include/neither -I/usr/local/include -I/usr/include -Wno-unused-variable -mmacosx-version-min=10.10
|
2018-06-30 13:10:06 +00:00
|
|
|
ldflags = -framework CoreFoundation -framework Foundation -framework Cocoa -g -rdynamic
|
|
|
|
|
|
|
|
|
|
|
|
pool link_pool
|
|
|
|
depth = 4
|
|
|
|
|
|
|
|
rule cxx
|
|
|
|
command = $cxx $cflags -c $in -o $out
|
|
|
|
description = CC $out
|
|
|
|
|
|
|
|
rule link
|
|
|
|
command = $cxx $ldflags -o $out $in
|
|
|
|
description = LINK $out
|
|
|
|
pool = link_pool
|
|
|
|
|
|
|
|
rule ar
|
|
|
|
command = ar crsT $out $in
|
|
|
|
description = AR $out
|
|
|
|
|
|
|
|
rule cleanup
|
|
|
|
command = rm -fr *.o clauncher I2PLauncher.app
|
|
|
|
|
2018-07-08 13:16:07 +00:00
|
|
|
# TODO: There must exists a cleaner way to solve this.
|
2018-06-30 13:10:06 +00:00
|
|
|
rule bundledir
|
2018-07-08 13:16:07 +00:00
|
|
|
command = mkdir -p I2PLauncher.app/Contents/{MacOS,Resources,Frameworks} $
|
|
|
|
&& cp Info.plist I2PLauncher.app/Contents/Info.plist $
|
2018-07-13 06:30:16 +00:00
|
|
|
&& cp base.zip I2PLauncher.app/Contents/Resources/base.zip $
|
|
|
|
&& cp ../target/scala-2.11/routerLauncher-assembly-0.1.0-SNAPSHOT.jar I2PLauncher.app/Contents/Resources/launcher.jar
|
2018-06-30 13:10:06 +00:00
|
|
|
|
|
|
|
rule copytobundledir
|
|
|
|
command = cp clauncher I2PLauncher.app/Contents/MacOS/I2PLauncher
|
|
|
|
|
|
|
|
rule copyimgtobundle
|
|
|
|
command = cp ItoopieTransparent.png I2PLauncher.app/Contents/Resources/ItoopieTransparent.png
|
|
|
|
|
2018-07-08 13:16:07 +00:00
|
|
|
rule builddir
|
|
|
|
command = mkdir -p build
|
|
|
|
|
2018-06-30 13:10:06 +00:00
|
|
|
build main.o: cxx main.mm
|
|
|
|
build StatusItemButton.o: cxx StatusItemButton.mm
|
2018-07-13 06:30:16 +00:00
|
|
|
build RouterTask.o: cxx RouterTask.mm
|
2018-06-30 13:10:06 +00:00
|
|
|
|
|
|
|
build clean: cleanup
|
|
|
|
|
|
|
|
build bundle: bundledir
|
|
|
|
build copytobundle: copytobundledir | bundle clauncher
|
|
|
|
|
2018-07-13 06:30:16 +00:00
|
|
|
build clauncher: link main.o StatusItemButton.o RouterTask.o
|
2018-06-30 13:10:06 +00:00
|
|
|
|
|
|
|
build appbundle: copyimgtobundle | clauncher bundle copytobundle
|
2018-07-08 13:16:07 +00:00
|
|
|
|
|
|
|
default appbundle
|