3 # Copyright (C) 2011, BMW AG
10 # @author: Christian Müller (christian.ei.mueller@bmw.de)
12 # Shell script to envoke the out of source build of the Audiomanager and create documentation
13 # after invoking this script, first all Plugins will be compiled and the resulting .a files
14 # are found in ./build/plugins.
15 # All binaries are found in ./bin
16 # Finally source documentation can be found in ./doc
17 # to do a clean build, just remove the ./build folder or just a subfolder in this build folder.
20 BUILD_DIRECTORY="build"
21 PLUGINS_DIRECTORY="plugins"
27 APPLICATION_LIST=$(find . -maxdepth 1 -type d \( -name "[A-Z]*" -a -not \( -name "Plugin*" \) \) )
28 PLUGIN_LIST=$(find . -maxdepth 1 -type d \( -name "[A-Z]*" -a -name "Plugin*" \) )
29 # checks for Build directory and creates it if neccessary
32 BIN=$ABS"/"$BIN_DIRECTORY
35 echo "create Bin Dir: $BIN_DIRECTORY"
38 cp ../AudioManGUI/Bild1.png .
42 TEST=$ABS"/"$TEST_DIRECTORY
43 if [ ! -d "${TEST}" ];
45 echo "create Bin Dir: $TEST_DIRECTORY"
51 ABSOLUTE=$ABS"/"$BUILD_DIRECTORY
52 if [ ! -d "${ABSOLUTE}" ];
54 echo "create Build Dir: $BUILD_DIRECTORY"
55 mkdir $BUILD_DIRECTORY
58 if [ ! -d "${PLUGINS_DIRECTORY}" ];
60 echo "create Build Dir: $PLUGINS_DIRECTORY"
61 mkdir $PLUGINS_DIRECTORY
64 # does cmake for list in $1
67 for PL in $PLUGIN_LIST
72 for PL in $PLUGIN_LIST
74 if [ ! -d "$PL" ]; then
86 for PL in $APPLICATION_LIST
91 for PL in $APPLICATION_LIST
93 if [ ! -d "$PL" ]; then
103 # does make for list in $1
106 for PL in $PLUGIN_LIST
111 for PL in $PLUGIN_LIST
113 if [ ! -d "$PL" ]; then
124 for PL in $APPLICATION_LIST
129 for PL in $APPLICATION_LIST
131 if [ ! -d "$PL" ]; then
192 if [ ! -d "$2" ]; then
215 echo "...executing cmake for"
218 echo "...executiong make for"
221 echo "...executing cmake & make for"
225 echo " Usage: ./cmaker.sh {cmake|make|all} {all|main|plugins|target xxx} [document]"
226 echo " xxx stands for the directory of the target to be build"
227 echo " Output binaries are below \bin, builds are done in \build\xxx"
228 echo " Script does only use Subdirectories beginning with upper Cases !"
229 echo " document if this flag is present, the documentation will be created"
258 echo " Usage: ./cmaker.sh {cmake|make|all} {all|applications|plugins|target xxx} [-document]"
259 echo " xxx stands for the directory of the target to be build"
260 echo " Output binaries are below \bin, builds are done in \build\xxx"
261 echo " Script does only use Subdirectories beginning with upper Cases !"
262 echo " document if this flag is present, the documentation will be created"