#!/bin/sh # # /********************************************************************/ # /* */ # /* alzam.conf */ # /* */ # /* environnement vars for the scol x11 compiling script Alzam */ # /* */ # /********************************************************************/ # # # /********************************************************************/ # /* */ # /* README : */ # /* */ # /* */ # /* WHAT IS ALZAM.CONF */ # /* */ # /* alzam executes alzam.conf. Here are defined the top level env. */ # /* vars (version release, the directory where the sources are, ...) */ # /* */ # /* */ # /* WHAT IS A MODULE */ # /* */ # /* Then, it automatically executes all the module files stored in */ # /* the alzamconf/modules directory. */ # /* Each module will be automatically supported by alzam : you will */ # /* be able to call alzam in order to compile this module. */ # /* */ # /* */ # /* WHAT IS A MODE */ # /* */ # /* Then, alzam automatically executes all the mode files. A mode */ # /* decribes how a module can be managed by alzam. Now, we have */ # /* a release mode, a debug mode, a clean mode, and a generate mode */ # /* */ # /********************************************************************/ # # # /****************************************************************************/ # /* */ # /* MODULE FILE EXAMPLE : */ # /* */ # /* */ # /* let's say that we want to add the module "myexample" in order */ # /* to manage it via alzam. */ # /* */ # /* create the file ./alzamconf/modules/myexample.module */ # /* */ # /* */ # /* Contents : */ # /* */ # /* */ # /* # the name of the module */ # /* MYEXAMPLE_NAME="myexample" */ # /* */ # /* */ # /* # allow alzam to support this module */ # /* # comment it if you want alzam to ignore this module. */ # /* ALZAM_MODULES="$ALZAM_MODULES $MYEXAMPLE_NAME" */ # /* */ # /* */ # /* # defines the sources path and the binary (or lib) destination. */ # /* # those are internal to the module. you can name them whatever you want. */ # /* MYEXAMPLE_SRC_PATH="$WORK_PATH/""$MYEXAMPLE_NAME""$SCOL_VERSION" */ # /* MYEXAMPLE_BINARY="$MYEXAMPLE_NAME""$SCOL_VERSION""$SCOL_RELEASE" */ # /* # or could be : */ # /* MYEXAMPLE_SHARED_LIB="...ect..." */ # /* */ # /* */ # /* # defines the FLAGS of the module */ # /* function myexample_setFlags () */ # /* { */ # /* MYEXAMPLE_CFLAGS="......" */ # /* MYEXAMPLE_LFLAGS="......" */ # /* } */ # /* */ # /* */ # /* # defines the module function : set the env. vars. that alzam and the */ # /* # makefile will use. */ # /* # !!! the name of the function must be the name of the module : it */ # /* # allows alzam to call this function when the module name is given as */ # /* # parameter of alzam. !!!!! */ # /* function myexample () */ # /* { */ # /* # call the setFlags function */ # /* myexample_setFlags; */ # /* */ # /* # then, set the env vars from them */ # /* CFLAGS="$MYEXAMPLE_CFLAGS" */ # /* LFLAGS="$MYEXAMPLE_LFLAGS" */ # /* SRC_PATH="$MYEXAMPLE_SRC_PATH" */ # /* TARGET_PATH="$MYEXAMPLE_SRC_PATH" */ # /* TARGET_SCOL_PATH="$SCOL_PATH" */ # /* TARGET_MAKE="gcc" */ # /* # or to compile a shared lib : */ # /* # TARGET_MAKE="gcc -shared" */ # /* TARGET="$MYEXAMPLE_BINARY" */ # /* */ # /* # !! TARGET and TARGET_PATH will be completed by the mode function! */ # /* } */ # /* */ # /****************************************************************************/ # # /**************************************************/ # /* */ # /* vars. initialization */ # /* */ # /**************************************************/ # # version # SCOL_VERSION="-x11-v45" # # release # SCOL_RELEASE="-beta2" # # root repository # WORK_PATH="$HOME/data/devel/scol""$SCOL_VERSION" # # scol installation path # SCOL_PATH="$WORK_PATH/scol" # # scol plugins directory # SCOL_PLUGINS_PATH="$SCOL_PATH/plugins" # # common path (zlib, other libs....) # COMMON_LIB_PATH="$WORK_PATH/common" # /**************************************************/ # /* */ # /* load modules and mode */ # /* */ # /**************************************************/ # # here, we load all the modules to compile # ALZAM_MODULES="" modulefiles=$(ls ./alzamconf/modules/*.module) for module in $modulefiles; do . $module; done unset modulefiles # # load all compiling modes # ALZAM_MODES="" modefiles=$(ls ./alzamconf/modes/*.mode) for mode in $modefiles; do . $mode; done unset modefiles