From f7a46375f4a547f42fa6dbe405b29dc39569f100 Mon Sep 17 00:00:00 2001 From: Hussein Kasem Date: Thu, 2 Sep 2021 14:22:51 +0200 Subject: [PATCH] Add Makefile.conf --- .gitignore | 2 ++ src/Makefile | 16 +++++++++++----- src/Makefile.conf | 23 +++++++++++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 src/Makefile.conf diff --git a/.gitignore b/.gitignore index ad2d148..ebc436f 100644 --- a/.gitignore +++ b/.gitignore @@ -166,3 +166,5 @@ src/transport_status_code.h src/transport_status_code.c src/TransportStatusCode.kt +# Local configuration +src/local.conf diff --git a/src/Makefile b/src/Makefile index d599e25..e5a42f1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,4 +1,10 @@ -YML2PROC?=yml2proc +include Makefile.conf + +ifneq ($(wildcard local.conf),) + $(info ================================================) + $(info Overrides in `local.conf` are used.) + $(info ================================================) +endif TARGET=transport_status_code.h transport_status_code.c PEPTransportStatusCode.h TransportStatusCode.kt @@ -7,16 +13,16 @@ TSC=$(wildcard *.tsc) all: $(TARGET) transport_status_code.h: gen_c.ysl2 transport_status_code.yml2 $(TSC) - yml2proc -y $< -o $@ transport_status_code.yml2 + $(YML2_PROC) -y $< -o $@ transport_status_code.yml2 transport_status_code.c: gen_strings.ysl2 transport_status_code.yml2 $(TSC) - yml2proc -y $< -o $@ transport_status_code.yml2 + $(YML2_PROC) -y $< -o $@ transport_status_code.yml2 PEPTransportStatusCode.h: gen_objc.ysl2 transport_status_code.yml2 $(TSC) - yml2proc -y $< -o $@ transport_status_code.yml2 + $(YML2_PROC) -y $< -o $@ transport_status_code.yml2 TransportStatusCode.kt: gen_kotlin.ysl2 transport_status_code.yml2 $(TSC) - yml2proc -y $< -o $@ transport_status_code.yml2 + $(YML2_PROC) -y $< -o $@ transport_status_code.yml2 .PHONY: clean diff --git a/src/Makefile.conf b/src/Makefile.conf new file mode 100644 index 0000000..db9da2e --- /dev/null +++ b/src/Makefile.conf @@ -0,0 +1,23 @@ +# Copyright 2021, pEp Foundation +# +# This file may be used under the terms of the GNU General Public License version 3 +# see ../LICENSE.txt + +######### Header ######### +HERE:=$(dir $(lastword $(MAKEFILE_LIST))) + + +######### YML2 ######### +YML2_PATH=$(HOME)/yml2 + +YML2_PROC=$(YML2_PATH)/yml2proc $(YML2_OPTS) + +YML2_OPTS=--encoding=utf8 + + +######### Footer ######### + +################################ +# Include local.conf for any overrides and additional flags +################################ +-include $(HERE)/local.conf