Makefile
changeset 1988 ea7bceda4dc8
parent 1919 335cdc692960
child 1989 d3e5bc4a9854
     1.1 --- a/Makefile	Tue Aug 22 09:08:15 2017 +0200
     1.2 +++ b/Makefile	Tue Aug 22 15:34:17 2017 +0200
     1.3 @@ -1,27 +1,33 @@
     1.4 -# this file is under GNU General Public License v3.0
     1.5 +# Copyright 2017, pEp Foundation
     1.6 +# This file is part of pEpEngine
     1.7 +# This file may be used under the terms of the GNU General Public License version 3
     1.8  # see LICENSE.txt
     1.9  
    1.10 +HERE_REL := $(notdir $(CURDIR))
    1.11 +
    1.12  include Makefile.conf
    1.13  
    1.14 -# add it to the environment of all executed programs:
    1.15 -export YML_PATH
    1.16 +# YML_PATH is needed in the environment of every call to a program of the YML2 distribution
    1.17 +export YML_PATH=$(YML2_PATH)
    1.18  
    1.19 -
    1.20 +.PHONY: all
    1.21  all:
    1.22  	$(MAKE) -C asn.1 generate
    1.23  	$(MAKE) -C asn.1
    1.24  	$(MAKE) -C sync
    1.25  	$(MAKE) -C src all
    1.26  
    1.27 -.PHONY: clean build_test test package install uninstall db
    1.28 -
    1.29 +.PHONY: install
    1.30  install: all
    1.31  	$(MAKE) -C src install
    1.32  	$(MAKE) -C asn.1 install
    1.33  
    1.34 +.PHONY: uninstall
    1.35  uninstall:
    1.36  	$(MAKE) -C src uninstall
    1.37 +	$(MAKE) -C asn.1 uninstall
    1.38  
    1.39 +.PHONY: clean
    1.40  clean:
    1.41  	$(MAKE) -C src clean
    1.42  	$(MAKE) -C test clean
    1.43 @@ -29,26 +35,19 @@
    1.44  	$(MAKE) -C sync clean
    1.45  	$(MAKE) -C asn.1 clean
    1.46  
    1.47 +.PHONY: test
    1.48  test: all
    1.49  	$(MAKE) -C test test
    1.50  	$(MAKE) -C test unit_tests
    1.51  
    1.52 +.PHONY: unit_tests
    1.53  unit_tests: all
    1.54  	$(MAKE) -C test unit_tests
    1.55  
    1.56 +.PHONY: package
    1.57  package: clean
    1.58 -	cd .. ; COPYFILE_DISABLE=true tar cjf pEpEngine.tar.bz2 pEpEngine
    1.59 +	cd .. ; COPYFILE_DISABLE=true tar cjf pEpEngine.tar.bz2 "$(HERE_REL)"
    1.60  
    1.61 +.PHONY: db
    1.62  db:
    1.63  	$(MAKE) -C db db
    1.64 -
    1.65 -windist:
    1.66 -ifneq ($(BUILD_FOR),Windoze)
    1.67 -	@echo use BUILD_FOR=Windoze \(did you forget -e ?\)
    1.68 -else
    1.69 -	make clean
    1.70 -	$(MAKE) all
    1.71 -	$(MAKE) -C test all
    1.72 -	zip -j pEpEngine-dist.zip src/pEpEngine.h src/keymanagement.h src/pEpEngine.dll src/pEpEngine.def test/pEpEngineTest.exe test/*.asc test/*.key db/*.db test/*.txt test/*.asc src/*.sql
    1.73 -endif
    1.74 -