
9 changed files with 136 additions and 25 deletions
@ -0,0 +1,2 @@ |
|||
pEpACIDgen |
|||
pyBind11 |
@ -1,32 +1,46 @@ |
|||
include ../Makefile.conf |
|||
TARGET=$(TARGET_GEN) |
|||
include Makefile.conf |
|||
|
|||
# Specific Build settings
|
|||
CXXFLAGS+= |
|||
INCLUDES+= |
|||
LIB_DIRS+= |
|||
LIBS+= |
|||
LDFLAGS+= |
|||
TARGET=_gen.so |
|||
|
|||
TARGET_MODULE_DYN=$(TARGET) |
|||
TARGET_MODULE_STATIC=$(TARGET) |
|||
|
|||
CXX=clang |
|||
CXXFLAGS+=-std=c++11 -g |
|||
|
|||
SRCS+=$(wildcard *.cc) |
|||
OBJS+=$(SRCS:.cc=.o) |
|||
|
|||
# Combine Settings
|
|||
CXXFLAGS+=$(INCLUDES) |
|||
LDFLAGS+=$(LIB_DIRS) |
|||
LDFLAGS+=$(LIBS) |
|||
LDFLAGS_DYN+=-undefined dynamic_lookup $(LIBS_PATH) $(LIBS) |
|||
LDFLAGS_STATIC+=-undefined dynamic_lookup |
|||
|
|||
$(info -----BUILD INFO----) |
|||
$(info SRCS $(SRCS)) |
|||
$(info OBJS $(OBJS)) |
|||
|
|||
.PHONY: all gen module_dyn module_static clean |
|||
|
|||
all: static |
|||
|
|||
static: gen module_static |
|||
|
|||
dyn: gen module_dyn |
|||
|
|||
gen: |
|||
$(MAKE) -C gen |
|||
|
|||
SRCS:=$(wildcard *.cc) |
|||
OBJS:=$(SRCS:.cc=.o) |
|||
module_dyn: $(TARGET_MODULE_DYN) |
|||
|
|||
.PHONY: clean |
|||
$(TARGET_MODULE_DYN) : $(OBJS) |
|||
$(CXX) $(LDFLAGS_DYN) -o $@ $^ |
|||
|
|||
all: $(TARGET) |
|||
module_static: $(TARGET_MODULE_STATIC) |
|||
|
|||
# Using implicit compile target
|
|||
# And explicit link taget
|
|||
$(TARGET): $(OBJS) |
|||
$(CXX) $(LDFLAGS) -o $@ $^ |
|||
$(TARGET_MODULE_STATIC) : $(OBJS) $(LIBS_STATIC) |
|||
$(CXX) $(LDFLAGS_STATIC) -o $@ $^ |
|||
|
|||
clean: |
|||
rm -rf $(TARGET) |
|||
rm -rf $(OBJS) |
|||
$(MAKE) -C gen clean |
|||
rm -f $(TARGET) |
|||
rm -f $(OBJS) |
|||
|
@ -0,0 +1,12 @@ |
|||
# pyBind11 and python headers
|
|||
INCLUDES+=$(shell pybind11-config --includes) |
|||
|
|||
# example lib
|
|||
# INCLUDES+=-I../../../lib/lib_synth_shed
|
|||
|
|||
# static lib (.a)
|
|||
# LIBS_STATIC+=../../../lib/lib_synth_shed/libsynth_shed.a
|
|||
|
|||
# dynamic lib (.so)
|
|||
# LIBS+=-lsynth_shed
|
|||
# LIBS_PATH+=-L../../../lib/lib_synth_shed/
|
@ -0,0 +1,27 @@ |
|||
// This file is under GNU Affero General Public License 3.0
|
|||
// see LICENSE.txt
|
|||
|
|||
#ifndef ADAPTER_MAIN_HH |
|||
#define ADAPTER_MAIN_HH |
|||
|
|||
// Engine
|
|||
#include <pEp/pEpEngine.h> |
|||
#include <pEp/keymanagement.h> |
|||
#include <pEp/identity_list.h> |
|||
#include <pEp/key_reset.h> |
|||
#include <pEp/sync_api.h> |
|||
#include <pEp/mime.h> |
|||
#include <pEp/message.h> |
|||
#include <pEp/message_api.h> |
|||
#include <pEp/sync_codec.h> |
|||
#include <pEp/distribution_codec.h> |
|||
#include <pEp/timestamp.h> |
|||
#include <pEp/stringpair.h> |
|||
|
|||
// libpEpAdapter
|
|||
#include <pEp/Adapter.hh> |
|||
#include <pEp/callback_dispatcher.hh> |
|||
#include <pEp/status_to_string.hh> |
|||
#include <pEp/pEpLog.hh> |
|||
|
|||
#endif // ADAPTER_MAIN_HH
|
@ -0,0 +1,25 @@ |
|||
include ../Makefile.conf |
|||
|
|||
YML2_FILE=py_module.yml2 |
|||
YSL2_FILE=$(shell pEp_acid_gen-config) |
|||
PYBIND11_FILE=py_module.pybind11 |
|||
|
|||
$(info -----SYNTH_SHED GEN----) |
|||
$(info YML2_FILE $(YML2_FILE)) |
|||
$(info YSL2_FILE $(YSL2_FILE)) |
|||
$(info CC_FILE $(PYBIND11_FILE)) |
|||
|
|||
.PHONY = yml pybind11 |
|||
|
|||
all: $(PYBIND11_FILE) |
|||
|
|||
$(YML2_FILE): config.json |
|||
pEp_acid_gen $^ |
|||
|
|||
$(PYBIND11_FILE) : $(YML2_FILE) |
|||
yml2proc --encoding=utf8 -y $(YSL2_FILE) $(YML2_FILE) |
|||
|
|||
clean: |
|||
rm -f $(YML2_FILE) |
|||
rm -f $(PYBIND11_FILE) |
|||
|
@ -0,0 +1,13 @@ |
|||
{ |
|||
"module_name": "_gen", |
|||
"header_filename": "../../_pEp/adapter_main.hh", |
|||
"libclang_path": "/opt/local/libexec/llvm-9.0/lib/libclang.dylib", |
|||
"variables": [ |
|||
], |
|||
"functions": [ |
|||
"myself" |
|||
], |
|||
"debug_ast" : "True", |
|||
"debug_acid" : "True", |
|||
"debug_yml" : "True" |
|||
} |
Loading…
Reference in new issue