Makefile
author Damiano Boppart <damiano@pep-security.net>
Thu, 21 Sep 2017 15:40:02 +0200
branchENGINE-261
changeset 2084 c0f658b0289f
parent 2082 253f13cdf056
child 2085 2e4dd9ac1ad3
permissions -rw-r--r--
Merge 2 heads. Print correct warning on what overrides are used
damiano@1960
     1
# Copyright 2017, pEp Foundation
damiano@1958
     2
# This file is part of pEpEngine
damiano@1958
     3
# This file may be used under the terms of the GNU General Public License version 3
vb@1513
     4
# see LICENSE.txt
vb@1513
     5
damiano@1963
     6
HERE_REL := $(notdir $(CURDIR))
damiano@1963
     7
vb@1
     8
include Makefile.conf
vb@1
     9
damiano@1968
    10
# YML_PATH is needed in the environment of every call to a program of the YML2 distribution
damiano@1963
    11
export YML_PATH=$(YML2_PATH)
roker@878
    12
damiano@1949
    13
.PHONY: all
damiano@2082
    14
all: _override_info
vb@637
    15
	$(MAKE) -C asn.1 generate
vb@637
    16
	$(MAKE) -C asn.1
vb@742
    17
	$(MAKE) -C sync
vb@1
    18
	$(MAKE) -C src all
vb@1
    19
damiano@1949
    20
.PHONY: install
vb@637
    21
install: all
vb@1
    22
	$(MAKE) -C src install
damiano@1919
    23
	$(MAKE) -C asn.1 install
vb@1
    24
damiano@1949
    25
.PHONY: uninstall
damiano@2084
    26
uninstall: _override_info
vb@1
    27
	$(MAKE) -C src uninstall
damiano@1950
    28
	$(MAKE) -C asn.1 uninstall
vb@1
    29
damiano@1949
    30
.PHONY: clean
damiano@2084
    31
clean: _override_info
vb@1
    32
	$(MAKE) -C src clean
vb@1
    33
	$(MAKE) -C test clean
vb@364
    34
	$(MAKE) -C db clean
vb@810
    35
	$(MAKE) -C sync clean
vb@637
    36
	$(MAKE) -C asn.1 clean
vb@1
    37
damiano@1949
    38
.PHONY: test
vb@1
    39
test: all
vb@1
    40
	$(MAKE) -C test test
vb@151
    41
	$(MAKE) -C test unit_tests
vb@1
    42
damiano@1949
    43
.PHONY: unit_tests
vb@87
    44
unit_tests: all
vb@87
    45
	$(MAKE) -C test unit_tests
vb@55
    46
damiano@1949
    47
.PHONY: package
vb@1
    48
package: clean
damiano@1949
    49
	cd .. ; COPYFILE_DISABLE=true tar cjf pEpEngine.tar.bz2 "$(HERE_REL)"
vb@1
    50
damiano@1949
    51
.PHONY: db
damiano@2084
    52
db: _override_info
vb@364
    53
	$(MAKE) -C db db
krista@1989
    54
damiano@2082
    55
.PHONY: _override_info
damiano@2084
    56
_override_info: _local_conf_info _build_config_info
damiano@2084
    57
damiano@2084
    58
.PHONY: _local_conf_info
damiano@2084
    59
_local_conf_info:
damiano@2082
    60
ifneq ($(wildcard local.conf),)
damiano@2084
    61
	@echo "================================================"
damiano@2084
    62
	@echo "Overrides in `local.conf` are used."
damiano@2084
    63
	@echo "================================================"
krista@1989
    64
endif
damiano@2084
    65
damiano@2084
    66
.PHONY: _build_config_info
damiano@2084
    67
_build_config_info:
damiano@2084
    68
ifdef BUILD_CONFIG
damiano@2084
    69
	@echo "================================================"
damiano@2084
    70
	@echo "Overrides in '$(BUILD_CONFIG)' are used."
damiano@2084
    71
	@echo "================================================"
damiano@2084
    72
endif