Makefile
author Krista Bennett <krista@pep-project.org>
Mon, 25 Sep 2017 19:05:24 +0200
branchENGINE-262
changeset 2108 cf03f8593579
parent 2085 2e4dd9ac1ad3
child 2145 b7f4a200f0b0
permissions -rw-r--r--
ENGINE-262: closing branch
     1 # Copyright 2017, pEp Foundation
     2 # This file is part of pEpEngine
     3 # This file may be used under the terms of the GNU General Public License version 3
     4 # see LICENSE.txt
     5 
     6 HERE_REL := $(notdir $(CURDIR))
     7 
     8 include Makefile.conf
     9 
    10 # YML_PATH is needed in the environment of every call to a program of the YML2 distribution
    11 export YML_PATH=$(YML2_PATH)
    12 
    13 .PHONY: all
    14 all: _override_info
    15 	$(MAKE) -C asn.1 generate
    16 	$(MAKE) -C asn.1
    17 	$(MAKE) -C sync
    18 	$(MAKE) -C src all
    19 
    20 .PHONY: install
    21 install: all
    22 	$(MAKE) -C src install
    23 	$(MAKE) -C asn.1 install
    24 
    25 .PHONY: uninstall
    26 uninstall: _override_info
    27 	$(MAKE) -C src uninstall
    28 	$(MAKE) -C asn.1 uninstall
    29 
    30 .PHONY: clean
    31 clean: _override_info
    32 	$(MAKE) -C src clean
    33 	$(MAKE) -C test clean
    34 	$(MAKE) -C db clean
    35 	$(MAKE) -C sync clean
    36 	$(MAKE) -C asn.1 clean
    37 
    38 .PHONY: test
    39 test: all
    40 	$(MAKE) -C test test
    41 	$(MAKE) -C test unit_tests
    42 
    43 .PHONY: unit_tests
    44 unit_tests: all
    45 	$(MAKE) -C test unit_tests
    46 
    47 .PHONY: package
    48 package: clean
    49 	cd .. ; COPYFILE_DISABLE=true tar cjf pEpEngine.tar.bz2 "$(HERE_REL)"
    50 
    51 .PHONY: db
    52 db: _override_info
    53 	$(MAKE) -C db db
    54 
    55 .PHONY: _override_info
    56 _override_info: _local_conf_info _build_config_info
    57 
    58 .PHONY: _local_conf_info
    59 _local_conf_info:
    60 ifneq ($(wildcard local.conf),)
    61 	@echo "================================================"
    62 	@echo "Overrides in \`local.conf\` are used."
    63 	@echo "================================================"
    64 endif
    65 
    66 .PHONY: _build_config_info
    67 _build_config_info:
    68 ifdef BUILD_CONFIG
    69 	@echo "================================================"
    70 	@echo "Overrides in \`$(BUILD_CONFIG)\` are used."
    71 	@echo "================================================"
    72 endif