2012-05-15 01:39:21 +00:00
|
|
|
SRCS= main.c \
|
|
|
|
batman.c \
|
2012-04-23 07:33:07 +00:00
|
|
|
ciphers.c \
|
|
|
|
client.c \
|
|
|
|
commandline.c \
|
|
|
|
dataformats.c \
|
|
|
|
dna.c \
|
2012-05-14 09:02:10 +00:00
|
|
|
log.c \
|
|
|
|
mkdir.c \
|
2012-05-19 04:32:03 +00:00
|
|
|
strbuf.c \
|
2012-04-23 07:33:07 +00:00
|
|
|
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 \
|
|
|
|
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 \
|
2012-04-28 02:55:19 +00:00
|
|
|
vomp.c \
|
2012-05-02 16:58:39 +00:00
|
|
|
lsif.c \
|
2012-05-08 05:10:39 +00:00
|
|
|
monitor.c \
|
2012-05-09 18:16:27 +00:00
|
|
|
monitor-cli.c \
|
|
|
|
codecs.c \
|
|
|
|
audiodevices.c \
|
2012-05-10 08:59:27 +00:00
|
|
|
audio_msm_g1.c \
|
2012-05-10 22:30:09 +00:00
|
|
|
audio_alsa.c \
|
|
|
|
audio_reflector.c
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-04-23 10:47:11 +00:00
|
|
|
HAVE_VOIPTEST= @HAVE_VOIPTEST@
|
|
|
|
ifeq ($(HAVE_VOIPTEST), 1)
|
|
|
|
SRCS+= pa_phone.c
|
|
|
|
VOIPTEST_CFLAGS=-DHAVE_VOIPTEST=1
|
|
|
|
endif
|
|
|
|
|
2012-04-19 06:18:00 +00:00
|
|
|
OBJS= $(SRCS:.c=.o)
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-04-23 07:33:07 +00:00
|
|
|
HDRS= fifo.h \
|
|
|
|
Makefile \
|
|
|
|
rhizome.h \
|
|
|
|
serval.h \
|
2012-05-20 03:32:41 +00:00
|
|
|
strbuf.h \
|
2012-04-23 07:33:07 +00:00
|
|
|
sha2.h \
|
|
|
|
sqlite-amalgamation-3070900/sqlite3.h
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-04-23 11:10:34 +00:00
|
|
|
LDFLAGS=@LDFLAGS@ @PORTAUDIO_LIBS@ @SRC_LIBS@ @SPANDSP_LIBS@ @CODEC2_LIBS@ @PTHREAD_LIBS@
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-06-15 05:31:14 +00:00
|
|
|
CFLAGS= @CPPFLAGS@ @CFLAGS@ @PORTAUDIO_CFLAGS@ @SRC_CFLAGS@ @SPANDSP_CFLAGS@ @PTHREAD_CFLAGS@ $(VOIPTEST_CFLAGS)
|
|
|
|
CFLAGS+=-Wall -Wno-unused-value
|
|
|
|
#CFLAGS+=-Wunreachable-code
|
|
|
|
#CFLAGS+=-O0
|
|
|
|
|
|
|
|
DEFS= @DEFS@
|
2012-04-23 10:47:11 +00:00
|
|
|
|
2012-06-15 05:31:14 +00:00
|
|
|
all: dna
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-04-20 07:40:38 +00:00
|
|
|
sqlite3.o: sqlite3.c
|
2012-05-10 03:53:06 +00:00
|
|
|
@echo CC $<
|
2012-05-29 00:10:29 +00:00
|
|
|
@$(CC) $(CFLAGS) $(DEFS) -c $<
|
2012-04-20 07:40:38 +00:00
|
|
|
|
2012-03-14 22:54:31 +00:00
|
|
|
%.o: %.c $(HDRS)
|
2012-05-10 03:53:06 +00:00
|
|
|
@echo CC $<
|
2012-05-29 00:10:29 +00:00
|
|
|
@$(CC) $(CFLAGS) $(DEFS) -c $<
|
2012-03-14 22:54:31 +00:00
|
|
|
|
|
|
|
dna: $(OBJS)
|
2012-05-10 03:53:06 +00:00
|
|
|
@echo LINK $@
|
|
|
|
@$(CC) $(CFLAGS) -Wall -o $@ $(OBJS) $(LDFLAGS)
|
2012-04-20 07:27:36 +00:00
|
|
|
|
2012-06-15 05:31:14 +00:00
|
|
|
# This does not build on 64 bit elf platforms as NaCL isn't built with -fPIC
|
|
|
|
# DOC 20120615
|
2012-04-20 07:27:36 +00:00
|
|
|
libservald.so: $(OBJS)
|
2012-05-10 03:53:06 +00:00
|
|
|
@echo LINK $@
|
|
|
|
@$(CC) $(CFLAGS) -Wall -shared -o $@ $(OBJS) $(LDFLAGS)
|
2012-03-14 22:54:31 +00:00
|
|
|
|
|
|
|
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
|
2012-05-21 04:23:34 +00:00
|
|
|
clean:
|
2012-06-04 03:37:30 +00:00
|
|
|
@rm -f $(OBJS) dna libservald.so
|