diff --git a/configure.ac b/configure.ac index b1d89fb9a..1192c810f 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_ARG_ENABLE(debug, if [ ! test "x$enable_debug" != "xyes"]; then AC_DEFINE(DEBUG, 1, [Define to enable debug build]) - CXXFLAGS="-ggdb -O0 -DDEBUG -DMAPNIK_DEBUG" + CXXFLAGS="-ggdb -O0 -DDEBUG" AC_MSG_RESULT(yes) else CXXFLAGS="-O3" @@ -42,12 +42,25 @@ AC_ARG_ENABLE(profiling, if [ ! test "x$enable_profiling" != "xyes"]; then AC_DEFINE(PROFILING, 1, [Define to enable profiling build]) - #PKG_CHECK_MODULES(PROFILING, StopClock >= 0.1) PROFILING_CFLAGS="$PROFILING_CFLAGS -pg" + AC_SUBST(PROFILING_CFLAGS) else AC_MSG_RESULT(no) fi +dnl Check for option to enable tracing +AC_MSG_CHECKING(whether to enable tracing) +AC_ARG_ENABLE(tracing, + [ --enable-tracing=[no/yes] enables tracing build (default=no)],, + enable_tracing=no) + +if [ ! test "x$enable_tracing" != "xyes"]; then + TRACING_CFLAGS="-DMAPNIK_DEBUG" + AC_SUBST(TRACING_CFLAGS) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi dnl Check for boost AX_BOOST_BASE @@ -224,6 +237,7 @@ plugins/input/shape/Makefile plugins/input/osm/Makefile plugins/input/ogr/Makefile plugins/input/sqlite/Makefile +plugins/input/kismet/Makefile src/Makefile mapnik.pc mapnik-uninstalled.pc diff --git a/include/mapnik/wkb.hpp b/include/mapnik/wkb.hpp index 621d8ec53..3e206a06b 100644 --- a/include/mapnik/wkb.hpp +++ b/include/mapnik/wkb.hpp @@ -31,6 +31,18 @@ namespace mapnik { + + /*! + * From wikipedia.com: + * + * Well-known text (WKT) is a text markup language for representing vector + * geometry objects on a map, spatial reference systems of spatial objects + * and transformations between spatial reference systems. A binary equivalent, + * known as well-known binary (WKB) is used to transfer and store the same + * information on databases, such as PostGIS. The formats are regulated by + * the Open Geospatial Consortium (OGC) and described in their Simple Feature + * Access and Coordinate Transformation Service specifications. + */ enum wkbFormat { wkbGeneric=1, diff --git a/plugins/input/Makefile.am b/plugins/input/Makefile.am index 14a83dff8..768485b87 100644 --- a/plugins/input/Makefile.am +++ b/plugins/input/Makefile.am @@ -6,6 +6,7 @@ SUBDIRS = \ raster \ shape \ osm \ - sqlite + sqlite \ + kismet ## File created by the gnome-build tools diff --git a/plugins/input/gdal/Makefile.am b/plugins/input/gdal/Makefile.am index b59fb72b1..d47c4590f 100644 --- a/plugins/input/gdal/Makefile.am +++ b/plugins/input/gdal/Makefile.am @@ -5,14 +5,19 @@ pkglib_LTLIBRARIES = \ gdal_la_SOURCES = \ gdal_datasource.cpp\ - gdal_featureset.cpp + gdal_datasource.hpp\ + gdal_featureset.cpp\ + gdal_featureset.hpp gdal_la_LIBADD = \ ${GDAL_LDFLAGS} gdal_la_CXXFLAGS = \ - ${GDAL_CFLAGS} \ - -I../../../include + -Wall \ + ${PROFILING_CFLAGS} \ + ${TRACING_CFLAGS} \ + ${GDAL_CFLAGS} \ + -I../../../include gdal_la_LDFLAGS = \ -module \ diff --git a/plugins/input/kismet/Makefile.am b/plugins/input/kismet/Makefile.am new file mode 100644 index 000000000..39f9040ee --- /dev/null +++ b/plugins/input/kismet/Makefile.am @@ -0,0 +1,30 @@ +if HAVE_SQLITE3 + +pkglib_LTLIBRARIES = \ + kismet.la + +kismet_la_SOURCES = \ + kismet_datasource.cpp\ + kismet_datasource.hpp\ + kismet_featureset.cpp\ + kismet_featureset.hpp\ + kismet_types.hpp + +kismet_la_LIBADD = \ + ${SQLITE3_LDFLAGS} + +kismet_la_CXXFLAGS = \ + -Wall \ + ${PROFILING_CFLAGS} \ + ${TRACING_CFLAGS} \ + ${SQLITE3_CFLAGS} \ + -I../../../include + +kismet_la_LDFLAGS = \ + -module \ + -avoid-version \ + -shrext .input + +endif + +## File created by the gnome-build tools diff --git a/plugins/input/kismet/kismet_datasource.cpp b/plugins/input/kismet/kismet_datasource.cpp new file mode 100644 index 000000000..23b9fb56a --- /dev/null +++ b/plugins/input/kismet/kismet_datasource.cpp @@ -0,0 +1,302 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2007 Artem Pavlenko + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ +// $Id$ + +#include "kismet_datasource.hpp" +#include "kismet_featureset.hpp" + +// network +#include +#include +#include +#include +#include +#include +#include +#include + +// mapnik +#include + +// boost +#include +#include +#include +#include + +#define MAX_TCP_BUFFER 4096 // maximum accepted TCP data block size + +// If you change this also change the according sscanf line! +#define MAX_KISMET_LINE 1024 // maximum length of a kismet command (assumed) + +using boost::lexical_cast; +using boost::bad_lexical_cast; + +using mapnik::datasource; +using mapnik::parameters; + +DATASOURCE_PLUGIN(kismet_datasource) + +using mapnik::Envelope; +using mapnik::coord2d; +using mapnik::query; +using mapnik::featureset_ptr; +using mapnik::layer_descriptor; +using mapnik::attribute_descriptor; +using mapnik::datasource_exception; + +using namespace std; + +boost::mutex knd_list_mutex; +std::list knd_list; +const unsigned int queue_size = 20; + +kismet_datasource::kismet_datasource(parameters const& params) + : datasource(params), + extent_(), + extent_initialized_(false), + type_(datasource::Vector), + desc_(*params.get("type"), + *params.get("encoding","utf-8")) +{ + cout << "kismet_datasource::kismet_datasource()" << endl; + + boost::optional host = params.get("host"); + if (!host) throw datasource_exception("missing paramater"); + + boost::optional port = params.get("port"); + if (!port) throw datasource_exception("missing paramater"); + + unsigned int portnr = atoi ((*port).c_str () ); + kismet_thread.reset (new boost::thread (boost::bind (&kismet_datasource::run, this, *host, portnr))); + + boost::optional ext = params_.get("extent"); + if (ext) + { + boost::char_separator sep(","); + boost::tokenizer > tok(*ext,sep); + unsigned i = 0; + bool success = false; + double d[4]; + for (boost::tokenizer >::iterator beg=tok.begin(); + beg!=tok.end();++beg) + { + try + { + d[i] = boost::lexical_cast(*beg); + } + catch (boost::bad_lexical_cast & ex) + { + std::clog << ex.what() << "\n"; + break; + } + if (i==3) + { + success = true; + break; + } + ++i; + } + if (success) + { + extent_.init(d[0],d[1],d[2],d[3]); + extent_initialized_ = true; + } + } +} + +kismet_datasource::~kismet_datasource() +{ +} + +std::string const kismet_datasource::name_="kismet"; + +std::string kismet_datasource::name() +{ + return name_; +} + +int kismet_datasource::type() const +{ + return type_; +} + +Envelope kismet_datasource::envelope() const +{ + cout << "kismet_datasource::envelope()" << endl; + return extent_; +} + +layer_descriptor kismet_datasource::get_descriptor() const +{ + return desc_; +} + +featureset_ptr kismet_datasource::features(query const& q) const +{ + cout << "kismet_datasource::features()" << endl; + + // TODO: use Envelope to filter bbox before adding to featureset_ptr + mapnik::Envelope const& e = q.get_bbox(); + + boost::mutex::scoped_lock lock(knd_list_mutex); + return featureset_ptr (new kismet_featureset(knd_list, desc_.get_encoding())); + + // TODO: if illegal: + // return featureset_ptr(); +} + +featureset_ptr kismet_datasource::features_at_point(coord2d const& pt) const +{ + cout << "kismet_datasource::features_at_point()" << endl; + +#if 0 + if (dataset_ && layer_) + { + OGRPoint point; + point.setX (pt.x); + point.setY (pt.y); + + layer_->SetSpatialFilter (&point); + + return featureset_ptr(new ogr_featureset(*dataset_, *layer_, desc_.get_encoding())); + } +#endif + + return featureset_ptr(); +} + +void kismet_datasource::run (const std::string &ip_host, const unsigned int port) +{ + cout << "+run" << endl; + + int sockfd, n; + struct sockaddr_in sock_addr; + struct in_addr inadr; + struct hostent *host; + char buffer[MAX_TCP_BUFFER]; // TCP data send from kismet_server + string command; + + if (inet_aton(ip_host.c_str (), &inadr)) + { + host = gethostbyaddr((char *) &inadr, sizeof(inadr), AF_INET); + } + else + { + host = gethostbyname(ip_host.c_str ()); + } + + if (host == NULL) + { + herror ("Error while searching host"); + exit (1); + } + + sock_addr.sin_family = AF_INET; + sock_addr.sin_port = htons(port); + memcpy(&sock_addr.sin_addr, host->h_addr_list[0], + sizeof(sock_addr.sin_addr)); + + if ( (sockfd = socket(PF_INET, SOCK_STREAM, 0)) < 0) + { + cerr << "Error while creating socket" << endl; + } + + if (connect(sockfd, (struct sockaddr *) &sock_addr, sizeof(sock_addr))) + { + cerr << "Error while connecting" << endl; + } + + command = "!1 ENABLE NETWORK ssid,bssid,bestlat,bestlon\n"; + + if (write(sockfd, command.c_str (), command.length ()) != (signed) command.length ()) + { + cerr << "Error sending command to " << ip_host << endl; + close(sockfd); + // TODO: what to do now? + } + + char ssid[MAX_KISMET_LINE] = {}; + char bssid[MAX_KISMET_LINE] = {}; + double bestlat = 0; + double bestlon = 0; + + while ( (n = read(sockfd, buffer, sizeof(buffer))) > 0) + { + assert (n < MAX_TCP_BUFFER); + + buffer[n] = '\0'; + string bufferObj (buffer); // TCP data send from kismet_server as STL string + + //cout << "BufferObj: " << endl << bufferObj << "[END]" << endl; + + string::size_type found = 0; + string::size_type search_start = 0; + string kismet_line; // contains a line from kismet_server + do + { + found = bufferObj.find ('\n', search_start); + if (found != string::npos) + { + kismet_line.assign (bufferObj, search_start, found - search_start); + + //cout << "Line: " << kismet_line << "[ENDL]" << endl; + + int param_number = 4; // the number of parameters to parse + + // Attention: string length specified to the constant! + if (sscanf (kismet_line.c_str (), "*NETWORK: \001%1024[^\001]\001 %1024s %lf %lf", ssid, bssid, &bestlat, &bestlon) == param_number) + { + //printf ("ssid=%s, bssid=%s, bestlat=%f, bestlon=%f\n", ssid, bssid, bestlat, bestlon); + + kismet_network_data knd (ssid, bssid, bestlat, bestlon); + + boost::mutex::scoped_lock lock(knd_list_mutex); + + // the queue only grows to a max size + if (knd_list.size () >= queue_size) + { + knd_list.pop_front (); + } + + knd_list.push_back (knd); + } + else + { + // do nothing if not matched! + } + + search_start = found + 1; + } + } + while (found != string::npos); + } + + if (n < 0) + { + cerr << "Error while reading from socket" << endl; + } + + close(sockfd); + + cout << "-run" << endl; +} diff --git a/plugins/input/kismet/kismet_datasource.hpp b/plugins/input/kismet/kismet_datasource.hpp new file mode 100644 index 000000000..dc3b5210e --- /dev/null +++ b/plugins/input/kismet/kismet_datasource.hpp @@ -0,0 +1,68 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2007 Artem Pavlenko + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ +//$Id$ + +#ifndef KISMET_DATASOURCE_HPP +#define KISMET_DATASOURCE_HPP + +// STL +#include + +// mapnik +#include +#include +#include +#include + +// boost +#include +#include +#include + +// sqlite +#include "kismet_types.hpp" + +class kismet_datasource : public mapnik::datasource +{ + public: + kismet_datasource(mapnik::parameters const& params); + virtual ~kismet_datasource (); + int type() const; + static std::string name(); + mapnik::featureset_ptr features(mapnik::query const& q) const; + mapnik::featureset_ptr features_at_point(mapnik::coord2d const& pt) const; + mapnik::Envelope envelope() const; + mapnik::layer_descriptor get_descriptor() const; + + private: + void run (const std::string &host, const unsigned int port); + + static const std::string name_; + mapnik::Envelope extent_; + mutable bool extent_initialized_; + int type_; + mapnik::layer_descriptor desc_; + boost::shared_ptr kismet_thread; +}; + + +#endif // KISMET_DATASOURCE_HPP diff --git a/plugins/input/kismet/kismet_featureset.cpp b/plugins/input/kismet/kismet_featureset.cpp new file mode 100644 index 000000000..4297cdb64 --- /dev/null +++ b/plugins/input/kismet/kismet_featureset.cpp @@ -0,0 +1,95 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2007 Artem Pavlenko + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ +//$Id$ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "kismet_featureset.hpp" + +using namespace std; +using namespace mapnik; + +kismet_featureset::kismet_featureset(const std::list &knd_list, + std::string const& encoding) + : knd_list_(knd_list), + tr_(new transcoder(encoding)), + feature_id (0), + knd_list_it(knd_list_.begin ()), + source_("+proj=latlong +datum=WGS84") +{ + cout << "kismet_featureset::kismet_featureset()" << endl; +} + +kismet_featureset::~kismet_featureset() {} + +feature_ptr kismet_featureset::next() +{ + cout << "kismet_featureset::next()" << endl; + + cout << "create wlan feature: " << knd_list_.size () << endl; + + if (knd_list_it != knd_list_.end ()) + { + const kismet_network_data &knd = *knd_list_it; + + feature_ptr feature(new Feature(feature_id)); + string key = "internet_access"; + string value = "wlan"; + double outMercLongitude = 0; + double outMercLatitude = 0; + + wgs84ToMercator (knd.bestlon_, knd.bestlat_, outMercLongitude, outMercLatitude); + + mapnik::geometry2d * pt = new mapnik::point_impl; + pt->move_to(outMercLongitude, outMercLatitude); + feature->add_geometry(pt); + (*feature)[key] = tr_->transcode(value.c_str ()); + + ++feature_id; + ++knd_list_it; + + return feature; + } + + // returns empty object to mark end + return feature_ptr(); +} + +void kismet_featureset::wgs84ToMercator (double inWGS84Longitude, double inWGS84Latitude, + double &outMercLongitude, double &outMercLatitude) +{ + projection dest ("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over"); // initialize to your Map projection + proj_transform proj_tr (source_, dest); + + double z = 0.0; + proj_tr.forward (inWGS84Longitude, inWGS84Latitude, z); + + outMercLongitude = inWGS84Longitude; + outMercLatitude = inWGS84Latitude; +} diff --git a/plugins/input/kismet/kismet_featureset.hpp b/plugins/input/kismet/kismet_featureset.hpp new file mode 100644 index 000000000..17eefc884 --- /dev/null +++ b/plugins/input/kismet/kismet_featureset.hpp @@ -0,0 +1,62 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2007 Artem Pavlenko + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ +//$Id$ + +#ifndef KISMET_FEATURESET_HPP +#define KISMET_FEATURESET_HPP + +// mapnik +#include +#include +#include + +// boost +#include +#include + +//STL +#include + +#include "kismet_types.hpp" + + +class kismet_featureset : public mapnik::Featureset +{ + public: + kismet_featureset(const std::list &knd_list, + std::string const& encoding); + virtual ~kismet_featureset(); + mapnik::feature_ptr next(); + + private: + void wgs84ToMercator (double inWGS84Longitude, double inWGS84Latitude, + double &outMercLongitude, double &outMercLatitude); + const std::list &knd_list_; + boost::scoped_ptr tr_; + mapnik::wkbFormat format_; + bool multiple_geometries_; + int feature_id; + std::list::const_iterator knd_list_it; + mapnik::projection source_; +}; + +#endif // KISMET_FEATURESET_HPP diff --git a/plugins/input/kismet/kismet_types.hpp b/plugins/input/kismet/kismet_types.hpp new file mode 100644 index 000000000..041edd03e --- /dev/null +++ b/plugins/input/kismet/kismet_types.hpp @@ -0,0 +1,49 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2007 Artem Pavlenko + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ +//$Id$ + +#ifndef KISMET_TYPES_HPP +#define KISMET_TYPES_HPP + +// mapnik +#include + +// boost +#include + +class kismet_network_data +{ + public: + kismet_network_data() : bestlat_(0), bestlon_(0) {} + kismet_network_data(std::string ssid, std::string bssid, + double bestlat, double bestlon) : + ssid_(ssid), bssid_(bssid), + bestlat_(bestlat), bestlon_(bestlon) {} + + std::string ssid_; + std::string bssid_; + double bestlat_; + double bestlon_; +}; + +#endif //KISMET_TYPES_HPP + diff --git a/plugins/input/occi/Makefile.am b/plugins/input/occi/Makefile.am index 9777a63a1..557cec41a 100644 --- a/plugins/input/occi/Makefile.am +++ b/plugins/input/occi/Makefile.am @@ -5,16 +5,25 @@ pkglib_LTLIBRARIES = \ occi_la_SOURCES = \ occi_datasource.cpp\ + occi_datasource.hpp\ occi_featureset.cpp\ + occi_featureset.hpp\ spatial_classesm.cpp\ - spatial_classeso.cpp + spatial_classesm.h\ + spatial_classeso.cpp\ + spatial_classesh.h\ + occi_types.cpp\ + occi_types.hpp occi_la_LIBADD = \ - ${OCCI_LDFLAGS} + ${OCCI_LDFLAGS} occi_la_CXXFLAGS = \ - ${OCCI_CFLAGS} \ - -I../../../include + -Wall \ + ${PROFILING_CFLAGS} \ + ${TRACING_CFLAGS} \ + ${OCCI_CFLAGS} \ + -I../../../include occi_la_LDFLAGS = \ -module \ diff --git a/plugins/input/ogr/Makefile.am b/plugins/input/ogr/Makefile.am index aff568458..a3486e695 100644 --- a/plugins/input/ogr/Makefile.am +++ b/plugins/input/ogr/Makefile.am @@ -5,14 +5,20 @@ pkglib_LTLIBRARIES = \ ogr_la_SOURCES = \ ogr_datasource.cpp\ - ogr_featureset.cpp + ogr_datasource.hpp\ + ogr_featureset.cpp\ + ogr_featureset.hpp + ogr_la_LIBADD = \ - ${GDAL_LDFLAGS} + ${GDAL_LDFLAGS} ogr_la_CXXFLAGS = \ - ${GDAL_CFLAGS} \ - -I../../../include + -Wall \ + ${PROFILING_CFLAGS} \ + ${TRACING_CFLAGS} \ + ${GDAL_CFLAGS} \ + -I../../../include ogr_la_LDFLAGS = \ -module \ diff --git a/plugins/input/osm/Makefile.am b/plugins/input/osm/Makefile.am index a0cc0befd..c4a2156cf 100644 --- a/plugins/input/osm/Makefile.am +++ b/plugins/input/osm/Makefile.am @@ -5,12 +5,25 @@ pkglib_LTLIBRARIES = \ osm.la osm_la_SOURCES = \ + basiccurl.cpp\ + basiccurl.h\ + dataset_deliverer.cpp\ + dataset_deliverer.h\ osm.cpp \ + osm.h\ osm_datasource.cpp \ + osm_datasource.hpp \ osm_featureset.cpp \ - osmparser.cpp + osm_featureset.hpp \ + osmparser.cpp\ + osmparser.h\ + osmtagtypes.h\ + renderer.cpp osm_la_CXXFLAGS = \ + -Wall \ + ${PROFILING_CFLAGS} \ + ${TRACING_CFLAGS} \ -I../../../include \ ${LIBXML2_CFLAGS} diff --git a/plugins/input/postgis/Makefile.am b/plugins/input/postgis/Makefile.am index cea2c7f9a..24dc20c66 100644 --- a/plugins/input/postgis/Makefile.am +++ b/plugins/input/postgis/Makefile.am @@ -5,13 +5,22 @@ pkglib_LTLIBRARIES = \ postgis.la postgis_la_SOURCES = \ - postgis.cpp \ - postgisfs.cpp + connection.hpp\ + connection_manager.hpp\ + corsorresultset.hpp\ + postgis.cpp\ + postgis.hpp\ + postgisfs.cpp\ + property_index.hpp\ + resultset.hpp postgis_la_LIBADD = \ ${POSTGRESQL_LDFLAGS} postgis_la_CXXFLAGS = \ + -Wall \ + ${PROFILING_CFLAGS} \ + ${TRACING_CFLAGS} \ ${POSTGRESQL_CFLAGS} \ -I../../../include diff --git a/plugins/input/raster/Makefile.am b/plugins/input/raster/Makefile.am index 56c536923..39036b2ad 100644 --- a/plugins/input/raster/Makefile.am +++ b/plugins/input/raster/Makefile.am @@ -4,10 +4,16 @@ pkglib_LTLIBRARIES = \ raster_la_SOURCES = \ raster_datasource.cpp\ + raster_datasource.hpp\ raster_featureset.cpp\ - raster_info.cpp + raster_featureset.hpp\ + raster_info.cpp\ + raster_info.hpp raster_la_CXXFLAGS = \ + -Wall \ + ${PROFILING_CFLAGS} \ + ${TRACING_CFLAGS} \ -I../../../include raster_la_LDFLAGS = \ diff --git a/plugins/input/shape/Makefile.am b/plugins/input/shape/Makefile.am index 58e335922..63295e287 100644 --- a/plugins/input/shape/Makefile.am +++ b/plugins/input/shape/Makefile.am @@ -3,15 +3,24 @@ pkglib_LTLIBRARIES = \ shape.la shape_la_SOURCES = \ - dbffile.cpp \ - dbf_test.cpp \ - shape.cpp \ - shape_featureset.cpp \ - shapefile.cpp \ - shape_index_featureset.cpp \ - shape_io.cpp + dbffile.cpp\ + dbffile.hpp\ + shape.cpp\ + shape.hpp\ + shape_featureset.cpp\ + shape_featureset.hpp\ + shapefile.cpp\ + shapefile.hpp\ + shape_index_featureset.cpp\ + shape_index_featureset.hpp\ + shape_io.cpp\ + shape_io.hpp\ + shp_index.hpp shape_la_CXXFLAGS = \ + -Wall \ + ${PROFILING_CFLAGS} \ + ${TRACING_CFLAGS} \ -I../../../include shape_la_LDFLAGS = \ diff --git a/plugins/input/sqlite/Makefile.am b/plugins/input/sqlite/Makefile.am index 31470ed90..7fb0aa0de 100644 --- a/plugins/input/sqlite/Makefile.am +++ b/plugins/input/sqlite/Makefile.am @@ -5,14 +5,20 @@ pkglib_LTLIBRARIES = \ sqlite_la_SOURCES = \ sqlite_datasource.cpp\ - sqlite_featureset.cpp + sqlite_datasource.hpp\ + sqlite_featureset.cpp\ + sqlite_featureset.hpp\ + sqlite_types.hpp sqlite_la_LIBADD = \ - ${SQLITE3_LDFLAGS} + ${SQLITE3_LDFLAGS} sqlite_la_CXXFLAGS = \ - ${SQLITE3_CFLAGS} \ - -I../../../include + -Wall \ + ${PROFILING_CFLAGS} \ + ${TRACING_CFLAGS} \ + ${SQLITE3_CFLAGS} \ + -I../../../include sqlite_la_LDFLAGS = \ -module \ diff --git a/src/Makefile.am b/src/Makefile.am index 6df4a180d..38af6fbd8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -79,8 +79,9 @@ libmapnik_la_LIBADD = \ libmapnik_la_CXXFLAGS = \ -I../include \ - ${PROFILING_CFLAGS} \ - ${PNG_CFLAGS} \ + ${PROFILING_CFLAGS} \ + ${TRACING_CFLAGS} \ + ${PNG_CFLAGS} \ ${FREETYPE2_CFLAGS} \ ${AGG_CFLAGS} \ ${JPEG_CFLAGS} \