Browse Source

Add Makefile.conf

makefile-conf
Hussein Kasem 2 months ago
parent
commit
f7a46375f4
Signed by: huss GPG Key ID: 9E61B9BC790E6B02
3 changed files with 36 additions and 5 deletions
  1. +2
    -0
      .gitignore
  2. +11
    -5
      src/Makefile
  3. +23
    -0
      src/Makefile.conf

+ 2
- 0
.gitignore View File

@ -166,3 +166,5 @@ src/transport_status_code.h
src/transport_status_code.c
src/TransportStatusCode.kt
# Local configuration
src/local.conf

+ 11
- 5
src/Makefile View File

@ -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


+ 23
- 0
src/Makefile.conf View File

@ -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

Loading…
Cancel
Save