From 09ca959faed17663df90a84d39f25793690d5ce3 Mon Sep 17 00:00:00 2001 From: gardners Date: Wed, 15 Jun 2011 13:52:30 +0930 Subject: [PATCH] Assorted unknown changes. Updated Makefile.in etc to properly build serval.c for building asterisk module. --- Makefile | 21 +++++++++++---------- Makefile.in | 10 +++++++++- TODO | 0 asterisk_app.c | 4 +--- batman.c | 0 ciphers.c | 0 client.c | 0 configure.in | 0 dataformats.c | 0 hlrdata.c | 0 meshpotato_build | 0 openwrt-makefile | 0 packetformats.c | 0 peers.c | 0 responses.c | 0 simulate.c | 0 srandomdev.c | 0 testdna | 0 18 files changed, 21 insertions(+), 14 deletions(-) mode change 100755 => 100644 Makefile.in mode change 100755 => 100644 TODO mode change 100755 => 100644 batman.c mode change 100755 => 100644 ciphers.c mode change 100755 => 100644 client.c mode change 100755 => 100644 configure.in mode change 100755 => 100644 dataformats.c mode change 100755 => 100644 hlrdata.c mode change 100755 => 100644 meshpotato_build mode change 100755 => 100644 openwrt-makefile mode change 100755 => 100644 packetformats.c mode change 100755 => 100644 peers.c mode change 100755 => 100644 responses.c mode change 100755 => 100644 simulate.c mode change 100755 => 100644 srandomdev.c mode change 100755 => 100644 testdna diff --git a/Makefile b/Makefile index 0bde8c5c..d366ef32 100644 --- a/Makefile +++ b/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 ' >>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) diff --git a/Makefile.in b/Makefile.in old mode 100755 new mode 100644 index 52ac811b..050f3dc0 --- a/Makefile.in +++ b/Makefile.in @@ -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 ' >>serval.c + cat $(SRCS) | grep -v "#include" | sed -e 's/inet_ntoa/ast_inet_ntoa/g' >>serval.c + testserver: dna clear rm hlr.dat diff --git a/TODO b/TODO old mode 100755 new mode 100644 diff --git a/asterisk_app.c b/asterisk_app.c index 0ebf7ea5..d110d695 100644 --- a/asterisk_app.c +++ b/asterisk_app.c @@ -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; diff --git a/batman.c b/batman.c old mode 100755 new mode 100644 diff --git a/ciphers.c b/ciphers.c old mode 100755 new mode 100644 diff --git a/client.c b/client.c old mode 100755 new mode 100644 diff --git a/configure.in b/configure.in old mode 100755 new mode 100644 diff --git a/dataformats.c b/dataformats.c old mode 100755 new mode 100644 diff --git a/hlrdata.c b/hlrdata.c old mode 100755 new mode 100644 diff --git a/meshpotato_build b/meshpotato_build old mode 100755 new mode 100644 diff --git a/openwrt-makefile b/openwrt-makefile old mode 100755 new mode 100644 diff --git a/packetformats.c b/packetformats.c old mode 100755 new mode 100644 diff --git a/peers.c b/peers.c old mode 100755 new mode 100644 diff --git a/responses.c b/responses.c old mode 100755 new mode 100644 diff --git a/simulate.c b/simulate.c old mode 100755 new mode 100644 diff --git a/srandomdev.c b/srandomdev.c old mode 100755 new mode 100644 diff --git a/testdna b/testdna old mode 100755 new mode 100644