mirror of https://git.kore.io/kore.git
Add MODULE_BUILD_DATE to static.h when building.
Contains %Y-%m-%d %H-%M-%S timestamp of when the module was built.
This commit is contained in:
parent
1c8cfff1a9
commit
bbc98cf2a7
|
@ -25,6 +25,7 @@ CFLAGS="-I. -I${KORE_DIR}/includes -Wall -Wstrict-prototypes \
|
||||||
-Wmissing-prototypes -Wmissing-declarations -Wshadow \
|
-Wmissing-prototypes -Wmissing-declarations -Wshadow \
|
||||||
-Wpointer-arith -Wcast-qual -Wsign-compare -g"
|
-Wpointer-arith -Wcast-qual -Wsign-compare -g"
|
||||||
LDFLAGS=-shared
|
LDFLAGS=-shared
|
||||||
|
MODULE_BUILD_DATE=`date +"%Y-%m-%d %H:%M:%S"`
|
||||||
|
|
||||||
# Functions used in the build process.
|
# Functions used in the build process.
|
||||||
function create_and_empty_dir {
|
function create_and_empty_dir {
|
||||||
|
@ -44,6 +45,8 @@ ${CC} ${CFLAGS} tools/inject.c -o tools/inject
|
||||||
create_and_empty_dir ${SOURCE_DIR}/${MEDIA_DIR}
|
create_and_empty_dir ${SOURCE_DIR}/${MEDIA_DIR}
|
||||||
create_and_empty_dir .objs
|
create_and_empty_dir .objs
|
||||||
|
|
||||||
|
rm -f static.h
|
||||||
|
|
||||||
for file in `find ${MEDIA_DIR} -type f \( ! -name \*.swp \)`; do
|
for file in `find ${MEDIA_DIR} -type f \( ! -name \*.swp \)`; do
|
||||||
echo "Injecting $file";
|
echo "Injecting $file";
|
||||||
base=`basename $file`;
|
base=`basename $file`;
|
||||||
|
@ -54,6 +57,8 @@ for file in `find ${MEDIA_DIR} -type f \( ! -name \*.swp \)`; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "#define MODULE_BUILD_DATE \"${MODULE_BUILD_DATE}\"" >> static.h
|
||||||
|
|
||||||
for src in `find ${SOURCE_DIR} -type f -name \*.c`; do
|
for src in `find ${SOURCE_DIR} -type f -name \*.c`; do
|
||||||
base=`basename $src`;
|
base=`basename $src`;
|
||||||
${CC} ${CFLAGS} -fPIC -c $src -o .objs/${base}.o
|
${CC} ${CFLAGS} -fPIC -c $src -o .objs/${base}.o
|
||||||
|
|
Loading…
Reference in New Issue