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
     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 default.conf
     9 
    10 .PHONY: all
    11 all: _override_info
    12 	$(MAKE) -C asn.1 generate
    13 	$(MAKE) -C asn.1
    14 	$(MAKE) -C sync
    15 	$(MAKE) -C src all
    16 
    17 .PHONY: install
    18 install: all
    19 	$(MAKE) -C src install
    20 	$(MAKE) -C asn.1 install
    21 
    22 .PHONY: uninstall
    23 uninstall: _override_info
    24 	$(MAKE) -C src uninstall
    25 	$(MAKE) -C asn.1 uninstall
    26 
    27 .PHONY: clean
    28 clean: _override_info
    29 	$(MAKE) -C src clean
    30 	$(MAKE) -C test clean
    31 	$(MAKE) -C db clean
    32 	$(MAKE) -C sync clean
    33 	$(MAKE) -C asn.1 clean
    34 
    35 .PHONY: test
    36 test: all
    37 	$(MAKE) -C test test
    38 	$(MAKE) -C test unit_tests
    39 
    40 .PHONY: unit_tests
    41 unit_tests: all
    42 	$(MAKE) -C test unit_tests
    43 
    44 .PHONY: package
    45 package: clean
    46 	cd .. ; COPYFILE_DISABLE=true tar cjf pEpEngine.tar.bz2 "$(HERE_REL)"
    47 
    48 .PHONY: db
    49 db: _override_info
    50 	$(MAKE) -C db db
    51 
    52 .PHONY: _override_info
    53 _override_info: _local_conf_info _build_config_info
    54 
    55 .PHONY: _local_conf_info
    56 _local_conf_info:
    57 ifneq ($(wildcard local.conf),)
    58 	@echo "================================================"
    59 	@echo "Overrides in \`local.conf\` are used."
    60 	@echo "================================================"
    61 endif
    62 
    63 .PHONY: _build_config_info
    64 _build_config_info:
    65 ifdef BUILD_CONFIG
    66 	@echo "================================================"
    67 	@echo "Overrides in \`$(BUILD_CONFIG)\` are used."
    68 	@echo "================================================"
    69 endif