mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-18 20:57:56 +00:00
Assorted unknown changes. Updated Makefile.in etc to properly build serval.c for building asterisk module.
This commit is contained in:
parent
8910febc18
commit
09ca959fae
21
Makefile
21
Makefile
@ -1,20 +1,24 @@
|
||||
SRCS= dna.c server.c client.c peers.c ciphers.c responses.c packetformats.c dataformats.c \
|
||||
hlrdata.c srandomdev.c simulate.c batman.c overlay.c export.c gateway.c
|
||||
|
||||
OBJS= dna.o server.o client.o peers.o ciphers.o responses.o packetformats.o dataformats.o \
|
||||
hlrdata.o srandomdev.o simulate.o batman.o overlay.o export.o gateway.o
|
||||
HDRS= Makefile mphlr.h
|
||||
LDFLAGS=
|
||||
CFLAGS= -Os -g -Wall
|
||||
DEFS= -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_LIBC=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDIO_H=1 -DHAVE_ERRNO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_POLL_H=1 -DHAVE_NETDB_H=1
|
||||
DEFS+= -DHAVE_BZERO
|
||||
|
||||
ASTERISK_APP_OBJS= asterisk_app.o $(OBJS)
|
||||
|
||||
all: dna
|
||||
all: serval.c dna
|
||||
|
||||
%.o: %.c $(HDRS)
|
||||
$(CC) $(DEFS) $(CFLAGS) -c $<
|
||||
$(CC) $(DEFS) -Os -g -Wall -c $<
|
||||
|
||||
dna: $(OBJS)
|
||||
$(CC) $(CFLAGS) -o dna $(OBJS) $(LDFLAGS)
|
||||
$(CC) -Os -g -Wall -o dna $(OBJS) $(LDFLAGS)
|
||||
|
||||
serval.c: $(SRCS) $(HDRS)
|
||||
cat mphlr.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
|
||||
@ -39,6 +43,3 @@ testset: dna testget
|
||||
testbigset: testget
|
||||
clear
|
||||
./dna -vvv -s `cat testget | cut -f2 -d: | tail -1` -i 0 -W note=@411.txt
|
||||
|
||||
app_serval.so: $(ASTERISK_APP_OBJS)
|
||||
$(CC) $(CFLAGS) -shared -o app_serval.so $(DEFS) -DDNA_NO_MAIN $(ASTERISK_APP_OBJS) $(LDFLAGS)
|
||||
|
10
Makefile.in
Executable file → Normal file
10
Makefile.in
Executable file → Normal file
@ -1,10 +1,13 @@
|
||||
SRCS= dna.c server.c client.c peers.c ciphers.c responses.c packetformats.c dataformats.c \
|
||||
hlrdata.c srandomdev.c simulate.c batman.c overlay.c export.c gateway.c
|
||||
|
||||
OBJS= dna.o server.o client.o peers.o ciphers.o responses.o packetformats.o dataformats.o \
|
||||
hlrdata.o srandomdev.o simulate.o batman.o overlay.o export.o gateway.o
|
||||
HDRS= Makefile mphlr.h
|
||||
LDFLAGS= @LDFLAGS@
|
||||
DEFS= @DEFS@
|
||||
|
||||
all: dna
|
||||
all: serval.c dna
|
||||
|
||||
%.o: %.c $(HDRS)
|
||||
$(CC) $(DEFS) -Os -g -Wall -c $<
|
||||
@ -12,6 +15,11 @@ all: dna
|
||||
dna: $(OBJS)
|
||||
$(CC) -Os -g -Wall -o dna $(OBJS) $(LDFLAGS)
|
||||
|
||||
serval.c: $(SRCS) $(HDRS)
|
||||
cat mphlr.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
|
||||
|
@ -41,7 +41,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: Serval $")
|
||||
#include "asterisk/cdr.h"
|
||||
#include "asterisk/options.h"
|
||||
|
||||
#include "mphlr.h"
|
||||
#include "serval.c"
|
||||
|
||||
#undef inet_ntoa
|
||||
#define inet_ntoa ast_inet_ntoa
|
||||
@ -52,8 +52,6 @@ static char *sdnalookup_descrip =
|
||||
static char *sdnalookup_app = "SDNALookup";
|
||||
static char *sdnalookup_synopsis = "Resolve DID into SIP address via Serval DNA";
|
||||
|
||||
char *gatewayuri=NULL;
|
||||
|
||||
static char *handle_cli_sdnalookup(int fd, int argc, char *argv[])
|
||||
{
|
||||
char *did=NULL;
|
||||
|
0
configure.in
Executable file → Normal file
0
configure.in
Executable file → Normal file
0
dataformats.c
Executable file → Normal file
0
dataformats.c
Executable file → Normal file
0
meshpotato_build
Executable file → Normal file
0
meshpotato_build
Executable file → Normal file
0
openwrt-makefile
Executable file → Normal file
0
openwrt-makefile
Executable file → Normal file
0
packetformats.c
Executable file → Normal file
0
packetformats.c
Executable file → Normal file
0
responses.c
Executable file → Normal file
0
responses.c
Executable file → Normal file
0
simulate.c
Executable file → Normal file
0
simulate.c
Executable file → Normal file
0
srandomdev.c
Executable file → Normal file
0
srandomdev.c
Executable file → Normal file
Loading…
Reference in New Issue
Block a user