Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support native builds on Windows with MinGW/UCRT #1104

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
makefile defines for mingw-w64
  • Loading branch information
theAeon committed Sep 4, 2024
commit c4eb14db9ce196fefbafbebab3470ae4dc6f6ede
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ endif
BT_LDFLAGS =
BT_LIBS = -lz -lm -lbz2 -llzma -lpthread

# Support building on MSYS2
UNAME := $(shell sh -c 'uname 2>/dev/null || echo Unknown')
ifeq (MINGW64_NT,$(findstring MINGW64_NT,$(UNAME)))
BT_CPPFLAGS += -D_GNU_SOURCE -D_DEFAULT_SOURCE
BT_LIBS += -lwsock32
endif

prefix ?= /usr/local

SUBDIRS = $(SRC_DIR)/annotateBed \
Expand Down
2 changes: 2 additions & 0 deletions src/utils/htslib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ config.h:
echo '#define HAVE_LZMA_H 1' >> $@
echo '#endif' >> $@
echo '#define HAVE_FSEEKO 1' >> $@
echo '#if (!defined(_WIN32) || !defined(__WIN32__))' >> $@
echo '#define HAVE_DRAND48 1' >> $@
echo '#endif' >> $@

# And similarly for htslib.pc.tmp ("pkg-config template"). No dependency
# on htslib.pc.in listed, as if that file is newer the usual way to regenerate
Expand Down