Initial import
This commit is contained in:
commit
d3f85fea20
27 changed files with 1697 additions and 0 deletions
1
src/fir3db/.params
Normal file
1
src/fir3db/.params
Normal file
|
|
@ -0,0 +1 @@
|
|||
app c fir3db bin
|
||||
12
src/fir3db/000_TopSource.c
Normal file
12
src/fir3db/000_TopSource.c
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/* fir-tools/src/fir3db/000_TopSource.c
|
||||
*
|
||||
* Copyright: ©2014, Laurence Withers
|
||||
* Author: Laurence Withers <l@lwithers.me.uk>
|
||||
* License: GPLv3
|
||||
*/
|
||||
|
||||
/* Below are all the includes used throughout the application. */
|
||||
|
||||
/* options for text editors
|
||||
vim: expandtab:ts=4:sw=4
|
||||
*/
|
||||
40
src/fir3db/build.app
Normal file
40
src/fir3db/build.app
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# These are external variables, and shouldn't clash with anything else
|
||||
# fir3db
|
||||
# fir3db_BUILT
|
||||
#
|
||||
|
||||
if [ -z ${fir3db_BUILT} ]
|
||||
then
|
||||
fir3db="obj/fir3db"
|
||||
EXTRAS="-std=gnu99 -D_GNU_SOURCE -DAPP_NAME=\"fir3db\"" # TODO: more flags
|
||||
|
||||
echo "Building application ${fir3db}..."
|
||||
|
||||
do_cmd source src/fir3db/build.monolithic || return 1
|
||||
|
||||
MODIFIED=0
|
||||
for test in ${MONOLITHIC_TESTS} ${SRC}
|
||||
do
|
||||
if [ ${test} -nt ${fir3db} ]
|
||||
then
|
||||
MODIFIED=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${MODIFIED} -ne 0 ]
|
||||
then
|
||||
echo " Compiling..."
|
||||
|
||||
do_cmd ${CC} ${CFLAGS} -I obj -o "${fir3db}" ${SRC} ${EXTRAS} || return 1
|
||||
|
||||
print_success "Application built"
|
||||
else
|
||||
print_success "Application up to date"
|
||||
fi
|
||||
|
||||
fir3db_BUILT=1
|
||||
|
||||
fi
|
||||
|
||||
# vim: syntax=sh:expandtab:ts=4:sw=4
|
||||
1
src/fir3db/build.default
Normal file
1
src/fir3db/build.default
Normal file
|
|
@ -0,0 +1 @@
|
|||
source src/fir3db/build.app
|
||||
1
src/fir3db/build.install
Normal file
1
src/fir3db/build.install
Normal file
|
|
@ -0,0 +1 @@
|
|||
source src/fir3db/build.install-app
|
||||
11
src/fir3db/build.install-app
Normal file
11
src/fir3db/build.install-app
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
build_target fir3db
|
||||
|
||||
# make paths (this is for Gentoo in particular)
|
||||
build_dir_tree "${BINDIR}" || return 1
|
||||
|
||||
# install binary
|
||||
echo "Installing binaries into '${BINDIR}'"
|
||||
install_file "${fir3db}" "${BINDIR}" 0755 || return 1
|
||||
print_success "Done"
|
||||
|
||||
# vim: syntax=sh:expandtab:ts=4:sw=4
|
||||
17
src/fir3db/build.monolithic
Normal file
17
src/fir3db/build.monolithic
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# These are external variables, and shouldn't clash with anything else
|
||||
# fir3db_MONOLITHIC
|
||||
#
|
||||
|
||||
SRC="obj/fir3db.c"
|
||||
MONOLITHIC_TESTS="src/fir3db/build.app src/fir3db/build.monolithic"
|
||||
|
||||
if [ -z "${fir3db_MONOLITHIC}" ]
|
||||
then
|
||||
MONOLITHIC_SOURCE="$(find src/fir3db/ -name '*.c' | sort)"
|
||||
make_monolithic ${SRC} C || return 1
|
||||
|
||||
fir3db_MONOLITHIC=1
|
||||
MONOLITHIC_DOC="${MONOLITHIC_DOC} ${SRC}"
|
||||
fi
|
||||
|
||||
# vim: syntax=sh:expandtab:ts=4:sw=4
|
||||
Loading…
Add table
Add a link
Reference in a new issue