Browse code

utils/pdbt: FreeBSD fix, gcc is hardcoded, header is missing

- use CC environment variable if set
- added missing sys/stat.h header

Rick Barenthin authored on 14/03/2017 21:35:52
Showing 1 changed files
... ...
@@ -1,3 +1,11 @@
1
+#set some vars from the environment (and not make builtins)
2
+CC   := $(shell echo "$${CC}")
3
+
4
+# find compiler name & version
5
+ifeq ($(CC),)
6
+        CC=gcc
7
+endif
8
+
1 9
 .phony: all clean install
2 10
 
3 11
 header=common.h carrier.h dt.h dtm.h pdb_server_backend.h log.h
... ...
@@ -10,13 +18,13 @@ extdep=Makefile
10 18
 all: pdbt pdb_server
11 19
 
12 20
 $(obj): %.o : %.c %.h $(header) $(extdep)
13
-	gcc $(cflags) -c $<
21
+	$(CC) $(cflags) -c $<
14 22
 
15 23
 pdbt: pdbt.c $(obj) $(header) $(extdep)
16
-	gcc $(cflags) -o $@ $< $(obj)
24
+	$(CC) $(cflags) -o $@ $< $(obj)
17 25
 
18 26
 pdb_server: pdb_server.c $(pdb_server_obj) $(header) $(extdep)
19
-	gcc $(cflags) -o $@ $< $(pdb_server_obj)
27
+	$(CC) $(cflags) -o $@ $< $(pdb_server_obj)
20 28
 
21 29
 clean:
22 30
 	rm -f *~ *.o pdbt pdb_server
Browse code

pdb: new protocol between pdb_server and kama pdb module

Modified the communication protocol between the pdb clent <-> server such
that the server will give more feedback on scenarios like "pdb_id not found" or
"request number contains letters". New msg types or reply codes can be easily
added. Curent version of the protocol is 1 (0x01).
Also backwards compatibility is maintained when the first received byte is
different than the known versions (now, just 0x01).
Updated the http link for the get_carrier_germany script. Created a new perl
script to get german carrier id.
Updated doku (utils/pdbt/docs/network_protocol.txt).

added the perls script

Stefan Mititelu authored on 04/06/2015 08:34:19
Showing 1 changed files
... ...
@@ -1,8 +1,8 @@
1 1
 .phony: all clean install
2 2
 
3 3
 header=common.h carrier.h dt.h dtm.h pdb_server_backend.h log.h
4
-obj=dt.o dtm.o carrier.o pdb_server_backend.o log.o
5
-pdb_server_obj=pdb_server_backend.o dtm.o log.o
4
+obj=dt.o dtm.o carrier.o pdb_server_backend.o log.o common.o
5
+pdb_server_obj=pdb_server_backend.o dtm.o log.o common.o
6 6
 cflags=-Wall -O2 -g
7 7
 # -march=x86-64
8 8
 extdep=Makefile
Browse code

pdb: add daemon 'pdb_server' and optimising data compiler 'pdbt'

- add number portability database daemon and optimizing data compiler
- add debian packaging scripts for tool and daemon as well
- TODO:
- add documentation (run binaries with '-h' for now to get help)
- fix this redundant declaration of trie (dt* files) and logging (log*).
There exists already an implementation that uses the sr core parts for
this, but we import the proven implementation for now.
- add data helper scripts as well, they need some cleanup first
- initial implementation was done from Hardy Kahl @ 1&1 Internet Ag
- further bug fixes from Timo Reimann, timo dot reimann at 1und1 dot de

Henning Westerholt authored on 10/09/2009 16:35:05
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,27 @@
1
+.phony: all clean install
2
+
3
+header=common.h carrier.h dt.h dtm.h pdb_server_backend.h log.h
4
+obj=dt.o dtm.o carrier.o pdb_server_backend.o log.o
5
+pdb_server_obj=pdb_server_backend.o dtm.o log.o
6
+cflags=-Wall -O2 -g
7
+# -march=x86-64
8
+extdep=Makefile
9
+
10
+all: pdbt pdb_server
11
+
12
+$(obj): %.o : %.c %.h $(header) $(extdep)
13
+	gcc $(cflags) -c $<
14
+
15
+pdbt: pdbt.c $(obj) $(header) $(extdep)
16
+	gcc $(cflags) -o $@ $< $(obj)
17
+
18
+pdb_server: pdb_server.c $(pdb_server_obj) $(header) $(extdep)
19
+	gcc $(cflags) -o $@ $< $(pdb_server_obj)
20
+
21
+clean:
22
+	rm -f *~ *.o pdbt pdb_server
23
+
24
+install:
25
+	cp pdbt $(DESTDIR)/usr/bin/
26
+	cp pdb_server $(DESTDIR)/usr/bin/
27
+	cp pdb_server.conf $(DESTDIR)/etc/