forked from afarhan/sbitx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild
executable file
·41 lines (39 loc) · 1.85 KB
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
F=$@
if [ "$F" = "" ]; then
echo "No build target provided"
echo "Assuming target is sbitx"
F=sbitx
fi
WORKING_DIRECTORY=`pwd`
#TUNE='-mcpu=cortex-a72+crypto -mfloat-abi=hard -mfpu=neon-fp-armv8 -mneon-for-64bits -mtune=cortex-a72 -O2'
TUNE=''
WARNS='-Waddress -Warray-bounds=1 -Wbool-compare -Wbool-operation -Wchar-subscripts -Wcomment -Wformat -Wformat-overflow -Wformat-truncation -Wint-in-bool-context -Wlogical-not-parentheses -Wmemset-elt-size -Wmemset-transposed-args -Wmissing-attributes -Wmultistatement-macros -Wnonnull -Wnonnull-compare -Wparentheses -Wreturn-type -Wsequence-point -Wsizeof-pointer-div -Wstrict-aliasing -Wstrict-overflow=1 -Wswitch -Wtautological-compare -Wtrigraphs -Wmaybe-uninitialized -Wuninitialized -Wunused-label -Wunused-value -Wunused-variable -Wimplicit-function-declaration -Wmisleading-indentation -Wmissing-braces -Wduplicate-decl-specifier -Wenum-compare -Wimplicit'
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
date
mkdir -p "./audio"
mkdir -p "./data"
mkdir -p "./web"
if test -f "data/sbitx.db"; then
echo "database is intact"
else
echo "database doesn't exist, it will be created"
cd data
sqlite3 sbitx.db < create_db.sql
cd ..
fi
if [ "$F" != "sbitx" ]; then
echo "compiling $F in $WORKING_DIRECTORY"
else
VERSION=`grep VER sdr_ui.h|awk 'FNR==1{print $4}'|sed -e 's/"//g'`
echo "compiling $F version $VERSION in $WORKING_DIRECTORY"
fi
gcc $TUNE $WARNS -g -o $F \
vfo.c si570.c sbitx_sound.c fft_filter.c sbitx_gtk.c sbitx_utils.c \
i2cbb.c si5351v2.c ini.c hamlib.c queue.c modems.c logbook.c \
modem_cw.c \
telnet.c macros.c modem_ft8.c remote.c mongoose.c webserver.c $F.c \
ft8_lib/libft8.a \
-lwiringPi -lasound -lm -lfftw3 -lfftw3f -pthread -lncurses -lsqlite3\
`pkg-config --cflags gtk+-3.0` `pkg-config --libs gtk+-3.0`
echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"