znc-push/Makefile
John Reese 77ce3e8c1a Add support for using curl instead of CSocket
When compiling with USE_CURL defined, znc push will use libcurl for
making http requests instead of ZNC's builtin CSocket library.  This
enables some advanced features, such as supporting HTTP proxies for
outbound requests.

Currently, building with curl support requires running the following:

    make curl=yes clean install

libcurl must already be installed and accessible by default.  Otherwise,
it is up to the user to populate CXXFLAGS with the appropriate values so
that znc-buildmod can appropriately find and link libcurl to the module.
2013-10-28 17:01:32 -07:00

19 lines
405 B
Makefile

version := $(shell git describe --dirty)
curl=no
ifneq ($(curl),no)
flags=-DUSE_CURL -lcurl
else
flags=
endif
push.so: push.cpp
sed -i -e "s|PUSHVERSION \".*\"|PUSHVERSION \"$(version)\"|" push.cpp
CXXFLAGS="$(CXXFLAGS) $(flags)" znc-buildmod push.cpp
sed -i -e "s|PUSHVERSION \".*\"|PUSHVERSION \"dev\"|" push.cpp
install: push.so
cp push.so $(HOME)/.znc/modules/push.so
clean:
-rm -f push.so