Makefile
author Damiano Boppart <damiano@pep-security.net>
Thu, 26 Oct 2017 15:43:22 +0200
branchENGINE-261
changeset 2210 17c30881c885
parent 2145 b7f4a200f0b0
child 2213 04052cc0c922
permissions -rw-r--r--
Add default.conf into the build system
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
damiano@2210
     8
include default.conf
vb@1
     9
damiano@1949
    10
.PHONY: all
damiano@2082
    11
all: _override_info
vb@637
    12
	$(MAKE) -C asn.1 generate
vb@637
    13
	$(MAKE) -C asn.1
vb@742
    14
	$(MAKE) -C sync
vb@1
    15
	$(MAKE) -C src all
vb@1
    16
damiano@1949
    17
.PHONY: install
vb@637
    18
install: all
vb@1
    19
	$(MAKE) -C src install
damiano@1919
    20
	$(MAKE) -C asn.1 install
vb@1
    21
damiano@1949
    22
.PHONY: uninstall
damiano@2084
    23
uninstall: _override_info
vb@1
    24
	$(MAKE) -C src uninstall
damiano@1950
    25
	$(MAKE) -C asn.1 uninstall
vb@1
    26
damiano@1949
    27
.PHONY: clean
damiano@2084
    28
clean: _override_info
vb@1
    29
	$(MAKE) -C src clean
vb@1
    30
	$(MAKE) -C test clean
vb@364
    31
	$(MAKE) -C db clean
vb@810
    32
	$(MAKE) -C sync clean
vb@637
    33
	$(MAKE) -C asn.1 clean
vb@1
    34
damiano@1949
    35
.PHONY: test
vb@1
    36
test: all
vb@1
    37
	$(MAKE) -C test test
vb@151
    38
	$(MAKE) -C test unit_tests
vb@1
    39
damiano@1949
    40
.PHONY: unit_tests
vb@87
    41
unit_tests: all
vb@87
    42
	$(MAKE) -C test unit_tests
vb@55
    43
damiano@1949
    44
.PHONY: package
vb@1
    45
package: clean
damiano@1949
    46
	cd .. ; COPYFILE_DISABLE=true tar cjf pEpEngine.tar.bz2 "$(HERE_REL)"
vb@1
    47
damiano@1949
    48
.PHONY: db
damiano@2084
    49
db: _override_info
vb@364
    50
	$(MAKE) -C db db
krista@1989
    51
damiano@2082
    52
.PHONY: _override_info
damiano@2084
    53
_override_info: _local_conf_info _build_config_info
damiano@2084
    54
damiano@2084
    55
.PHONY: _local_conf_info
damiano@2084
    56
_local_conf_info:
damiano@2082
    57
ifneq ($(wildcard local.conf),)
damiano@2084
    58
	@echo "================================================"
damiano@2085
    59
	@echo "Overrides in \`local.conf\` are used."
damiano@2084
    60
	@echo "================================================"
krista@1989
    61
endif
damiano@2084
    62
damiano@2084
    63
.PHONY: _build_config_info
damiano@2084
    64
_build_config_info:
damiano@2084
    65
ifdef BUILD_CONFIG
damiano@2084
    66
	@echo "================================================"
damiano@2085
    67
	@echo "Overrides in \`$(BUILD_CONFIG)\` are used."
damiano@2084
    68
	@echo "================================================"
damiano@2084
    69
endif