diff options
author | tomsmeding <tom.smeding@gmail.com> | 2020-09-11 18:09:43 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2020-09-11 18:12:12 +0200 |
commit | 002689f2b046b9e29d7a28ad6bb4ec368baacaa4 (patch) | |
tree | f2589be343408a602daf509789c29002dfae3b97 | |
parent | 363c8357e8de4a2478547f1ccbdf9a7038101cec (diff) |
Add makefile flag to disable firebase support
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | main.c | 4 |
2 files changed, 8 insertions, 0 deletions
@@ -4,6 +4,10 @@ LDFLAGS := -ldl CFLAGS += $(shell pkg-config --cflags sqlite3 libsodium) LDFLAGS += $(shell pkg-config --libs sqlite3 libsodium) +ifneq ($(NO_FIREBASE),) + CFLAGS += -DNO_FIREBASE +endif + TARGETS := tomsg_server TEST_TARGET := test/main @@ -173,13 +173,17 @@ int main(int argc,char **argv){ if(argc<=1)printf("Loaded no plugins\n"); db_init(); +#ifndef NO_FIREBASE firebase_init(); +#endif int sock=create_server_socket(); printf("Listening on port %d\n",PORT); runloop_set_timeout(60*1000000,timeout_callback); runloop_add_fd(sock,server_socket_callback,false); runloop_run(); printf("Shutting down because runloop stopped\n"); +#ifndef NO_FIREBASE firebase_stop(); +#endif db_close(); } |