-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (40 loc) · 1.97 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
37
38
39
40
41
42
# THIS IS THE MAKEFILE FOR CROSS-COMPILING HTSLIB FOR MINGW32/MINGW-W64 UNDER
# TRAVIS CI ENVIRONMENT
# AUTHOR: Mengjuei Hsieh
SRC := $(shell pwd)
X64HOME := $(SRC)/x64
AR = x86_64-w64-mingw32-ar
CPP = x86_64-w64-mingw32-cpp
CXX = x86_64-w64-mingw32-g++ -m64
CC = x86_64-w64-mingw32-gcc -m64
FC = x86_64-w64-mingw32-gfortran -m64
F90 = x86_64-w64-mingw32-gfortran -m64
RANLIB = x86_64-w64-mingw32-ranlib
RC = x86_64-w64-mingw32-windres
export CPP CXX CC FC F90 RANLIB AR RC
debug:
@echo X64HOME = $(X64HOME)
@ls -l /usr/lib/gcc/x86_64-w64-mingw32/4.6/
clean: uninstall
uninstall:
rm -rf x64
x64:
@cd $(SRC)/zlib-1.2.8 && \
test -e Makefile && $(MAKE) distclean || true && \
./configure \
--static \
--prefix=$(X64HOME) >> $(SRC)/config.log 2>&1 && \
$(MAKE) install && \
cd - && \
PATH=$(SRC)/bin:${PATH} \
$(MAKE) -C $(SRC)/htslib install \
prefix=$(X64HOME) \
AR="$(AR)" \
CC="$(CC)" \
RANLIB="$(RANLIB)" \
ZLIB_ROOT=$(X64HOME) \
CFLAGS="-Wall -O2" \
LDFLAGS="-L$(X64HOME)/lib" \
PLATFORM="MINGW" && \
tree $(X64HOME) && \
file $(X64HOME)/bin/*