Browse Source

merging

master
Volker Birk 1 month ago
parent
commit
06cfd8eebe
7 changed files with 109 additions and 9 deletions
  1. +3
    -0
      .gitignore
  2. +19
    -0
      Makefile
  3. +18
    -0
      Makefile.conf
  4. +31
    -2
      README.md
  5. +10
    -0
      local.conf.example
  6. +25
    -4
      src/Makefile
  7. +3
    -3
      src/transport.hh

+ 3
- 0
.gitignore View File

@ -167,3 +167,6 @@ src/transport_status_code.c
src/TransportStatusCode.kt
src/transport_status_code.cs
# Local configuration
src/local.conf
/local.conf

+ 19
- 0
Makefile View File

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

+ 18
- 0
Makefile.conf View File

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

+ 31
- 2
README.md View File

@ -2,7 +2,36 @@
Interfacing between transports written in different programming languages
## build dependencies
## Build dependencies
* YML 2.7.1
## Build Configuration
The build configuration file is called `local.conf`.
Use the file `local.conf.example` as a template.
```bash
cp local.conf.example local.conf
```
Then, tweak it to your needs.
## Make Targets
The default make target is `src`.
### Build
* `make src`
Generates all the headers and source files
### Install
* `make install`
Installs the header files in $PREFIX/include/pEp
* `make uninstall`
Removes all headers from $PREFIX/include/pEp
### Clean
* `make clean`
- YML 2.7.1

+ 10
- 0
local.conf.example View File

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

+ 25
- 4
src/Makefile View File

@ -1,28 +1,49 @@
<<<<<<< HEAD
YML2PROC?=yml2proc
PREFIX?=$(HOME)
TARGET=transport_status_code.h transport_status_code.c PEPTransportStatusCode.h TransportStatusCode.kt transport_status_code.cs
=======
include ../Makefile.conf
TARGET=transport_status_code.h transport_status_code.c PEPTransportStatusCode.h TransportStatusCode.kt
HEADERS=$(wildcard *.hh *.hxx *.h)
>>>>>>> 2bb9545f5ab821426612f4abad1ae202b0c9b6cb
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/
<<<<<<< HEAD
transport_status_code.cs: gen_cs.ysl2 transport_status_code.yml2 $(TSC)
yml2proc -y $< -o $@ transport_status_code.yml2
.PHONY: clean install
=======
uninstall:
cd $(PREFIX)/include/pEp && rm -vf $(HEADERS)
cd $(PREFIX)/lib && rm -vf $(TARGET)
>>>>>>> 2bb9545f5ab821426612f4abad1ae202b0c9b6cb
clean:
rm -f $(TARGET)


+ 3
- 3
src/transport.hh View File

@ -1,5 +1,5 @@
#ifdef __TRANSPORT_HH__
#define __TRANSPORT_HH__
#ifndef __PEP_TRANSPORT_HH__
#define __PEP_TRANSPORT_HH__
#include <exception>
#include <functional>
@ -67,4 +67,4 @@ namespace pEp {
};
}
#endif // __TRANSPORT_HH__
#endif // __PEP_TRANSPORT_HH__

Loading…
Cancel
Save