Commit 8f6d59c855154d3aada514b807c5c81de1c0dac8
1 parent
eb05b8b4
Exists in
master
and in
3 other branches
Fixing msys/2 builds.
Showing
5 changed files
with
113 additions
and
109 deletions
Show diff stats
Makefile.in
| ... | ... | @@ -187,6 +187,14 @@ $(POTDIR)/$(LIBNAME)/%.pot: \ |
| 187 | 187 | @$(MKDIR) $(dir $@) |
| 188 | 188 | @touch $@ |
| 189 | 189 | |
| 190 | +%.dll.a: \ | |
| 191 | + %.def | |
| 192 | + | |
| 193 | + @$(DLLTOOL) \ | |
| 194 | + --input-def $(BINRLS)/$(LIBNAME).def \ | |
| 195 | + --dllname $(LIBNAME).dll \ | |
| 196 | + --kill-at \ | |
| 197 | + --output-lib $@ | |
| 190 | 198 | |
| 191 | 199 | #---[ Release Targets ]------------------------------------------------------------------ |
| 192 | 200 | |
| ... | ... | @@ -237,7 +245,7 @@ $(BINRLS)/$(LIBNAME).a: \ |
| 237 | 245 | install: \ |
| 238 | 246 | $(foreach PKG, $(INSTALL_PACKAGES), install-$(PKG)) |
| 239 | 247 | |
| 240 | -install-shared: \ | |
| 248 | +install-linux-lib: \ | |
| 241 | 249 | $(BINRLS)/$(SONAME) |
| 242 | 250 | |
| 243 | 251 | # Install library |
| ... | ... | @@ -259,6 +267,31 @@ install-shared: \ |
| 259 | 267 | # Install default configs |
| 260 | 268 | @mkdir -p $(DESTDIR)$(datarootdir)/pw3270 |
| 261 | 269 | |
| 270 | +install-windows-lib: \ | |
| 271 | + $(BINRLS)/$(SONAME) \ | |
| 272 | + $(BINRLS)/$(LIBNAME).dll.a | |
| 273 | + | |
| 274 | + @$(MKDIR) \ | |
| 275 | + $(DESTDIR)$(bindir) | |
| 276 | + | |
| 277 | + @$(INSTALL_PROGRAM) \ | |
| 278 | + $(BINRLS)/$(SONAME) \ | |
| 279 | + $(DESTDIR)$(bindir)/$(SONAME) | |
| 280 | + | |
| 281 | + @$(MKDIR) \ | |
| 282 | + $(DESTDIR)$(libdir) | |
| 283 | + | |
| 284 | + @$(INSTALL_DATA) \ | |
| 285 | + $(BINRLS)/$(LIBNAME).dll.a \ | |
| 286 | + $(DESTDIR)$(libdir) | |
| 287 | + | |
| 288 | + @$(MKDIR) \ | |
| 289 | + $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/def | |
| 290 | + | |
| 291 | + @$(INSTALL_DATA) \ | |
| 292 | + $(BINRLS)/$(LIBNAME).def \ | |
| 293 | + $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/def | |
| 294 | + | |
| 262 | 295 | install-static: \ |
| 263 | 296 | $(BINRLS)/$(LIBNAME).a |
| 264 | 297 | |
| ... | ... | @@ -314,29 +347,6 @@ install-dev: \ |
| 314 | 347 | @$(MKDIR) $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/pot |
| 315 | 348 | @$(INSTALL_DATA) $(POTDIR)/lib3270.pot $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/pot/lib3270.pot |
| 316 | 349 | |
| 317 | - | |
| 318 | -install-winlib: \ | |
| 319 | - $(BINRLS)/$(SONAME) | |
| 320 | - | |
| 321 | - @$(MKDIR) \ | |
| 322 | - $(DESTDIR)$(libdir) | |
| 323 | - | |
| 324 | - @$(INSTALL_DATA) \ | |
| 325 | - $(BINRLS)/$(LIBNAME).dll.a \ | |
| 326 | - $(DESTDIR)$(libdir) | |
| 327 | - | |
| 328 | - @$(DLLTOOL) \ | |
| 329 | - --input-def $(BINRLS)/$(LIBNAME).def \ | |
| 330 | - --dllname $(LIBNAME).dll \ | |
| 331 | - --output-lib $(DESTDIR)$(libdir)/$(LIBNAME).lib | |
| 332 | - | |
| 333 | - @$(MKDIR) \ | |
| 334 | - $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/def | |
| 335 | - | |
| 336 | - @$(INSTALL_DATA) \ | |
| 337 | - $(BINRLS)/$(LIBNAME).def \ | |
| 338 | - $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/def | |
| 339 | - | |
| 340 | 350 | #---[ Misc Targets ]--------------------------------------------------------------------- |
| 341 | 351 | |
| 342 | 352 | $(BASEDIR)/.tmp/$(LIBNAME)/fallbacks.c: \ | ... | ... |
README.md
| ... | ... | @@ -75,8 +75,6 @@ Cross-compiling on SuSE Linux (Native or WSL) |
| 75 | 75 | * cd lib3270 |
| 76 | 76 | * make clean |
| 77 | 77 | * make all |
| 78 | - * make install | |
| 79 | - | |
| 80 | 78 | |
| 81 | 79 | Compiling for Windows (With MSYS2) |
| 82 | 80 | ---------------------------------- |
| ... | ... | @@ -101,4 +99,8 @@ Compiling for Windows (With MSYS2) |
| 101 | 99 | * ./autogen.sh |
| 102 | 100 | * make all |
| 103 | 101 | |
| 102 | +5. Install | |
| 103 | + | |
| 104 | + * make install | |
| 105 | + | |
| 104 | 106 | ... | ... |
configure.ac
| ... | ... | @@ -68,7 +68,7 @@ APP_RESOURCES="" |
| 68 | 68 | APP_LDFLAGS="" |
| 69 | 69 | DLL_LDFLAGS="-shared -Wl,-soname,\$(@F)" |
| 70 | 70 | STATIC_LDFLAGS="" |
| 71 | -INSTALL_PACKAGES="shared dev" | |
| 71 | +INSTALL_PACKAGES="dev" | |
| 72 | 72 | |
| 73 | 73 | dnl --------------------------------------------------------------------------- |
| 74 | 74 | dnl Check for OS specifics |
| ... | ... | @@ -82,9 +82,10 @@ case "$host" in |
| 82 | 82 | CFLAGS="$CFLAGS -pthread -D_WIN32_WINNT=0x0600" |
| 83 | 83 | LIBS="$LIBS -lws2_32 -lwtsapi32 -lcomdlg32" |
| 84 | 84 | LDFLAGS="$LDFLAGS -pthread" |
| 85 | - DLL_LDFLAGS="-shared -Wl,--output-def,\$(@D)/\$(LIBNAME).def,--out-implib,\$(@D)/\$(LIBNAME).dll.a" | |
| 85 | + DLL_LDFLAGS="-shared -Wl,--output-def,\$(@D)/\$(LIBNAME).def" | |
| 86 | 86 | DLLEXT=".dll" |
| 87 | - INSTALL_PACKAGES="${INSTALL_PACKAGES} winlib" | |
| 87 | + | |
| 88 | + INSTALL_PACKAGES="windows-lib ${INSTALL_PACKAGES}" | |
| 88 | 89 | |
| 89 | 90 | app_win32_revision=$(date +%-y.%-m.%-d.%-H) |
| 90 | 91 | AC_SUBST(WIN32_VERSION,$app_win32_revision) |
| ... | ... | @@ -101,17 +102,6 @@ case "$host" in |
| 101 | 102 | |
| 102 | 103 | ;; |
| 103 | 104 | |
| 104 | - s390x-*) | |
| 105 | - CFLAGS="$CFLAGS -pthread" | |
| 106 | - LDFLAGS="$LDFLAGS -pthread" | |
| 107 | - app_cv_osname="linux" | |
| 108 | - LOGDIR="/var/log" | |
| 109 | - | |
| 110 | - app_cv_static='no' | |
| 111 | - | |
| 112 | - CFLAGS="$CFLAGS -DCONFDIR=\$(confdir) -DDATADIR=\$(datadir)" | |
| 113 | - ;; | |
| 114 | - | |
| 115 | 105 | *) |
| 116 | 106 | CFLAGS="$CFLAGS -pthread -DCONFDIR=\$(confdir) -DDATADIR=\$(datadir)" |
| 117 | 107 | LDFLAGS="$LDFLAGS -pthread" |
| ... | ... | @@ -119,6 +109,8 @@ case "$host" in |
| 119 | 109 | LOGDIR="/var/log" |
| 120 | 110 | DLLEXT=".so" |
| 121 | 111 | |
| 112 | + INSTALL_PACKAGES="linux-lib ${INSTALL_PACKAGES}" | |
| 113 | + | |
| 122 | 114 | app_cv_static='no' |
| 123 | 115 | |
| 124 | 116 | esac | ... | ... |
| ... | ... | @@ -0,0 +1,69 @@ |
| 1 | +#!/bin/bash | |
| 2 | + | |
| 3 | +aclocal | |
| 4 | +if test $? != 0 ; then | |
| 5 | + echo "aclocal failed." | |
| 6 | + exit -1 | |
| 7 | +fi | |
| 8 | + | |
| 9 | +autoconf | |
| 10 | +if test $? != 0 ; then | |
| 11 | + echo "autoconf failed." | |
| 12 | + exit -1 | |
| 13 | +fi | |
| 14 | + | |
| 15 | +mkdir -p scripts | |
| 16 | +automake --add-missing 2> /dev/null | true | |
| 17 | + | |
| 18 | +export HOST_CC=/usr/bin/gcc | |
| 19 | + | |
| 20 | +until [ -z "${1}" ] | |
| 21 | +do | |
| 22 | + if [ ${1:0:2} = '--' ]; then | |
| 23 | + tmp=${1:2} | |
| 24 | + parameter=${tmp%%=*} | |
| 25 | + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") | |
| 26 | + | |
| 27 | + case $parameter in | |
| 28 | + | |
| 29 | + 32) | |
| 30 | + rm -f win32.cache | |
| 31 | + ./configure \ | |
| 32 | + --cache-file=win32.cache \ | |
| 33 | + --host=i686-w64-mingw32 \ | |
| 34 | + --prefix=/usr/i686-w64-mingw32/sys-root/mingw \ | |
| 35 | + --libdir=/usr/i686-w64-mingw32/sys-root/mingw/lib | |
| 36 | + | |
| 37 | + exit $? | |
| 38 | + ;; | |
| 39 | + | |
| 40 | + 64) | |
| 41 | + rm -f win64.cache | |
| 42 | + ./configure \ | |
| 43 | + --cache-file=win64.cache \ | |
| 44 | + --host=x86_64-w64-mingw32 \ | |
| 45 | + --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw \ | |
| 46 | + --libdir=/usr/x86_64-w64-mingw32/sys-root/mingw/lib | |
| 47 | + exit $? | |
| 48 | + ;; | |
| 49 | + | |
| 50 | + ALL) | |
| 51 | + ;; | |
| 52 | + | |
| 53 | + | |
| 54 | + *) | |
| 55 | + value=${tmp##*=} | |
| 56 | + eval $parameter=$value | |
| 57 | + esac | |
| 58 | + | |
| 59 | + fi | |
| 60 | + | |
| 61 | + shift | |
| 62 | +done | |
| 63 | + | |
| 64 | +echo "Execute:" | |
| 65 | +echo " ${0} --32 for 32 bits windows." | |
| 66 | +echo " ${0} --64 for 64 bits windows." | |
| 67 | + | |
| 68 | +exit -1 | |
| 69 | + | ... | ... |
win/win-configure.sh
| ... | ... | @@ -1,69 +0,0 @@ |
| 1 | -#!/bin/bash | |
| 2 | - | |
| 3 | -aclocal | |
| 4 | -if test $? != 0 ; then | |
| 5 | - echo "aclocal failed." | |
| 6 | - exit -1 | |
| 7 | -fi | |
| 8 | - | |
| 9 | -autoconf | |
| 10 | -if test $? != 0 ; then | |
| 11 | - echo "autoconf failed." | |
| 12 | - exit -1 | |
| 13 | -fi | |
| 14 | - | |
| 15 | -mkdir -p scripts | |
| 16 | -automake --add-missing 2> /dev/null | true | |
| 17 | - | |
| 18 | -export HOST_CC=/usr/bin/gcc | |
| 19 | - | |
| 20 | -until [ -z "${1}" ] | |
| 21 | -do | |
| 22 | - if [ ${1:0:2} = '--' ]; then | |
| 23 | - tmp=${1:2} | |
| 24 | - parameter=${tmp%%=*} | |
| 25 | - parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") | |
| 26 | - | |
| 27 | - case $parameter in | |
| 28 | - | |
| 29 | - 32) | |
| 30 | - rm -f win32.cache | |
| 31 | - ./configure \ | |
| 32 | - --cache-file=win32.cache \ | |
| 33 | - --host=i686-w64-mingw32 \ | |
| 34 | - --prefix=/usr/i686-w64-mingw32/sys-root/mingw \ | |
| 35 | - --libdir=/usr/i686-w64-mingw32/sys-root/mingw/lib | |
| 36 | - | |
| 37 | - exit $? | |
| 38 | - ;; | |
| 39 | - | |
| 40 | - 64) | |
| 41 | - rm -f win64.cache | |
| 42 | - ./configure \ | |
| 43 | - --cache-file=win64.cache \ | |
| 44 | - --host=x86_64-w64-mingw32 \ | |
| 45 | - --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw \ | |
| 46 | - --libdir=/usr/x86_64-w64-mingw32/sys-root/mingw/lib | |
| 47 | - exit $? | |
| 48 | - ;; | |
| 49 | - | |
| 50 | - ALL) | |
| 51 | - ;; | |
| 52 | - | |
| 53 | - | |
| 54 | - *) | |
| 55 | - value=${tmp##*=} | |
| 56 | - eval $parameter=$value | |
| 57 | - esac | |
| 58 | - | |
| 59 | - fi | |
| 60 | - | |
| 61 | - shift | |
| 62 | -done | |
| 63 | - | |
| 64 | -echo "Execute:" | |
| 65 | -echo " ${0} --32 for 32 bits windows." | |
| 66 | -echo " ${0} --64 for 64 bits windows." | |
| 67 | - | |
| 68 | -exit -1 | |
| 69 | - |