Adding specific library build on the fly with RT-Druid
Posted: Tue Feb 20, 2018 7:14 pm
Hi
I am trying to implement a specific library built on the fly with the link, but I do no see effect in the make file.
What I did :
I did the following change c
In file conf.oil I added
EE_OPT = "__ADD_LIBS__";
LIB = ENABLE { NAME = "mylib"; };
In hiearchy ee_files/contrib I created a folder mylib with cfg, inc (includes files), src (sources files)
with in cfg.mk file
ifeq ($(call islibopt, __LIB_MYLIB__), yes)
ifeq ($(call iseeopt, __TC27xxMYLIB__), yes)
INCLUDE_PATH += $(EEBASE)/contrib/mylib/inc
endif # __TC27xxMYLIB__
endif # __LIB_MYLIB__
with in libcfg.mk file
ifeq ($(call iseeopt, __TC27xxMYLIB__), yes)
ifeq ($(findstring __LIB_MYLIB__,$(LIB_OPT)) , __LIB_MYLIB__)
INCLUDE_MYLIB = YES
endif
ifeq ($(call iseeopt, __BUILD_ALL_LIBS__), yes)
INCLUDE_MYLIB = YES
endif
ifeq ($(INCLUDE_MYLIB), YES)
INCLUDE_PATH += $(EEBASE)/contrib/mylib/inc
## Add each file individually
EE_SRCS_MYLIB += contrib/mylib/src/src0.c
## Make list of object files and add it to libraries global list
EE_OBJS_MYLIB := $(addprefix $(OBJDIR)/, $(patsubst %.c,%.o,$(patsubst %.s,%.o,$(EE_SRCS_MYLIB))))
LIBSRCS += $(EE_SRCS_MYLIB)
MYLIBLIB := libmylib.a
$(MYLIBLIB): $(EE_OBJS_MYLIB)
@echo "AR $(MYLIBLIB)";
$(QUIET)$(EE_AR) $(COMPUTED_OPT_AR) $@ $^
OPT_LIBS += $(MYLIBLIB)
ALL_LIBS += $(MYLIBLIB)
endif # INCLUDE_MYLIB
endif # __TC27xxMYLIB__
And in make file added
LIB_OPT += __LIB_MYLIB__
But in the make execution I do see libee.a for ERIKA, but not the build of my library.
Do I missed something is respective declaration, I didn't find a clear description in the wiki for this purpose.
Thanks for your help.
Phil
I am trying to implement a specific library built on the fly with the link, but I do no see effect in the make file.
What I did :
I did the following change c
In file conf.oil I added
EE_OPT = "__ADD_LIBS__";
LIB = ENABLE { NAME = "mylib"; };
In hiearchy ee_files/contrib I created a folder mylib with cfg, inc (includes files), src (sources files)
with in cfg.mk file
ifeq ($(call islibopt, __LIB_MYLIB__), yes)
ifeq ($(call iseeopt, __TC27xxMYLIB__), yes)
INCLUDE_PATH += $(EEBASE)/contrib/mylib/inc
endif # __TC27xxMYLIB__
endif # __LIB_MYLIB__
with in libcfg.mk file
ifeq ($(call iseeopt, __TC27xxMYLIB__), yes)
ifeq ($(findstring __LIB_MYLIB__,$(LIB_OPT)) , __LIB_MYLIB__)
INCLUDE_MYLIB = YES
endif
ifeq ($(call iseeopt, __BUILD_ALL_LIBS__), yes)
INCLUDE_MYLIB = YES
endif
ifeq ($(INCLUDE_MYLIB), YES)
INCLUDE_PATH += $(EEBASE)/contrib/mylib/inc
## Add each file individually
EE_SRCS_MYLIB += contrib/mylib/src/src0.c
## Make list of object files and add it to libraries global list
EE_OBJS_MYLIB := $(addprefix $(OBJDIR)/, $(patsubst %.c,%.o,$(patsubst %.s,%.o,$(EE_SRCS_MYLIB))))
LIBSRCS += $(EE_SRCS_MYLIB)
MYLIBLIB := libmylib.a
$(MYLIBLIB): $(EE_OBJS_MYLIB)
@echo "AR $(MYLIBLIB)";
$(QUIET)$(EE_AR) $(COMPUTED_OPT_AR) $@ $^
OPT_LIBS += $(MYLIBLIB)
ALL_LIBS += $(MYLIBLIB)
endif # INCLUDE_MYLIB
endif # __TC27xxMYLIB__
And in make file added
LIB_OPT += __LIB_MYLIB__
But in the make execution I do see libee.a for ERIKA, but not the build of my library.
Do I missed something is respective declaration, I didn't find a clear description in the wiki for this purpose.
Thanks for your help.
Phil