-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile.release
42 lines (35 loc) · 1.07 KB
/
Makefile.release
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
37
38
39
40
41
42
RELEASE_OS ?= local
RELEASE_VERSION ?= local
.PHONY : build install_zlib compile_release_linux compile_release_mac compile_release_windows clean
install_zlib:
mkdir -p ext/zlib \
&& cd ext/zlib \
&& wget https://www.zlib.net/fossils/zlib-1.2.11.tar.gz \
&& tar -xvf zlib-1.2.11.tar.gz --strip 1 \
&& ./configure --prefix=/usr/src/mxe/usr/x86_64-w64-mingw32.static --static \
&& make -j \
&& sudo make install
build:
mkdir -p build
cd build \
&& cmake .. -DLINK=static \
&& make -j
compile_release_linux compile_release_mac:
mkdir -p release/bustools
cp -rf build/src/bustools release/bustools/
cp -rf LICENSE release/bustools/
cp -rf README.md release/bustools/
cd release \
&& tar -czvf bustools_${RELEASE_OS}-${RELEASE_VERSION}.tar.gz bustools
compile_release_windows:
mkdir -p release/bustools
cp -rf build/src/bustools.exe release/bustools/
cp -rf LICENSE release/bustools/
cp -rf README.md release/bustools/
cd release \
&& zip -r -X bustools_${RELEASE_OS}-${RELEASE_VERSION}.zip bustools
clean:
rm -rf build
rm -rf cache
rm -rf CMakeFiles
rm -rf release