113 lines
4.1 KiB
Diff
113 lines
4.1 KiB
Diff
diff -ur a/Makefile b/Makefile
|
|
--- a/Makefile 2017-05-17 14:47:20.000000000 +0800
|
|
+++ b/Makefile 2024-01-29 00:01:31.025546400 +0800
|
|
@@ -108,7 +108,6 @@
|
|
.PHONY : install-bin
|
|
install-bin : all
|
|
mkdir -p $(PREFIX)/bin
|
|
- install -m 755 -p -s build/$(UNIX_ADAPTER_EXE) $(PREFIX)/bin
|
|
install -m 755 -p -s build/winpty.dll $(PREFIX)/bin
|
|
install -m 755 -p -s build/winpty-agent.exe $(PREFIX)/bin
|
|
|
|
@@ -120,20 +119,19 @@
|
|
.PHONY : install-lib
|
|
install-lib : all
|
|
mkdir -p $(PREFIX)/lib
|
|
- install -m 644 -p build/winpty.lib $(PREFIX)/lib
|
|
+ install -m 644 -p build/libwinpty.dll.a $(PREFIX)/lib
|
|
|
|
.PHONY : install-doc
|
|
install-doc :
|
|
mkdir -p $(PREFIX)/share/doc/winpty
|
|
- install -m 644 -p LICENSE $(PREFIX)/share/doc/winpty
|
|
install -m 644 -p README.md $(PREFIX)/share/doc/winpty
|
|
install -m 644 -p RELEASES.md $(PREFIX)/share/doc/winpty
|
|
|
|
.PHONY : install-include
|
|
install-include :
|
|
- mkdir -p $(PREFIX)/include/winpty
|
|
- install -m 644 -p src/include/winpty.h $(PREFIX)/include/winpty
|
|
- install -m 644 -p src/include/winpty_constants.h $(PREFIX)/include/winpty
|
|
+ mkdir -p $(PREFIX)/include
|
|
+ install -m 644 -p src/include/winpty.h $(PREFIX)/include
|
|
+ install -m 644 -p src/include/winpty_constants.h $(PREFIX)/include
|
|
|
|
.PHONY : install
|
|
install : \
|
|
diff -ur a/configure b/configure
|
|
--- a/configure 2017-05-17 14:47:20.000000000 +0800
|
|
+++ b/configure 2024-01-29 00:02:51.416176700 +0800
|
|
@@ -47,6 +47,7 @@
|
|
IS_CYGWIN=0
|
|
IS_MSYS1=0
|
|
IS_MSYS2=0
|
|
+IS_MINGW=0
|
|
|
|
# Link parts of the Cygwin binary statically to aid in redistribution? The
|
|
# binary still links dynamically against the main DLL. The MinGW binaries are
|
|
@@ -77,7 +78,7 @@
|
|
;;
|
|
esac
|
|
;;
|
|
- MSYS*|MINGW*)
|
|
+ MSYS*)
|
|
# MSYS2 notes:
|
|
# - MSYS2 offers two shortcuts to open an environment:
|
|
# - MinGW-w64 Win32 Shell. This env reports a `uname -s` of
|
|
@@ -128,6 +129,18 @@
|
|
;;
|
|
esac
|
|
;;
|
|
+ MINGW64*)
|
|
+ echo 'uname -s identifies an x86_64 MINGW environment.'
|
|
+ IS_MINGW=1
|
|
+ UNIX_CXX=${MINGW_CHOST}-c++
|
|
+ MINGW_CXX=${MINGW_CHOST}-c++
|
|
+ ;;
|
|
+ MINGW32*)
|
|
+ echo 'uname -s identifies an i686 MINGW environment.'
|
|
+ IS_MINGW=1
|
|
+ UNIX_CXX=i686-w64-mingw32-c++
|
|
+ MINGW_CXX=i686-w64-mingw32-c++
|
|
+ ;;
|
|
*)
|
|
echo 'Error: uname -s did not match either CYGWIN* or MINGW*.'
|
|
exit 1
|
|
@@ -151,6 +164,16 @@
|
|
# The MSYS1 MinGW compiler has a bug that prevents inclusion of algorithm
|
|
# and math.h in normal C++11 mode. The workaround is to enable the gnu++11
|
|
# mode instead. The bug was fixed on 2015-07-31, but as of 2016-02-26, the
|
|
+ # fix apparently hasn't been released. See
|
|
+ # http://ehc.ac/p/mingw/bugs/2250/.
|
|
+ echo MINGW_ENABLE_CXX11_FLAG := -std=gnu++11 >> config.mk
|
|
+fi
|
|
+
|
|
+if test $IS_MINGW = 1; then
|
|
+ echo MINGW_CXXFLAGS += -DWINPTY_TARGET_MINGW -Wno-ignored-attributes >> config.mk
|
|
+ # The MSYS1 MinGW compiler has a bug that prevents inclusion of algorithm
|
|
+ # and math.h in normal C++11 mode. The workaround is to enable the gnu++11
|
|
+ # mode instead. The bug was fixed on 2015-07-31, but as of 2016-02-26, the
|
|
# fix apparently hasn't been released. See
|
|
# http://ehc.ac/p/mingw/bugs/2250/.
|
|
echo MINGW_ENABLE_CXX11_FLAG := -std=gnu++11 >> config.mk
|
|
diff -ur a/src/libwinpty/subdir.mk b/src/libwinpty/subdir.mk
|
|
--- a/src/libwinpty/subdir.mk 2017-05-17 14:47:20.000000000 +0800
|
|
+++ b/src/libwinpty/subdir.mk 2024-01-29 00:00:08.291169200 +0800
|
|
@@ -41,6 +41,6 @@
|
|
|
|
build/winpty.dll : $(LIBWINPTY_OBJECTS)
|
|
$(info Linking $@)
|
|
- @$(MINGW_CXX) $(MINGW_LDFLAGS) -shared -o $@ $^ -Wl,--out-implib,build/winpty.lib
|
|
+ @$(MINGW_CXX) $(MINGW_LDFLAGS) -shared -o $@ $^ -Wl,--out-implib,build/libwinpty.dll.a
|
|
|
|
-include $(LIBWINPTY_OBJECTS:.o=.d)
|
|
diff -ur a/src/subdir.mk b/src/subdir.mk
|
|
--- a/src/subdir.mk 2017-05-17 14:47:20.000000000 +0800
|
|
+++ b/src/subdir.mk 2024-01-29 00:00:08.306811000 +0800
|
|
@@ -2,4 +2,4 @@
|
|
include src/debugserver/subdir.mk
|
|
include src/libwinpty/subdir.mk
|
|
include src/tests/subdir.mk
|
|
-include src/unix-adapter/subdir.mk
|
|
+#include src/unix-adapter/subdir.mk
|