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