diff --git a/Makefile b/Makefile index a25c8b0..e8df541 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,13 @@ # -*- makefile -*- # Copyright 2011 (C) Daniel Richman. License: GNU GPL 3; see LICENSE. -CFLAGS = -pthread -O2 -Wall -Werror -pedantic -Wno-variadic-macros -Isrc -upl_libs = -pthread -ljsoncpp -lcurl -lssl -ext_libs = -ljsoncpp +jsoncpp_cflags := $(shell pkg-config --cflags jsoncpp) +jsoncpp_libs := $(shell pkg-config --libs jsoncpp) + +CFLAGS = -pthread -O2 -Wall -Werror -pedantic -Wno-long-long \ + -Wno-variadic-macros -Isrc $(jsoncpp_cflags) +upl_libs = -pthread $(jsoncpp_libs) -lcurl -lssl +ext_libs = $(jsoncpp_libs) test_py_files = tests/test_uploader.py tests/test_extractor.py headers = src/CouchDB.h src/EZ.h src/Uploader.h src/UploaderThread.h \ diff --git a/src/CouchDB.h b/src/CouchDB.h index e969b9a..2ef8ca8 100644 --- a/src/CouchDB.h +++ b/src/CouchDB.h @@ -3,7 +3,7 @@ #ifndef HABITAT_COUCHDB_H #define HABITAT_COUCHDB_H -#include +#include #include #include #include diff --git a/src/Extractor.h b/src/Extractor.h index dac1fbb..548d482 100644 --- a/src/Extractor.h +++ b/src/Extractor.h @@ -4,7 +4,7 @@ #define HABITAT_EXTRACTOR_H #include -#include +#include #include "UploaderThread.h" #include "EZ.h" diff --git a/src/UKHASExtractor.cxx b/src/UKHASExtractor.cxx index d0b5062..fe77b31 100644 --- a/src/UKHASExtractor.cxx +++ b/src/UKHASExtractor.cxx @@ -1,7 +1,7 @@ /* Copyright 2011 (C) Daniel Richman. License: GNU GPL 3; see COPYING. */ #include "UKHASExtractor.h" -#include +#include #include #include #include diff --git a/src/Uploader.h b/src/Uploader.h index b89a98e..891d92d 100644 --- a/src/Uploader.h +++ b/src/Uploader.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include "EZ.h" #include "CouchDB.h" diff --git a/src/UploaderThread.h b/src/UploaderThread.h index 344fd5f..e74cdb7 100644 --- a/src/UploaderThread.h +++ b/src/UploaderThread.h @@ -6,7 +6,7 @@ #include "EZ.h" #include "Uploader.h" #include -#include +#include using namespace std; diff --git a/tests/test_extractor_main.cxx b/tests/test_extractor_main.cxx index e05ecaa..e412e28 100644 --- a/tests/test_extractor_main.cxx +++ b/tests/test_extractor_main.cxx @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include "Extractor.h" diff --git a/tests/test_extractor_mocks.h b/tests/test_extractor_mocks.h index f1b7a3c..ca7e268 100644 --- a/tests/test_extractor_mocks.h +++ b/tests/test_extractor_mocks.h @@ -38,7 +38,7 @@ public: #include #include #include -#include +#include namespace habitat {