|
|
1.1.1.12 root 1: #!/bin/sh
1.1 root 2:
1.1.1.12 root 3: # NOTE: this is a simple script wrapper around the cmake command line tools,
4: # for those used to the autotools configure script conventions
1.1.1.9 root 5:
1.1.1.12 root 6: if ! which cmake > /dev/null; then
7: echo "ERROR: You need the 'cmake' program to configure the Hatari build process."
8: echo "Please install 'cmake' first, then try again."
9: exit 1
10: fi
11:
12: print_help()
13: {
14: echo "This is a simple configure script wrapper around cmake build system."
15: echo "Parameters are:"
1.1.1.15 root 16: echo " --prefix=<path> Set the install prefix to path"
17: echo " --enable-debug Enable debug (non-optimized) build"
18: echo " --enable-small-mem Use less memory - at the expense of emulation speed"
19: echo " --disable-dsp Disable DSP emulation for Falcon mode."
20: echo " --disable-tracing Disable tracing messages for debugging"
1.1.1.17! root 21: echo " --enable-winuae-cpu Use WinUAE CPU core (default)"
! 22: echo " --enable-old-uae-cpu Use old UAE CPU core (deprecated)"
1.1.1.15 root 23: echo " --disable-osx-bundle Disable application bundling on Mac OS X"
1.1.1.17! root 24: echo " --disable-sdl2 Do not compile with libsdl 2.0, use 1.2 instead"
1.1.1.15 root 25: echo " --cross-compile-win64_32 Build the 32 bit Windows version under linux using mingw-w64"
26: echo " --cross-compile-win64_64 Build the 64 bit Windows version under linux using mingw-w64"
1.1.1.12 root 27: echo
28: echo "Please run cmake directly for full control over the build."
29: echo
1.1 root 30: }
31:
1.1.1.12 root 32: cmake_args=""
33: build_type="Release"
1.1 root 34:
1.1.1.12 root 35: while [ $# -gt 0 ]
1.1 root 36: do
1.1.1.12 root 37: preq=${1%=*} # get part before =
38: case $preq
39: in
40: --help)
41: print_help
42: exit 0
1.1.1.3 root 43: ;;
1.1.1.12 root 44: --prefix)
45: prefix=${1##*=} # get part after =
1.1.1.14 root 46: cmake_args="$cmake_args -DCMAKE_INSTALL_PREFIX:PATH=$prefix"
1.1 root 47: ;;
1.1.1.12 root 48: --enable-debug)
49: build_type="Debug"
50: cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Debug"
51: ;;
52: --disable-debug)
53: build_type="Release"
54: cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Release"
55: ;;
56: --enable-dsp)
57: cmake_args="$cmake_args -DENABLE_DSP_EMU:BOOL=1"
58: ;;
59: --disable-dsp)
60: cmake_args="$cmake_args -DENABLE_DSP_EMU:BOOL=0"
61: ;;
62: --enable-tracing)
63: cmake_args="$cmake_args -DENABLE_TRACING:BOOL=1"
64: ;;
65: --disable-tracing)
66: cmake_args="$cmake_args -DENABLE_TRACING:BOOL=0"
67: ;;
68: --enable-small-mem)
69: cmake_args="$cmake_args -DENABLE_SMALL_MEM:BOOL=1"
70: ;;
71: --disable-small-mem)
72: cmake_args="$cmake_args -DENABLE_SMALL_MEM:BOOL=0"
73: ;;
1.1.1.13 root 74: --enable-winuae-cpu)
75: cmake_args="$cmake_args -DENABLE_WINUAE_CPU:BOOL=1"
76: ;;
77: --disable-winuae-cpu)
78: cmake_args="$cmake_args -DENABLE_WINUAE_CPU:BOOL=0"
79: ;;
1.1.1.17! root 80: --enable-old-uae-cpu)
! 81: cmake_args="$cmake_args -DENABLE_WINUAE_CPU:BOOL=0"
! 82: ;;
! 83: --disable-old-uae-cpu)
! 84: cmake_args="$cmake_args -DENABLE_WINUAE_CPU:BOOL=1"
! 85: ;;
1.1.1.12 root 86: --enable-osx-bundle)
87: cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=1"
88: ;;
89: --disable-osx-bundle)
90: cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=0"
91: ;;
1.1.1.16 root 92: --enable-sdl2)
93: cmake_args="$cmake_args -DENABLE_SDL2:BOOL=1"
94: ;;
95: --disable-sdl2)
96: cmake_args="$cmake_args -DENABLE_SDL2:BOOL=0"
97: ;;
1.1.1.15 root 98: --cross-compile-win64_32)
99: cmake_args="$cmake_args -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-mingw32-win64_32.cmake"
100: ;;
101: --cross-compile-win64_64)
102: cmake_args="$cmake_args -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-mingw32-win64_64.cmake"
1.1.1.12 root 103: ;;
104: *)
105: echo "Invalid argument: $preq"
106: echo "Run $0 --help for a list of valid parameters."
107: exit 2
1.1.1.6 root 108: ;;
1.1 root 109: esac
1.1.1.12 root 110: shift 1
111: done
1.1 root 112:
1.1.1.13 root 113: # remove previous cmake's cache
114: rm -f `dirname $0`/CMakeCache.txt
1.1.1.15 root 115: rm -rf `dirname $0`/CMakeFiles/
1.1.1.13 root 116:
1.1.1.12 root 117: cmake `dirname $0` $cmake_args || exit 1
1.1 root 118:
1.1.1.12 root 119: echo
120: echo "Now you must type: make; make install"
121: echo "to actually build and install the software"
122: echo
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.