aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2016-03-08 04:43:39 +0100
committerRobin Krahl <me@robin-krahl.de>2016-03-08 04:43:39 +0100
commit1648e81474b552ba499102e13f9f3ed863501757 (patch)
tree5bab6daabf8ee746efd9fbab3cdfabc6c498cfcc /Makefile
parent745c643c2f900c8efeb0ac0a8ea3a519b3a790ac (diff)
downloaddbfp-1648e81474b552ba499102e13f9f3ed863501757.tar.gz
dbfp-1648e81474b552ba499102e13f9f3ed863501757.tar.bz2
add rudimentary location support
The function dbfp_query_location_name performs the location.name query and returns a list of all stations that match the search term. The implementation has two flaws: there is no URL encoding, and malformatted query results will not lead to a meaningful error message. There are two new test cases: basic tests some basic functionality, as setting the API key and accessing the API. location adds a simple test for the location.name query.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 7b67ed2..e802cd4 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,8 @@ endif
CHECK_CFLAGS = $(shell pkg-config check --cflags)
CHECK_LDLIBS = $(shell pkg-config check --libs)
+CURL_LDLIBS = -lcurl
+EXPAT_LDLIBS = -lexpat
.PHONY: all check clean
@@ -24,9 +26,11 @@ clean:
$(RM) dbfp_check
$(RM) dbfp.o dbfp_check.o
-libdbfp.so: LDFLAGS = -shared
+libdbfp.so: LDFLAGS += -shared
+libdbfp.so: LDLIBS += $(CURL_LDLIBS)
+libdbfp.so: LDLIBS += $(EXPAT_LDLIBS)
libdbfp.so: dbfp.o
- $(CC) $(LDFLAGS) -o $@ $^
+ $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
dbfp_check: LDLIBS += $(CHECK_LDLIBS)
dbfp_check: LDLIBS += -ldbfp -L.