mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-23 23:12:31 +00:00
c7488de510
Functions to help assemble strbuf contents.
133 lines
2.4 KiB
Makefile
133 lines
2.4 KiB
Makefile
SRCS= main.c \
|
|
batman.c \
|
|
ciphers.c \
|
|
client.c \
|
|
commandline.c \
|
|
dataformats.c \
|
|
dna.c \
|
|
conf.c \
|
|
log.c \
|
|
net.c \
|
|
mkdir.c \
|
|
strbuf.c \
|
|
strbuf_helpers.c \
|
|
dna_identity.c \
|
|
encode.c \
|
|
fifo.c \
|
|
gateway.c \
|
|
keyring.c \
|
|
overlay.c \
|
|
overlay_abbreviations.c \
|
|
overlay_advertise.c \
|
|
overlay_broadcast.c \
|
|
overlay_buffer.c \
|
|
overlay_interface.c \
|
|
overlay_mdp.c \
|
|
overlay_packetformats.c \
|
|
overlay_payload.c \
|
|
overlay_route.c \
|
|
packetformats.c \
|
|
performance_timing.c \
|
|
peers.c \
|
|
randombytes.c \
|
|
responses.c \
|
|
rhizome.c \
|
|
rhizome_bundle.c \
|
|
rhizome_crypto.c \
|
|
rhizome_database.c \
|
|
rhizome_fetch.c \
|
|
rhizome_http.c \
|
|
rhizome_packetformats.c \
|
|
serval_packetvisualise.c \
|
|
server.c \
|
|
sha2.c \
|
|
simulate.c \
|
|
sqlite3.c \
|
|
srandomdev.c \
|
|
trans_cache.c \
|
|
vomp.c \
|
|
lsif.c \
|
|
monitor.c \
|
|
monitor-cli.c \
|
|
dna_helper.c \
|
|
sighandlers.c \
|
|
fdqueue.c \
|
|
codecs.c \
|
|
audiodevices.c \
|
|
audio_msm_g1.c \
|
|
audio_alsa.c \
|
|
audio_reflector.c
|
|
|
|
HAVE_VOIPTEST= @HAVE_VOIPTEST@
|
|
ifeq ($(HAVE_VOIPTEST), 1)
|
|
SRCS+= pa_phone.c
|
|
VOIPTEST_CFLAGS=-DHAVE_VOIPTEST=1
|
|
endif
|
|
|
|
OBJS= $(SRCS:.c=.o)
|
|
|
|
HDRS= fifo.h \
|
|
Makefile \
|
|
rhizome.h \
|
|
serval.h \
|
|
strbuf.h \
|
|
strbuf_helpers.h \
|
|
sha2.h \
|
|
sqlite-amalgamation-3070900/sqlite3.h
|
|
|
|
LDFLAGS=@LDFLAGS@ @PORTAUDIO_LIBS@ @SRC_LIBS@ @SPANDSP_LIBS@ @CODEC2_LIBS@ @PTHREAD_LIBS@
|
|
|
|
CFLAGS= @CPPFLAGS@ @CFLAGS@ @PORTAUDIO_CFLAGS@ @SRC_CFLAGS@ @SPANDSP_CFLAGS@ @PTHREAD_CFLAGS@ $(VOIPTEST_CFLAGS)
|
|
CFLAGS+=-Wall -Wno-unused-value
|
|
#CFLAGS+=-Wunreachable-code
|
|
#CFLAGS+=-O0
|
|
CFLAGS+=-DDO_TIMING_CHECKS
|
|
|
|
DEFS= @DEFS@
|
|
|
|
all: dna
|
|
|
|
sqlite3.o: sqlite3.c
|
|
@echo CC $<
|
|
@$(CC) $(CFLAGS) $(DEFS) -c $<
|
|
|
|
%.o: %.c $(HDRS)
|
|
@echo CC $<
|
|
@$(CC) $(CFLAGS) $(DEFS) -c $<
|
|
|
|
dna: $(OBJS)
|
|
@echo LINK $@
|
|
@$(CC) $(CFLAGS) -Wall -o $@ $(OBJS) $(LDFLAGS)
|
|
|
|
# This does not build on 64 bit elf platforms as NaCL isn't built with -fPIC
|
|
# DOC 20120615
|
|
libservald.so: $(OBJS)
|
|
@echo LINK $@
|
|
@$(CC) $(CFLAGS) -Wall -shared -o $@ $(OBJS) $(LDFLAGS)
|
|
|
|
testserver: dna
|
|
clear
|
|
rm hlr.dat
|
|
./dna -vvv -S 1 -f hlr.dat
|
|
|
|
testcreate: dna
|
|
clear
|
|
./dna -vvv -d 0427679796 -C
|
|
@touch testcreate
|
|
|
|
testget: dna testcreate
|
|
clear
|
|
./dna -vvv -d 0427679796 -R dids | tee testget
|
|
|
|
testset: dna testget
|
|
clear
|
|
# Try writing a value to a variable
|
|
echo "short value" >shortvalue.txt
|
|
./dna -vvv -s `cat testget | cut -f2 -d: | tail -1` -i 0 -W note=@shortvalue.txt
|
|
|
|
testbigset: testget
|
|
clear
|
|
./dna -vvv -s `cat testget | cut -f2 -d: | tail -1` -i 0 -W note=@411.txt
|
|
clean:
|
|
@rm -f $(OBJS) dna libservald.so
|