|
|
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:"
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.13! root 21: echo " --enable-winuae-cpu Enable WinUAE CPU core (experimental!)"
1.1.1.12 root 22: echo " --disable-osx-bundle Disable application bundling on Mac OS X"
23: echo " --cross-compile-win32 Build the Windows version under linux"
24: echo
25: echo "Please run cmake directly for full control over the build."
26: echo
1.1 root 27: }
28:
1.1.1.12 root 29: cmake_args=""
30: build_type="Release"
1.1 root 31:
1.1.1.12 root 32: while [ $# -gt 0 ]
1.1 root 33: do
1.1.1.12 root 34: preq=${1%=*} # get part before =
35: case $preq
36: in
37: --help)
38: print_help
39: exit 0
1.1.1.3 root 40: ;;
1.1.1.12 root 41: --prefix)
42: prefix=${1##*=} # get part after =
43: cmake_args="$cmake_cmd -DCMAKE_INSTALL_PREFIX:PATH=$prefix"
1.1 root 44: ;;
1.1.1.12 root 45: --enable-debug)
46: build_type="Debug"
47: cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Debug"
48: ;;
49: --disable-debug)
50: build_type="Release"
51: cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Release"
52: ;;
53: --enable-dsp)
54: cmake_args="$cmake_args -DENABLE_DSP_EMU:BOOL=1"
55: ;;
56: --disable-dsp)
57: cmake_args="$cmake_args -DENABLE_DSP_EMU:BOOL=0"
58: ;;
59: --enable-tracing)
60: cmake_args="$cmake_args -DENABLE_TRACING:BOOL=1"
61: ;;
62: --disable-tracing)
63: cmake_args="$cmake_args -DENABLE_TRACING:BOOL=0"
64: ;;
65: --enable-small-mem)
66: cmake_args="$cmake_args -DENABLE_SMALL_MEM:BOOL=1"
67: ;;
68: --disable-small-mem)
69: cmake_args="$cmake_args -DENABLE_SMALL_MEM:BOOL=0"
70: ;;
1.1.1.13! root 71: --enable-winuae-cpu)
! 72: cmake_args="$cmake_args -DENABLE_WINUAE_CPU:BOOL=1"
! 73: ;;
! 74: --disable-winuae-cpu)
! 75: cmake_args="$cmake_args -DENABLE_WINUAE_CPU:BOOL=0"
! 76: ;;
1.1.1.12 root 77: --enable-osx-bundle)
78: cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=1"
79: ;;
80: --disable-osx-bundle)
81: cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=0"
82: ;;
83: --cross-compile-win32)
84: cmake_args="$cmake_args -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-mingw32.cmake"
85: ;;
86: *)
87: echo "Invalid argument: $preq"
88: echo "Run $0 --help for a list of valid parameters."
89: exit 2
1.1.1.6 root 90: ;;
1.1 root 91: esac
1.1.1.12 root 92: shift 1
93: done
1.1 root 94:
1.1.1.13! root 95: # remove previous cmake's cache
! 96: rm -f `dirname $0`/CMakeCache.txt
! 97:
1.1.1.12 root 98: cmake `dirname $0` $cmake_args || exit 1
1.1 root 99:
1.1.1.12 root 100: echo
101: echo "Now you must type: make; make install"
102: echo "to actually build and install the software"
103: echo
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.