diff --git a/apps/netconf/Makefile.in b/apps/netconf/Makefile.in index 5ad26ef5..7f7ab0b6 100644 --- a/apps/netconf/Makefile.in +++ b/apps/netconf/Makefile.in @@ -54,7 +54,6 @@ includedir = @includedir@ HOST_VENDOR = @host_vendor@ SH_SUFFIX = @SH_SUFFIX@ -LIBSTATIC_SUFFIX = @LIBSTATIC_SUFFIX@ CLIXON_MAJOR = @CLIXON_VERSION_MAJOR@ CLIXON_MINOR = @CLIXON_VERSION_MINOR@ @@ -87,28 +86,14 @@ APPSRC += netconf_rpc.c APPSRC += netconf_filter.c 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) -ifeq ($(LINKAGE),dynamic) -all: $(MYLIBDYNAMIC) -else -all: $(MYSTATIC) -endif # Dependency of clixon library (LIBDEPS) $(top_srcdir)/lib/src/$(CLIXON_LIB): (cd $(top_srcdir)/lib/src && $(MAKE) $(MFLAGS) $(CLIXON_LIB)) clean: - rm -f $(APPL) $(APPOBJ) $(LIBOBJ) *.core $(MYLIBDYNAMIC) $(MYLIBSTATIC) $(MYLIBSO) $(MYLIBLINK) + rm -f $(APPL) $(APPOBJ) *.core rm -f *.gcda *.gcno *.gcov # coverage distclean: clean @@ -118,35 +103,16 @@ distclean: clean # Put other executables in libexec/ # Also create a libexec/ directory for writeable/temporary files. # Put config file in etc/ -install: install-lib $(APPL) +install: $(APPL) install -d -m 0755 $(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 -d -m 0755 $(DESTDIR)$(includedir)/clixon install -m 0644 $^ $(DESTDIR)$(includedir)/clixon uninstall: 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/* .SUFFIXES: @@ -155,32 +121,14 @@ uninstall: .c.o: $(CC) $(INCLUDES) $(CPPFLAGS) -D__PROGRAM__=\"$(APPL)\" $(CFLAGS) -c $< -ifeq ($(LINKAGE),dynamic) -$(APPL): $(MYLIBDYNAMIC) -else -$(APPL): $(MYLIBSTATIC) -endif $(APPL) : $(APPOBJ) $(LIBDEPS) $(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: find . -name '*.[chyl]' -print | etags - depend: - $(CC) $(DEPENDFLAGS) @DEFS@ $(INCLUDES) $(CFLAGS) -MM $(LIBSRC) $(APPSRC) > .depend + $(CC) $(DEPENDFLAGS) @DEFS@ $(INCLUDES) $(CFLAGS) -MM $(APPSRC) > .depend #include .depend diff --git a/example/main/Makefile.in b/example/main/Makefile.in index 86eb45ab..88b3f356 100644 --- a/example/main/Makefile.in +++ b/example/main/Makefile.in @@ -34,7 +34,7 @@ # # Note, for linkage=static, libclixon is linked twice: # 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 # 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. @@ -132,9 +132,9 @@ NETCONF_SRC = $(APPNAME)_netconf.c NETCONF_OBJ = $(NETCONF_SRC:%.c=%.o) $(NETCONF_PLUGIN): $(NETCONF_OBJ) ifeq ($(LINKAGE),dynamic) - $(CC) -Wall -shared $(LDFLAGS) -o $@ -lc $^ -lclixon -lclixon_netconf + $(CC) -Wall -shared $(LDFLAGS) -o $@ -lc $^ -lclixon else - $(CC) -Wall -shared $(LDFLAGS) -o $@ -lc $^ -lclixon -lclixon_netconf + $(CC) -Wall -shared $(LDFLAGS) -o $@ -lc $^ -lclixon endif # See configure.ac