Merge branch 'makefile-conf'
commit
cd0e3d3742
@ -0,0 +1,19 @@
|
||||
.PHONY: src test install uninstall clean
|
||||
|
||||
all: src
|
||||
|
||||
src:
|
||||
$(MAKE) -C src
|
||||
|
||||
#test: src
|
||||
# $(MAKE) -C test
|
||||
|
||||
clean:
|
||||
$(MAKE) -C src clean
|
||||
# $(MAKE) -C test clean
|
||||
|
||||
install:
|
||||
$(MAKE) -C src install
|
||||
|
||||
uninstall:
|
||||
$(MAKE) -C src uninstall
|
@ -0,0 +1,18 @@
|
||||
# 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)))
|
||||
|
||||
|
||||
# Build config
|
||||
# Defaults
|
||||
PREFIX?=$(HOME)
|
||||
YML2_PATH=$(HOME)/yml2
|
||||
YML2_PROC=$(YML2_PATH)/yml2proc $(YML2_OPTS)
|
||||
YML2_OPTS=--encoding=utf8
|
||||
|
||||
# Overrides
|
||||
-include $(HERE)local.conf
|
@ -0,0 +1,10 @@
|
||||
# This is an Example build config file (local.conf)
|
||||
# you might not need this file, but if the defaults dont work for you
|
||||
# You can override them here.
|
||||
# Tweak the values to your needs and rename it to local.conf
|
||||
|
||||
############# DIRS #############
|
||||
# PREFIX=$(HOME)/local
|
||||
# YML2_PATH=$(HOME)/yml2
|
||||
# YML2_PROC=$(YML2_PATH)/yml2proc $(YML2_OPTS)
|
||||
# YML2_OPTS=--encoding=utf8
|
@ -1,24 +1,34 @@
|
||||
YML2PROC?=yml2proc
|
||||
include ../Makefile.conf
|
||||
|
||||
TARGET=transport_status_code.h transport_status_code.c PEPTransportStatusCode.h TransportStatusCode.kt
|
||||
|
||||
HEADERS=$(wildcard *.hh *.hxx *.h)
|
||||
TSC=$(wildcard *.tsc)
|
||||
|
||||
.PHONY: install uninstall clean
|
||||
|
||||
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
|
||||
|
||||
|
||||
install: $(TARGET)
|
||||
mkdir -p $(PREFIX)/include/pEp
|
||||
mkdir -p $(PREFIX)/lib
|
||||
cp -v $(HEADERS) $(PREFIX)/include/pEp/
|
||||
|
||||
.PHONY: clean
|
||||
uninstall:
|
||||
cd $(PREFIX)/include/pEp && rm -vf $(HEADERS)
|
||||
cd $(PREFIX)/lib && rm -vf $(TARGET)
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET)
|
||||
|
Loading…
Reference in New Issue