|
|
1.1 root 1: #!/bin/sh
2:
3: # NOTE: this is a simple script wrapper around the cmake command line tools,
4: # for those used to the autotools configure script conventions
5:
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"
21: echo " --disable-osx-bundle Disable application bundling on Mac OS X"
22: echo " --cross-compile-win32 Build the Windows version under linux"
23: echo
24: echo "Please run cmake directly for full control over the build."
25: echo
26: }
27:
28: cmake_args=""
29: build_type="Release"
30:
31: while [ $# -gt 0 ]
32: do
33: preq=${1%=*} # get part before =
34: case $preq
35: in
36: --help)
37: print_help
38: exit 0
39: ;;
40: --prefix)
41: prefix=${1##*=} # get part after =
42: cmake_args="$cmake_cmd -DCMAKE_INSTALL_PREFIX:PATH=$prefix"
43: ;;
44: --enable-debug)
45: build_type="Debug"
46: cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Debug"
47: ;;
48: --disable-debug)
49: build_type="Release"
50: cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Release"
51: ;;
52: --enable-dsp)
53: cmake_args="$cmake_args -DENABLE_DSP_EMU:BOOL=1"
54: ;;
55: --disable-dsp)
56: cmake_args="$cmake_args -DENABLE_DSP_EMU:BOOL=0"
57: ;;
58: --enable-tracing)
59: cmake_args="$cmake_args -DENABLE_TRACING:BOOL=1"
60: ;;
61: --disable-tracing)
62: cmake_args="$cmake_args -DENABLE_TRACING:BOOL=0"
63: ;;
64: --enable-small-mem)
65: cmake_args="$cmake_args -DENABLE_SMALL_MEM:BOOL=1"
66: ;;
67: --disable-small-mem)
68: cmake_args="$cmake_args -DENABLE_SMALL_MEM:BOOL=0"
69: ;;
70: --enable-osx-bundle)
71: cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=1"
72: ;;
73: --disable-osx-bundle)
74: cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=0"
75: ;;
76: --cross-compile-win32)
77: cmake_args="$cmake_args -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-mingw32.cmake"
78: ;;
79: *)
80: echo "Invalid argument: $preq"
81: echo "Run $0 --help for a list of valid parameters."
82: exit 2
83: ;;
84: esac
85: shift 1
86: done
87:
88: cmake `dirname $0` $cmake_args || exit 1
89:
90: echo
91: echo "Now you must type: make; make install"
92: echo "to actually build and install the software"
93: echo
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.