bld_win.sh 821 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. cd $SRC_DIR
  3. export BUILD=x86_64-w64-mingw32
  4. export HOST=x86_64-w64-mingw32
  5. # See $SRC_DIR/windows/build.bash for more info.
  6. ./configure \
  7. --prefix=${PREFIX} \
  8. --enable-silent-rules \
  9. --disable-dependency-tracking \
  10. --disable-nls \
  11. --disable-scripts \
  12. --disable-threads \
  13. --disable-shared \
  14. --enable-small \
  15. --build=$BUILD \
  16. CFLAGS="-march=x86-64 -mtune=generic -Os"
  17. make -j${CPU_COUNT} ${VERBOSE_AT}
  18. make check
  19. make install
  20. # Move command-line tools to their windows location.
  21. mv ${PREFIX}/bin/* $LIBRARY_BIN
  22. mv src/liblzma/api/lzma $LIBRARY_INC
  23. cp src/liblzma/api/lzma.h $LIBRARY_INC
  24. # Remove posix style directories
  25. rm -rf ${PREFIX}/lib
  26. rm -rf ${PREFIX}/include
  27. rm -rf ${PREFIX}/share
  28. rm -rf ${PREFIX}/bin
  29. find $PREFIX -name '*.la' -delete