forked from ConSol-Monitoring/omd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.omd
34 lines (26 loc) · 1.22 KB
/
Makefile.omd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# General settings included by all packages
OMD_VERSION = 2.61.20171220-labs-edition
OMD_SERIAL = 43
OMD_BASE = /omd
OMD_PHYSICAL_BASE = /opt/omd
OMD_ROOT = $(OMD_BASE)/versions/$(OMD_VERSION)
PERL = /usr/bin/perl
P5TMPDIST = $(shell pwd)/../perl-modules/dist
# Determine the distro we are running on and its version. Nasty here:
# We do not known wether we are called from the main Makefile or
# from a package Makefile. There we do not know the path to the
# 'distro' script. We simply try out both paths...
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
DISTRO_INFO = $(shell $(ROOT_DIR)/distro 2>/dev/null || ./distro)
DISTRO_NAME = $(word 1, $(DISTRO_INFO))
DISTRO_VERSION = $(word 2, $(DISTRO_INFO))
# Depending on the distro we include a Makefile with distro-
# specific variables. Here the same problem appears again.
# Maybe anyone has a simpler solution?
include $(ROOT_DIR)/distros/Makefile.$(DISTRO_NAME)_$(DISTRO_VERSION)
# Net result -> all Makefiles have now access to the linux distribution
# specific settings
MODULE_DIR=$(APACHE_MODULE_DIR)
ifeq ($(shell uname -m),x86_64)
MODULE_DIR=$(APACHE_MODULE_DIR_64)
endif