Removed unnecessary libclixon_netconf, functions moved to libclixon
This commit is contained in:
parent
9690e0d8f2
commit
451562ca77
2 changed files with 6 additions and 58 deletions
|
|
@ -54,7 +54,6 @@ includedir = @includedir@
|
||||||
HOST_VENDOR = @host_vendor@
|
HOST_VENDOR = @host_vendor@
|
||||||
|
|
||||||
SH_SUFFIX = @SH_SUFFIX@
|
SH_SUFFIX = @SH_SUFFIX@
|
||||||
LIBSTATIC_SUFFIX = @LIBSTATIC_SUFFIX@
|
|
||||||
|
|
||||||
CLIXON_MAJOR = @CLIXON_VERSION_MAJOR@
|
CLIXON_MAJOR = @CLIXON_VERSION_MAJOR@
|
||||||
CLIXON_MINOR = @CLIXON_VERSION_MINOR@
|
CLIXON_MINOR = @CLIXON_VERSION_MINOR@
|
||||||
|
|
@ -87,28 +86,14 @@ APPSRC += netconf_rpc.c
|
||||||
APPSRC += netconf_filter.c
|
APPSRC += netconf_filter.c
|
||||||
APPOBJ = $(APPSRC:.c=.o)
|
APPOBJ = $(APPSRC:.c=.o)
|
||||||
|
|
||||||
LIBOBJ = $(LIBSRC:.c=.o)
|
|
||||||
|
|
||||||
# Name of lib
|
|
||||||
MYNAME = clixon_netconf
|
|
||||||
MYLIBDYNAMIC = lib$(MYNAME)$(SH_SUFFIX).$(CLIXON_MAJOR).$(CLIXON_MINOR)
|
|
||||||
MYLIBSO = lib$(MYNAME)$(SH_SUFFIX).$(CLIXON_MAJOR)
|
|
||||||
MYLIBLINK = lib$(MYNAME)$(SH_SUFFIX)
|
|
||||||
MYLIBSTATIC = lib$(MYNAME)$(LIBSTATIC_SUFFIX)
|
|
||||||
|
|
||||||
all: $(APPL)
|
all: $(APPL)
|
||||||
ifeq ($(LINKAGE),dynamic)
|
|
||||||
all: $(MYLIBDYNAMIC)
|
|
||||||
else
|
|
||||||
all: $(MYSTATIC)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Dependency of clixon library (LIBDEPS)
|
# Dependency of clixon library (LIBDEPS)
|
||||||
$(top_srcdir)/lib/src/$(CLIXON_LIB):
|
$(top_srcdir)/lib/src/$(CLIXON_LIB):
|
||||||
(cd $(top_srcdir)/lib/src && $(MAKE) $(MFLAGS) $(CLIXON_LIB))
|
(cd $(top_srcdir)/lib/src && $(MAKE) $(MFLAGS) $(CLIXON_LIB))
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(APPL) $(APPOBJ) $(LIBOBJ) *.core $(MYLIBDYNAMIC) $(MYLIBSTATIC) $(MYLIBSO) $(MYLIBLINK)
|
rm -f $(APPL) $(APPOBJ) *.core
|
||||||
rm -f *.gcda *.gcno *.gcov # coverage
|
rm -f *.gcda *.gcno *.gcov # coverage
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
|
@ -118,35 +103,16 @@ distclean: clean
|
||||||
# Put other executables in libexec/
|
# Put other executables in libexec/
|
||||||
# Also create a libexec/ directory for writeable/temporary files.
|
# Also create a libexec/ directory for writeable/temporary files.
|
||||||
# Put config file in etc/
|
# Put config file in etc/
|
||||||
install: install-lib $(APPL)
|
install: $(APPL)
|
||||||
install -d -m 0755 $(DESTDIR)$(bindir)
|
install -d -m 0755 $(DESTDIR)$(bindir)
|
||||||
install -m 0755 $(INSTALLFLAGS) $(APPL) $(DESTDIR)$(bindir)
|
install -m 0755 $(INSTALLFLAGS) $(APPL) $(DESTDIR)$(bindir)
|
||||||
|
|
||||||
ifeq ($(LINKAGE),dynamic)
|
|
||||||
install-lib: $(MYLIBDYNAMIC)
|
|
||||||
install -d -m 0755 $(DESTDIR)$(libdir)
|
|
||||||
install -m 0644 $(INSTALLFLAGS) $< $(DESTDIR)$(libdir)
|
|
||||||
# install -d -m 0755 $(DESTDIR)$(libdir)/clixon/plugins/netconf
|
|
||||||
ln -sf $< $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_netconf.so.2
|
|
||||||
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_netconf.so
|
|
||||||
|
|
||||||
ln -sf $< $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_cli.so.2
|
|
||||||
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_cli.so
|
|
||||||
else
|
|
||||||
install-lib: $(MYLIBSTATIC)
|
|
||||||
install -d -m 0755 $(DESTDIR)$(libdir)
|
|
||||||
install -m 0644 $(INSTALLFLAGS) $< $(DESTDIR)$(libdir)
|
|
||||||
endif
|
|
||||||
|
|
||||||
install-include: clixon_netconf.h
|
install-include: clixon_netconf.h
|
||||||
install -d -m 0755 $(DESTDIR)$(includedir)/clixon
|
install -d -m 0755 $(DESTDIR)$(includedir)/clixon
|
||||||
install -m 0644 $^ $(DESTDIR)$(includedir)/clixon
|
install -m 0644 $^ $(DESTDIR)$(includedir)/clixon
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(bindir)/$(APPL)
|
rm -f $(DESTDIR)$(bindir)/$(APPL)
|
||||||
rm -f $(DESTDIR)$(libdir)/$(MYLIBLINK)*
|
|
||||||
rm -f $(DESTDIR)$(libdir)/$(MYLIBSTATIC)
|
|
||||||
rm -f $(DESTDIR)$(libdir)/$(MYLIBDYNAMIC)
|
|
||||||
rm -f $(DESTDIR)$(includedir)/clixon/*
|
rm -f $(DESTDIR)$(includedir)/clixon/*
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
|
@ -155,32 +121,14 @@ uninstall:
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) $(INCLUDES) $(CPPFLAGS) -D__PROGRAM__=\"$(APPL)\" $(CFLAGS) -c $<
|
$(CC) $(INCLUDES) $(CPPFLAGS) -D__PROGRAM__=\"$(APPL)\" $(CFLAGS) -c $<
|
||||||
|
|
||||||
ifeq ($(LINKAGE),dynamic)
|
|
||||||
$(APPL): $(MYLIBDYNAMIC)
|
|
||||||
else
|
|
||||||
$(APPL): $(MYLIBSTATIC)
|
|
||||||
endif
|
|
||||||
$(APPL) : $(APPOBJ) $(LIBDEPS)
|
$(APPL) : $(APPOBJ) $(LIBDEPS)
|
||||||
$(CC) $(LDFLAGS) -L. $^ $(LIBS) -o $@
|
$(CC) $(LDFLAGS) -L. $^ $(LIBS) -o $@
|
||||||
|
|
||||||
$(MYLIBDYNAMIC) : $(LIBOBJ) $(LIBDEPS)
|
|
||||||
ifeq ($(HOST_VENDOR),apple)
|
|
||||||
$(CC) $(LDFLAGS) -shared -undefined dynamic_lookup -o $@ $(LIBOBJ) $(LIBS)
|
|
||||||
else
|
|
||||||
$(CC) $(LDFLAGS) -shared -Wl,-soname,$(MYLIBSO) -o $@ $(LIBOBJ) $(LIBS) -Wl,-soname=$(MYLIBSO)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# link-name is needed for application linking, eg for clixon_cli and clixon_config
|
|
||||||
$(MYLIBLINK) : $(MYLIBDYNAMIC)
|
|
||||||
|
|
||||||
$(MYLIBSTATIC) : $(LIBOBJ) $(LIBDEPS)
|
|
||||||
ar -crs $@ $(LIBOBJ) $(LIBDEPS)
|
|
||||||
|
|
||||||
TAGS:
|
TAGS:
|
||||||
find . -name '*.[chyl]' -print | etags -
|
find . -name '*.[chyl]' -print | etags -
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
$(CC) $(DEPENDFLAGS) @DEFS@ $(INCLUDES) $(CFLAGS) -MM $(LIBSRC) $(APPSRC) > .depend
|
$(CC) $(DEPENDFLAGS) @DEFS@ $(INCLUDES) $(CFLAGS) -MM $(APPSRC) > .depend
|
||||||
|
|
||||||
#include .depend
|
#include .depend
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
#
|
#
|
||||||
# Note, for linkage=static, libclixon is linked twice:
|
# Note, for linkage=static, libclixon is linked twice:
|
||||||
# First static when building:
|
# First static when building:
|
||||||
# libclixon_backend, libclixon_cli, libclixon_restconf and libclixon_netconf
|
# libclixon_backend, libclixon_cli, and libclixon_restconf
|
||||||
# Second in this Makefile dynamic using -lclixon
|
# Second in this Makefile dynamic using -lclixon
|
||||||
# This means global variables used in plugin code is in separate domains and will not work
|
# This means global variables used in plugin code is in separate domains and will not work
|
||||||
# Dont know enough about dynamic/static linkage to fix it.
|
# Dont know enough about dynamic/static linkage to fix it.
|
||||||
|
|
@ -132,9 +132,9 @@ NETCONF_SRC = $(APPNAME)_netconf.c
|
||||||
NETCONF_OBJ = $(NETCONF_SRC:%.c=%.o)
|
NETCONF_OBJ = $(NETCONF_SRC:%.c=%.o)
|
||||||
$(NETCONF_PLUGIN): $(NETCONF_OBJ)
|
$(NETCONF_PLUGIN): $(NETCONF_OBJ)
|
||||||
ifeq ($(LINKAGE),dynamic)
|
ifeq ($(LINKAGE),dynamic)
|
||||||
$(CC) -Wall -shared $(LDFLAGS) -o $@ -lc $^ -lclixon -lclixon_netconf
|
$(CC) -Wall -shared $(LDFLAGS) -o $@ -lc $^ -lclixon
|
||||||
else
|
else
|
||||||
$(CC) -Wall -shared $(LDFLAGS) -o $@ -lc $^ -lclixon -lclixon_netconf
|
$(CC) -Wall -shared $(LDFLAGS) -o $@ -lc $^ -lclixon
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# See configure.ac
|
# See configure.ac
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue