mirror of
https://github.com/HackHerz/pusher
synced 2025-12-06 02:10:19 +00:00
Build system added...
This commit is contained in:
parent
b403801750
commit
aa23eef9cf
3 changed files with 4248 additions and 0 deletions
45
configure.ac
Normal file
45
configure.ac
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
# Process this file with autoconf to create a configure script
|
||||||
|
# (c) 2014 Daniel Stein
|
||||||
|
|
||||||
|
AC_INIT([pusher], [0.2], [d.stein@hackherz.com])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# tests
|
||||||
|
## compiler
|
||||||
|
AC_PROG_CXX
|
||||||
|
AC_LANG(C++)
|
||||||
|
|
||||||
|
GXX_VERSION="`$CXX -dumpversion`"
|
||||||
|
|
||||||
|
|
||||||
|
## check for headers
|
||||||
|
AC_CHECK_HEADERS(iostream string sstream fstream vector)
|
||||||
|
|
||||||
|
|
||||||
|
## check for libraries
|
||||||
|
AC_LANG_PUSH([C++])
|
||||||
|
AC_CHECK_HEADERS([boost/foreach.hpp], [], [AC_MSG_ERROR(You need the Boost libraries.)])
|
||||||
|
AC_CHECK_HEADERS([boost/format.hpp], [], [AC_MSG_ERROR(You need the Boost libraries.)])
|
||||||
|
AC_CHECK_HEADERS([boost/property_tree/ptree.hpp], [], [AC_MSG_ERROR(You need the Boost libraries.)])
|
||||||
|
AC_CHECK_HEADERS([boost/property_tree/ini_parser.hpp], [], [AC_MSG_ERROR(You need the Boost libraries.)])
|
||||||
|
AC_CHECK_HEADERS([boost/program_options.hpp], [], [AC_MSG_ERROR(You need the Boost Program Options library.)])
|
||||||
|
AC_CHECK_HEADERS([curl/curl.h], [], [AC_MSG_ERROR(You need the curl libraries.)])
|
||||||
|
AC_LANG_POP([C++])
|
||||||
|
|
||||||
|
|
||||||
|
# write makefile
|
||||||
|
AC_OUTPUT(makefile)
|
||||||
|
|
||||||
|
|
||||||
|
# output
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
Configured for building ${PACKAGE_NAME} ${PACKAGE_VERSION}
|
||||||
|
|
||||||
|
Compiler .................................... ${CXX}
|
||||||
|
Compiler version ............................ ${GXX_VERSION}
|
||||||
|
|
||||||
|
Configure finished. Do 'make' to compile.
|
||||||
|
EOF
|
||||||
|
|
||||||
29
makefile.in
Normal file
29
makefile.in
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
# compiler
|
||||||
|
CXX = @CXX@
|
||||||
|
CFLAGS = -Wall -Werror
|
||||||
|
CFLAGS += -std=c++11
|
||||||
|
|
||||||
|
|
||||||
|
# librarys
|
||||||
|
LDLIBS = -lcurl
|
||||||
|
LDLIBS += -lboost_program_options
|
||||||
|
|
||||||
|
|
||||||
|
# details
|
||||||
|
SOURCES = src/*.cpp
|
||||||
|
TARGET = @PACKAGE_NAME@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(TARGET):
|
||||||
|
$(CXX) -o $(TARGET) $(CFLAGS) $(SOURCES) $(LDLIBS)
|
||||||
|
|
||||||
|
install: $(TARGET)
|
||||||
|
mv $(TARGET) /usr/bin
|
||||||
|
|
||||||
|
remove:
|
||||||
|
rm -f /usr/bin/$(TARGET)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(TARGET)
|
||||||
|
rm -f makefile
|
||||||
Loading…
Add table
Add a link
Reference in a new issue