Browse Source

move wrapper code to own directory

pull/1669/head
idk 3 years ago
parent
commit
f9d9aa0306
No known key found for this signature in database
GPG Key ID: D75C03B39B5E14E1
  1. 14
      Makefile
  2. 2
      filelist.mk
  3. 0
      libi2pd_wrapper/api.go
  4. 0
      libi2pd_wrapper/api.swigcxx
  5. 0
      libi2pd_wrapper/capi.cpp
  6. 0
      libi2pd_wrapper/capi.h

14
Makefile

@ -5,10 +5,13 @@ SHLIB_LANG := libi2pdlang.so @@ -5,10 +5,13 @@ SHLIB_LANG := libi2pdlang.so
ARLIB_LANG := libi2pdlang.a
SHLIB_CLIENT := libi2pdclient.so
ARLIB_CLIENT := libi2pdclient.a
SHLIB_WRAP := libi2pdwrapper.so
ARLIB_WRAP := libi2pdwrapper.a
I2PD := i2pd
LIB_SRC_DIR := libi2pd
LIB_CLIENT_SRC_DIR := libi2pd_client
WRAP_SRC_DIR := libi2pd_wrapper
LANG_SRC_DIR := i18n
DAEMON_SRC_DIR := daemon
@ -56,6 +59,7 @@ NEEDED_CXXFLAGS += -MMD -MP -I$(LIB_SRC_DIR) -I$(LIB_CLIENT_SRC_DIR) -I$(LANG_SR @@ -56,6 +59,7 @@ NEEDED_CXXFLAGS += -MMD -MP -I$(LIB_SRC_DIR) -I$(LIB_CLIENT_SRC_DIR) -I$(LANG_SR
LIB_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_SRC))
LIB_CLIENT_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_CLIENT_SRC))
WRAP_LIB_OBJS += $(patsubst %.cpp,obj/%.o,$(WRAP_LIB_SRC))
LANG_OBJS += $(patsubst %.cpp,obj/%.o,$(LANG_SRC))
DAEMON_OBJS += $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC))
DEPS += $(LIB_OBJS:.o=.d) $(LIB_CLIENT_OBJS:.o=.d) $(LANG_OBJS:.o=.d) $(DAEMON_OBJS:.o=.d)
@ -68,11 +72,13 @@ mk_obj_dir: @@ -68,11 +72,13 @@ mk_obj_dir:
@mkdir -p obj/$(LIB_SRC_DIR)
@mkdir -p obj/$(LIB_CLIENT_SRC_DIR)
@mkdir -p obj/$(LANG_SRC_DIR)
@mkdir -p obj/$(WRAP_SRC_DIR)
@mkdir -p obj/$(DAEMON_SRC_DIR)
api: mk_obj_dir $(SHLIB) $(ARLIB)
client: mk_obj_dir $(SHLIB_CLIENT) $(ARLIB_CLIENT)
api_client: mk_obj_dir $(SHLIB) $(ARLIB) $(SHLIB_CLIENT) $(ARLIB_CLIENT)
wrapper: api_client $(SHLIB_WRAP) $(ARLIB_WRAP)
langs: mk_obj_dir $(LANG_OBJS) $(SHLIB_LANG) $(ARLIB_LANG)
## NOTE: The NEEDED_CXXFLAGS are here so that CXXFLAGS can be specified at build time
@ -101,6 +107,11 @@ ifneq ($(USE_STATIC),yes) @@ -101,6 +107,11 @@ ifneq ($(USE_STATIC),yes)
$(CXX) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) $(SHLIB)
endif
$(SHLIB_WRAP): $(WRAP_LIB_OBJS)
ifneq ($(USE_STATIC),yes)
$(CXX) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS)
endif
$(SHLIB_LANG): $(LANG_OBJS)
ifneq ($(USE_STATIC),yes)
$(CXX) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS)
@ -112,6 +123,9 @@ $(ARLIB): $(LIB_OBJS) @@ -112,6 +123,9 @@ $(ARLIB): $(LIB_OBJS)
$(ARLIB_CLIENT): $(LIB_CLIENT_OBJS)
$(AR) -r $@ $^
$(ARLIB_WRAP): $(LIB_OBJS)
$(AR) -r $@ $^
$(ARLIB_LANG): $(LANG_OBJS)
$(AR) -r $@ $^

2
filelist.mk

@ -21,4 +21,6 @@ LIB_CLIENT_SRC = $(wildcard $(LIB_CLIENT_SRC_DIR)/*.cpp) @@ -21,4 +21,6 @@ LIB_CLIENT_SRC = $(wildcard $(LIB_CLIENT_SRC_DIR)/*.cpp)
LANG_SRC = $(wildcard $(LANG_SRC_DIR)/*.cpp)
WRAP_LIB_SRC = $(wildcard $(WRAP_SRC_DIR)/*.cpp)
DAEMON_SRC = $(wildcard $(DAEMON_SRC_DIR)/*.cpp)

0
libi2pd/api.go → libi2pd_wrapper/api.go

0
libi2pd/api.swigcxx → libi2pd_wrapper/api.swigcxx

0
libi2pd/capi.cpp → libi2pd_wrapper/capi.cpp

0
libi2pd/capi.h → libi2pd_wrapper/capi.h

Loading…
Cancel
Save