serval-dna/Makefile.in

98 lines
1.8 KiB
Makefile
Raw Normal View History

SRCS= batman.c \
ciphers.c \
client.c \
commandline.c \
dataformats.c \
dna.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 \
pa_phone.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 \
vomp.c
2012-04-19 06:18:00 +00:00
OBJS= $(SRCS:.c=.o)
HDRS= fifo.h \
Makefile \
rhizome.h \
serval.h \
sha2.h \
sqlite-amalgamation-3070900/sqlite3.h
LDFLAGS=@LDFLAGS@
2012-04-23 05:58:00 +00:00
CFLAGS= @CPPFLAGS@ @CFLAGS@
DEFS= @DEFS@
all: serval.c dna libservald.so
sqlite3.o: sqlite3.c
$(CC) $(CFLAGS) $(DEFS) -Wall -c $<
%.o: %.c $(HDRS)
$(CC) $(CFLAGS) $(DEFS) -Wall -c $<
dna: $(OBJS)
$(CC) $(CFLAGS) -Wall -o $@ $(OBJS) $(LDFLAGS)
libservald.so: $(OBJS)
$(CC) $(CFLAGS) -Wall -shared -o $@ $(OBJS) $(LDFLAGS)
serval.c: $(SRCS) $(HDRS)
cat serval.h > serval.c
echo '#include <sys/mman.h>' >>serval.c
cat $(SRCS) | grep -v "#include" | sed -e 's/inet_ntoa/ast_inet_ntoa/g' >>serval.c
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