Skip to content

Commit

Permalink
Split sources and headers into two directories
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrichman committed Sep 4, 2012
1 parent 8a2e089 commit 64c1811
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 30 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ ssl_cflags := $(shell pkg-config --cflags openssl)
ssl_libs := $(shell pkg-config --libs openssl)

CFLAGS = -pthread -O2 -Wall -Werror -pedantic -Wno-long-long \
-Wno-variadic-macros -Isrc \
-Wno-variadic-macros -I. \
$(jsoncpp_cflags) $(curl_cflags) $(ssl_cflags)
CFLAGS_JSONCPP = -pthread -O2 -Wall $(jsoncpp_cflags)
upl_libs = -pthread $(curl_libs) $(ssl_libs)
ext_libs = $(jsoncpp_libs)
rfc_libs = $(jsoncpp_libs)

test_py_files = tests/test_uploader.py tests/test_extractor.py
headers = src/CouchDB.h src/EZ.h src/RFC3339.h \
src/Uploader.h src/UploaderThread.h \
src/Extractor.h src/UKHASExtractor.h \
headers = $(wildcard habitat/*.h) \
tests/test_extractor_mocks.h
rfc_cxxfiles = src/RFC3339.cxx tests/test_rfc3339_main.cxx
rfc_binary = tests/rfc3339
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
habitat cpp uploader (see habitat.uploader.Uploader)
====================================================

Directories
-----------

- jsoncpp: bundled library
- habitat: headers (i.e., #include "habitat/CouchDB.h")
- src: sources

License
-------

Expand Down
2 changes: 1 addition & 1 deletion src/CouchDB.h → habitat/CouchDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <curl/curl.h>
#include "jsoncpp.h"

#include "EZ.h"
#include "habitat/EZ.h"

using namespace std;

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/Extractor.h → habitat/Extractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include <vector>
#include "jsoncpp.h"
#include "UploaderThread.h"
#include "EZ.h"
#include "habitat/UploaderThread.h"
#include "habitat/EZ.h"

using namespace std;

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/UKHASExtractor.h → habitat/UKHASExtractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef HABITAT_UKHAS_EXTRACTOR_H
#define HABITAT_UKHAS_EXTRACTOR_H

#include "Extractor.h"
#include "habitat/Extractor.h"

namespace habitat {

Expand Down
4 changes: 2 additions & 2 deletions src/Uploader.h → habitat/Uploader.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <vector>
#include <stdexcept>
#include "jsoncpp.h"
#include "EZ.h"
#include "CouchDB.h"
#include "habitat/EZ.h"
#include "habitat/CouchDB.h"

using namespace std;

Expand Down
4 changes: 2 additions & 2 deletions src/UploaderThread.h → habitat/UploaderThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#ifndef HABITAT_UPLOADERTHREAD_H
#define HABITAT_UPLOADERTHREAD_H

#include "EZ.h"
#include "Uploader.h"
#include <memory>
#include "jsoncpp.h"
#include "habitat/EZ.h"
#include "habitat/Uploader.h"

using namespace std;

Expand Down
4 changes: 2 additions & 2 deletions src/CouchDB.cxx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* Copyright 2011-2012 (C) Daniel Richman. License: GNU GPL 3; see LICENSE. */

#include "CouchDB.h"
#include "habitat/CouchDB.h"
#include <curl/curl.h>
#include <string>
#include <memory>
#include <stdexcept>
#include "EZ.h"
#include "habitat/EZ.h"

using namespace std;

Expand Down
2 changes: 1 addition & 1 deletion src/EZ.cxx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright 2011 (C) Daniel Richman. License: GNU GPL 3; see LICENSE. */

#include "EZ.h"
#include "habitat/EZ.h"
#include <curl/curl.h>
#include <pthread.h>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions src/Extractor.cxx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* Copyright 2011 (C) Daniel Richman. License: GNU GPL 3; see COPYING. */

#include "Extractor.h"
#include "habitat/Extractor.h"
#include <vector>
#include "EZ.h"
#include "habitat/EZ.h"

namespace habitat {

Expand Down
2 changes: 1 addition & 1 deletion src/RFC3339.cxx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright 2012 (C) Daniel Richman. License: GNU GPL 3; see LICENSE. */

#include "RFC3339.h"
#include "habitat/RFC3339.h"

#include <string>
#include <sstream>
Expand Down
2 changes: 1 addition & 1 deletion src/UKHASExtractor.cxx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright 2011 (C) Daniel Richman. License: GNU GPL 3; see COPYING. */

#include "UKHASExtractor.h"
#include "habitat/UKHASExtractor.h"
#include <stdexcept>
#include <string>
#include <sstream>
Expand Down
8 changes: 4 additions & 4 deletions src/Uploader.cxx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright 2011-2012 (C) Daniel Richman. License: GNU GPL 3; see LICENSE. */

#include "Uploader.h"
#include "habitat/Uploader.h"
#include <string>
#include <vector>
#include <memory>
Expand All @@ -9,9 +9,9 @@
#include <openssl/sha.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#include "CouchDB.h"
#include "EZ.h"
#include "RFC3339.h"
#include "habitat/CouchDB.h"
#include "habitat/EZ.h"
#include "habitat/RFC3339.h"

using namespace std;

Expand Down
2 changes: 1 addition & 1 deletion src/UploaderThread.cxx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright 2011-2012 (C) Daniel Richman. License: GNU GPL 3; see LICENSE. */

#include "UploaderThread.h"
#include "habitat/UploaderThread.h"
#include <stdexcept>
#include <sstream>

Expand Down
4 changes: 2 additions & 2 deletions tests/test_extractor_main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <memory>

#include "jsoncpp.h"
#include "Extractor.h"
#include "UKHASExtractor.h"
#include "habitat/Extractor.h"
#include "habitat/UKHASExtractor.h"

using namespace std;

Expand Down
2 changes: 1 addition & 1 deletion tests/test_rfc3339_main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <ctime>

#include "jsoncpp.h"
#include "RFC3339.h"
#include "habitat/RFC3339.h"

using namespace std;

Expand Down
6 changes: 3 additions & 3 deletions tests/test_uploader_main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#include <stdexcept>
#include <ctime>

#include "EZ.h"
#include "Uploader.h"
#include "habitat/EZ.h"
#include "habitat/Uploader.h"

#ifdef THREADED
#include "UploaderThread.h"
#include "habitat/UploaderThread.h"
#endif

using namespace std;
Expand Down

0 comments on commit 64c1811

Please sign in to comment.