mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-02-07 21:29:57 +01:00
Enable Windows build with new unicode-enabled version under MinGW #1
This commit is contained in:
parent
f4f14cdc61
commit
7532faf755
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,6 +19,7 @@
|
||||
/src/parser.h
|
||||
/src/parser.c
|
||||
/doc/boxes.1
|
||||
/pcre2-*/
|
||||
|
||||
# Linux Packaging
|
||||
doc/*.tar.gz
|
||||
|
16
Makefile
16
Makefile
@ -20,6 +20,7 @@
|
||||
|
||||
# The following line (GLOBALCONF) is the only line you should need to edit!
|
||||
GLOBALCONF = /usr/share/boxes
|
||||
# TODO update git call
|
||||
GIT_STATUS = ($(shell git rev-parse --short HEAD)$(shell if [ $$(git status -s -uall | wc -l) -ge 1 ] ; then echo ", dirty" ; fi))
|
||||
BVERSION = 1.3.1-SNAPSHOT
|
||||
|
||||
@ -27,6 +28,9 @@ ALL_FILES = LICENSE README.md README.Win32.md boxes-config
|
||||
DOC_FILES = doc/boxes.1 doc/boxes.el
|
||||
PKG_NAME = boxes-$(BVERSION)
|
||||
|
||||
WIN_PCRE2_VERSION = 10.36
|
||||
WIN_PCRE2_DIR = pcre2-$(WIN_PCRE2_VERSION)
|
||||
|
||||
.PHONY: clean build win32 debug win32.debug infomsg replaceinfos test package win32.package package_common
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
@ -35,10 +39,18 @@ build debug: infomsg replaceinfos
|
||||
$(MAKE) -C src BOXES_PLATFORM=unix $@
|
||||
|
||||
win32: infomsg replaceinfos
|
||||
$(MAKE) -C src BOXES_PLATFORM=win32 build
|
||||
$(MAKE) -C src BOXES_PLATFORM=win32 C_INCLUDE_PATH=../$(WIN_PCRE2_DIR)/src LDFLAGS=-L../$(WIN_PCRE2_DIR)/.libs build
|
||||
|
||||
win32.debug: infomsg replaceinfos
|
||||
$(MAKE) -C src BOXES_PLATFORM=win32 debug
|
||||
$(MAKE) -C src BOXES_PLATFORM=win32 C_INCLUDE_PATH=../$(WIN_PCRE2_DIR)/src LDFLAGS=-L../$(WIN_PCRE2_DIR)/.libs debug
|
||||
|
||||
win32.pcre:
|
||||
# build the pcre2 dependency (only needed on Windows MinGW)
|
||||
curl -LO https://ftp.pcre.org/pub/pcre/$(WIN_PCRE2_DIR).tar.gz
|
||||
tar xfz $(WIN_PCRE2_DIR).tar.gz
|
||||
cd $(WIN_PCRE2_DIR)
|
||||
./configure --disable-pcre2-8 --disable-pcre2-16 --enable-pcre2-32 --disable-shared --enable-never-backslash-C --enable-newline-is-anycrlf
|
||||
$(MAKE)
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
@ -50,7 +50,7 @@ boxes: $(ALL_OBJ)
|
||||
if [ "$(STRIP)" = "true" ] ; then strip $(BOXES_EXECUTABLE_NAME) ; fi
|
||||
|
||||
boxes.exe: $(ALL_OBJ)
|
||||
$(CC) $(LDFLAGS) $(ALL_OBJ) -o $(BOXES_EXECUTABLE_NAME) -lkernel32
|
||||
$(CC) $(LDFLAGS) $(ALL_OBJ) -o $(BOXES_EXECUTABLE_NAME) -lkernel32 -l:libunistring.a -l:libpcre2-32.a -l:libiconv.a
|
||||
if [ "$(STRIP)" = "true" ] ; then strip $(BOXES_EXECUTABLE_NAME) ; fi
|
||||
|
||||
|
||||
|
@ -106,7 +106,7 @@ static void usage(FILE *st)
|
||||
fprintf(st, " -k bool leading/trailing blank line retention on removal\n");
|
||||
fprintf(st, " -l list available box designs w/ samples\n");
|
||||
fprintf(st, " -m mend box, i.e. remove it and redraw it afterwards\n");
|
||||
fprintf(st, " -n enc Character encoding of input and output\n");
|
||||
fprintf(st, " -n enc Character encoding of input and output [default: %s]\n", locale_charset());
|
||||
fprintf(st, " -p fmt padding [default: none]\n");
|
||||
/* fprintf(st, " -q modify command for needs of the web UI (undocumented)\n"); */
|
||||
fprintf(st, " -r remove box\n");
|
||||
|
Loading…
Reference in New Issue
Block a user