Module: check_mk
Branch: master
Commit: f5d6b37b3a58c3b54feb14285645b901d3eb12b1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f5d6b37b3a58c3…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Mar 31 12:18:30 2017 +0200
Extracted standalone Makefile fragment for C++ executables.
Change-Id: I960a6c2ec5bc0d8c9edd803f5698ce89887cbe8d
---
active_checks/Makefile | 9 ++-------
bin/Makefile | 17 +----------------
standalone.make | 40 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+), 23 deletions(-)
diff --git a/active_checks/Makefile b/active_checks/Makefile
index 73ff386..de5fd73 100644
--- a/active_checks/Makefile
+++ b/active_checks/Makefile
@@ -22,10 +22,5 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-all: check_mkevents
-
-check_mkevents: check_mkevents.cc
- g++ -O2 -s -o check_mkevents check_mkevents.cc
-
-clean:
- rm -f check_mkevents
+EXECUTABLES := check_mkevents
+include ../standalone.make
diff --git a/bin/Makefile b/bin/Makefile
index 318d0f5..404d69f 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -22,20 +22,5 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-# TODO(sp) We should really use autotools here...
-ifneq ($(shell which g++-6 2>/dev/null),)
- CXX := g++-6
-else
- CXX := g++-5
-endif
-
-CXXFLAGS := -std=c++14 -g -O3 -Wall -Wextra
-LDFLAGS := -static-libstdc++
EXECUTABLES := mkevent mkeventd_open514
-
-.PHONY: all clean
-
-all: $(EXECUTABLES)
-
-clean:
- $(RM) $(EXECUTABLES)
+include ../standalone.make
diff --git a/standalone.make b/standalone.make
new file mode 100644
index 0000000..188f996
--- /dev/null
+++ b/standalone.make
@@ -0,0 +1,40 @@
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at
http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# tails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+# TODO(sp) We should really use autotools here...
+ifneq ($(shell which g++-6 2>/dev/null),)
+ CXX := g++-6 -std=c++14
+else
+ CXX := g++-5 -std=c++14
+endif
+
+CXXFLAGS := -g -O3 -Wall -Wextra
+LDFLAGS := -static-libstdc++
+
+.PHONY: all clean
+
+all: $(EXECUTABLES)
+
+clean:
+ $(RM) $(EXECUTABLES)