mirror of https://git.kore.io/kore.git
Update build.sh
This commit is contained in:
parent
c30ff58b93
commit
765214c5dc
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2013 Joris Vink <joris@coders.se>
|
||||
#
|
||||
|
@ -31,23 +31,21 @@ CFLAGS="-I. -I${KORE_DIR}/includes -Wall -Wstrict-prototypes \
|
|||
LDFLAGS=-shared
|
||||
MODULE_BUILD_DATE=`date +"%Y-%m-%d %H:%M:%S"`
|
||||
|
||||
# Functions used in the build process.
|
||||
function create_and_empty_dir {
|
||||
if [ ! -d $1 ]; then
|
||||
mkdir $1;
|
||||
fi
|
||||
|
||||
rm -f $1/*
|
||||
}
|
||||
|
||||
### Begin building ####
|
||||
echo "Building module ${MODULE}..."
|
||||
rm -f ${MODULE}
|
||||
|
||||
${CC} ${CFLAGS} tools/inject.c -o tools/inject
|
||||
|
||||
create_and_empty_dir ${SOURCE_DIR}/${MEDIA_DIR}
|
||||
create_and_empty_dir .objs
|
||||
if [ ! -d ${SOURCE_DIR}/${MEDIA_DIR} ]; then
|
||||
mkdir ${SOURCE_DIR}/${MEDIA_DIR};
|
||||
fi
|
||||
rm -f ${SOURCE_DIR}/${MEDIA_DIR}/*
|
||||
|
||||
if [ ! -d .objs ]; then
|
||||
mkdir .objs;
|
||||
fi
|
||||
rm -f .objs/*
|
||||
|
||||
rm -f static.h
|
||||
|
||||
|
|
Loading…
Reference in New Issue