-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
36 lines (28 loc) · 1.07 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
CC = g++
CFLAGS=-v -O3
SRC = therionsurface2survex
VERSION:=$(shell grep -o 'VERSION.\+"[0-9.]\+"' therionsurface2survex.cxx | cut -f 4 -d' ' | sed 's/"//g')
all: linux win64
linux:
$(CC) -o therionsurface2survex therionsurface2survex.cxx $(CFLAGS)
# Windows 64bit build
# apt-get install mingw-w64
win64:
x86_64-w64-mingw32-g++ -o therionsurface2survex.exe therionsurface2survex.cxx -static-libgcc -static-libstdc++ $(CFLAGS)
test: linux
therionsurface2survex -h
therionsurface2survex example/surface.th -t
ls -alh example/surface.th.th
clean:
rm -f example/surface.th.th
release: clean all
@echo building release: ${VERSION}
mkdir therionsurface2survex-${VERSION}
cp -r example/ LICENSE README.md therionsurface2survex-${VERSION}/
cp therionsurface2survex therionsurface2survex.exe therionsurface2survex-${VERSION}/
tar -czf therionsurface2survex-${VERSION}.tar.gz therionsurface2survex-${VERSION}/
rm -rf therionsurface2survex-${VERSION}/
ls -alh therionsurface2survex-${VERSION}.tar.gz
tar -tzf therionsurface2survex-${VERSION}.tar.gz
showVer:
@echo "VERSION:$(VERSION)"