version 1.1, 2012/05/30 22:47:49
|
version 1.2, 2012/06/25 19:51:01
|
|
|
PROJECT=$arg | PROJECT=$arg |
;; | ;; |
| |
--guid=*) |
|
GUID=$arg |
|
;; |
|
|
|
--sources=*) | --sources=*) |
SOURCES=$arg | SOURCES=$arg |
;; | ;; |
| |
--headers=*) |
|
HEADERS=$arg |
|
;; |
|
|
|
--defines=*) | --defines=*) |
DEFINES=$arg | DEFINES=$arg |
;; | ;; |
|
|
-h, --help Print this help message. | -h, --help Print this help message. |
--top Relative directory that contains 'configure' script. | --top Relative directory that contains 'configure' script. |
--project Name of project (defaults to current directory name). | --project Name of project (defaults to current directory name). |
--guid GUID for this project (generated by default). |
|
--sources List of source files (defaults to *.c and *.cpp). | --sources List of source files (defaults to *.c and *.cpp). |
--headers List of headers files (defaults to *.h). | --headers List of headers files (defaults to *.h). |
--defines List macros definitions. | --defines List macros definitions. |
|
|
| |
##============================================================================== | ##============================================================================== |
## | ## |
## $GUID |
|
## |
|
##============================================================================== |
|
|
|
if [ "$GUID" = "" ]; then |
|
GUID=`uuidgen | tr abcdef ABCDEF` |
|
fi |
|
|
|
##============================================================================== |
|
## |
|
## $SOURCES | ## $SOURCES |
## | ## |
##============================================================================== | ##============================================================================== |
|
|
| |
##============================================================================== | ##============================================================================== |
## | ## |
## $HEADERS |
|
## |
|
##============================================================================== |
|
|
|
if [ "$HEADERS" = "" ]; then |
|
HEADERS="`ls *.h 2> /dev/null`" |
|
fi |
|
|
|
##============================================================================== |
|
## |
|
## Write 'GNUmakefile' | ## Write 'GNUmakefile' |
## | ## |
##============================================================================== | ##============================================================================== |
|
|
| |
$TYPE = $PROJECT | $TYPE = $PROJECT |
| |
GUID = $GUID |
|
|
|
SOURCES = $SOURCES | SOURCES = $SOURCES |
| |
HEADERS = $HEADERS |
|
|
|
DEFINES = $DEFINES | DEFINES = $DEFINES |
| |
INCLUDES = \$(TOP) \$(TOP)/common $INCLUDES | INCLUDES = \$(TOP) \$(TOP)/common $INCLUDES |