File: Makefile.release

package info (click to toggle)
bustools 0.45.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,256 kB
  • sloc: ansic: 14,318; cpp: 11,190; sh: 42; makefile: 14
file content (42 lines) | stat: -rw-r--r-- 1,094 bytes parent folder | download | duplicates (2)
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