File: compile_query.sh

package info (click to toggle)
whitedb 0.7.3%2Bgit200711-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 3,340 kB
  • sloc: ansic: 33,250; javascript: 3,299; python: 790; lex: 359; java: 277; makefile: 192; sh: 164; yacc: 138; sed: 41
file content (18 lines) | stat: -rwxr-xr-x 585 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

[ -z "$CC" ] && CC="cc"

if [ -z "$(which $CC 2>/dev/null)" ]; then
    echo "Error: No compiler found"
    exit 1
fi

# run unite.sh if needed
if [ ! -f ../whitedb.c ]; then
  cd ..; ./unite.sh; cd "$OLDPWD"
fi

# use output of unite.sh
$CC -O2 -I.. -o query  query.c ../Test/dbtest.c ../whitedb.c -lm

#$CC -O2 -o query  query.c ../Db/dbmem.c ../Db/dballoc.c ../Db/dbdata.c ../Db/dblock.c ../Db/dbindex.c ../Db/dblog.c ../Db/dbhash.c ../Db/dbcompare.c ../Db/dbquery.c ../Db/dbutil.c  ../Test/dbtest.c ../Db/dbmpool.c ../Db/dbjson.c ../Db/dbschema.c ../json/yajl_all.c -lm