DL6ER
ee671a11e1
Also enforce recompilation on change of headers in the subdirectories.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-05 12:06:40 +02:00
DL6ER
569925218c
Make variables in Makefile more readable by inserting underscores.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-05 12:03:38 +02:00
DL6ER
104ea1b86a
Move database thread into dedicated module.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-04 16:52:17 +02:00
DL6ER
6b2f22f9f7
Move API modules (api, request, socket, msgpack) into their own subdirectory src/api.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-04 16:38:45 +02:00
DL6ER
a2961d14a4
Merge branch 'development' into new/modularize_headers
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-04 12:21:51 +02:00
DL6ER
e365364f72
Move all source files into new subdirectory "src". Put compiled objects into new subdirectory "build".
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-02 00:18:56 +02:00
DL6ER
6b08566b0a
Rename object dir for dnsmasq files in Makefile.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-01 20:02:23 +02:00
DL6ER
5a41241440
Remove dependency of api.c on the huge header database/sqlite3.h and fix clean target.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-01 19:55:18 +02:00
DL6ER
4556b97461
Readd version.h as explicit dependency in order to have it created on-the-fly.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-01 19:50:16 +02:00
DL6ER
5eaf184bde
gravity.c has been renamed to gravity-db.c
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-01 19:46:21 +02:00
DL6ER
4db159d4fb
Move query table related routines into a new module database/query-table.o
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-01 13:46:39 +02:00
DL6ER
57116ae526
Rename database/database.c => database/common.c
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-01 13:13:13 +02:00
DL6ER
2115cdceec
Move database modules into common subdirectory
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-01 13:10:12 +02:00
DL6ER
c212c263ba
Mover timer functions in separate C file
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-06-29 23:00:34 +02:00
DL6ER
7a100aed53
Modularize header files
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-06-29 18:01:37 +02:00
DL6ER
a44d594032
Merge branch 'development' into new/networktable_ip_neigh
2019-06-25 19:58:31 +02:00
DL6ER
9d93763d43
Enable the enforcement of foreign key constraints for all database connections through a compile time flag.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-06-25 08:43:01 +02:00
Mark Drobnak
cf8430e0ba
Merge pull request #595 from pi-hole/fix/versions
...
Unify version determination mechanism
2019-06-19 11:31:40 -04:00
DL6ER
99daddb2cb
Use STATIC=true argument for make when we want a statically linked binary. The realization inside the musl container is done through an environment variable.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-06-19 03:53:02 +02:00
DL6ER
e0c3577faf
Show all GIT constants during compilation. This may be helpful during the next release to see if we can safely simplify the version function.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-06-18 22:16:16 +02:00
DL6ER
5e97e3fee7
Generate dynamic position independent executable only when not compiling statically.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-06-18 19:57:38 +02:00
DL6ER
81468d860c
Compile x86_64-musl binaryas static position independent executable (static-pie). A static position independent executable is similar to static executable, but can be loaded at any address without a dynamic linker.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-06-18 19:40:23 +02:00
DL6ER
fe177c76c5
Merge branch 'development' into tweak/musl_support
2019-06-16 20:41:03 +02:00
DL6ER
9c2114e892
Merge branch 'development' into tweak/musl_support
2019-06-14 21:22:06 +02:00
DL6ER
4c01c47977
chmod() errors may not be fatal, e.g. if the permissions are already sufficient but the user pihole-FTL is started by is not the owner
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-06-14 21:07:52 +02:00
DL6ER
993b0ffac8
Put chmod function into new file misc.c (replaces old grep.c)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-06-12 21:29:49 +02:00
DL6ER
e8e4e45d3d
Change prefix to PREFIX so users can modify its value by, e.g., make PREFIX=/usr/local install
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-05-31 14:20:33 +02:00
DL6ER
e8be023e76
Determine setcap path dynamically to support Alpine Linux
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-05-31 13:58:25 +02:00
DL6ER
68994d7d4e
Add support for DESTDIR. Fixes #558
...
The DESTDIR variable is specified by the user on the make command line as an absolute file name. For example:
make DESTDIR=/tmp/stage install
Where the installation step would normally install /usr/bin/pihole-FTL, then an installation invoked as in the example above would install /tmp/stage/usr/bin/pihole-FTL instead. The DESTDIR path is created, if necessary.
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-05-31 13:46:48 +02:00
DL6ER
fe64f4a5f2
Merge branch 'development' into new/gravityDB
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-04-24 17:20:58 +02:00
DL6ER
b42c4231cb
Add header guards
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-04-19 09:24:56 +02:00
DL6ER
854c5989cd
Add -funwind-tables to Makefile
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-04-18 21:12:26 +02:00
DL6ER
e17be51a2e
Merge branch 'development' into new/gravityDB
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-04-16 18:22:37 +02:00
DL6ER
6186cd1cf6
Check capabilities with kernel methods. Removes the need for libcap on the target system.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-17 10:57:48 +01:00
DL6ER
40b21680df
Make Makefile a bit more readable, rearrange gcc-8 extra warning description to where they belong (inside the if)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-11 07:09:43 +01:00
DL6ER
b35d817a64
Move all extra warnings unto a single variable. Remove -Wmissing-noreturn (already covered by -Wsuggest-attribute=noreturn) and -Wmissing-format-attribute (already covered by -Wsuggest-attribute=format)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-11 07:07:17 +01:00
DL6ER
0620baa6b2
Also move warning flags not understood by arm-linux-gnueabihf-gcc to gcc-8-only warning flags
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-10 19:19:09 +01:00
DL6ER
1efb2b0e46
Move gcc-8 warning flags into an appropriate if-clause
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-10 19:14:14 +01:00
DL6ER
753abc504c
Remove redundant function declarations
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-10 15:37:57 +01:00
DL6ER
0d6f424f1f
Enforce prototyping. This ensures that function that are not explicitly made globally available across files (through an explicit prototype in a header file) need to be marked static such that their scope is limited to where they are actually used. This also enforces strict prototyping, i.e., a function with zero arguments needs to be written explicitly as function(void) as a non-strict prototype such as function() would in fact allow an arbitrary amount of parameters.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-10 15:31:14 +01:00
DL6ER
cace456d4b
Add const to more char* which should have this qualifier.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-10 11:39:27 +01:00
DL6ER
77ba771b17
Add more warnings that are included by neither -Wall nor -Wextra
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-10 11:09:08 +01:00
Mark Drobnak
bbb6c79154
Merge branch 'development' into tweak/attributes
2019-03-08 23:25:38 -05:00
DL6ER
c2362bd008
Use empty ATTRIBUTEWARNINGS for gcc version < 8
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-08 12:09:06 +01:00
DL6ER
f7b0108d86
Only use new warning flags when gcc is at least in version 8 (doesn't work on the CI, otherwise)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-08 12:07:03 +01:00
DL6ER
32be41ed5d
Declare attributes for functions in FTL. These attributes help the compiler to optimize functions calls and to check our code more carefully during compilation. See pull reqeust text for details.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-08 11:36:11 +01:00
DL6ER
f14b1646fd
Remove further extern variable statements that are leftovers from pre FTLDNS times. Added comments where global variables are being used for the remaining ones.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-08 11:05:52 +01:00
DL6ER
0842524037
Add -Wshadow to extra warning flags. It defaults to -Wshadow=global and implies -Wshadow=local. Apply correspsonding changes due to shadowing of variables in the current codebase.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-03-08 10:08:11 +01:00
DL6ER
2b7f7aa404
Merge branch 'development' into new/gravityDB
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-02-22 23:15:20 +01:00
DL6ER
2f74929d2a
Merge branch 'development' into tweak/overhaul_overTime
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-02-18 19:00:09 +01:00