From 663088e39318caf2d46d8fa17c32cecdd057a227 Mon Sep 17 00:00:00 2001 From: Olof Hagsand Date: Mon, 11 Feb 2019 21:05:24 +0100 Subject: [PATCH] makefile cleanup for docker and example --- apps/Makefile.in | 2 ++ example/Makefile.in | 18 ++++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/Makefile.in b/apps/Makefile.in index b6513757..2983fd5c 100644 --- a/apps/Makefile.in +++ b/apps/Makefile.in @@ -44,6 +44,8 @@ SHELL = /bin/sh SUBDIRS = backend SUBDIRS += cli SUBDIRS += netconf +SUBDIRS += restconf + # See configure.ac ifeq ($(with_restconf),yes) SUBDIRS += restconf diff --git a/example/Makefile.in b/example/Makefile.in index e4e60549..21bb4785 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -53,6 +53,7 @@ CFLAGS = @CFLAGS@ -rdynamic -fPIC INSTALLFLAGS = @INSTALLFLAGS@ INCLUDES = -I$(includedir) @INCLUDES@ +CPPFLAGS = @CPPFLAGS@ -fPIC BE_PLUGIN = $(APPNAME)_backend.so BE2_PLUGIN = $(APPNAME)_backend_nacm.so @@ -61,15 +62,18 @@ NETCONF_PLUGIN = $(APPNAME)_netconf.so RESTCONF_PLUGIN = $(APPNAME)_restconf.so -# Example docker image. PLEASE CHANGE THIS -IMAGE = olofhagsand/clixon_example - PLUGINS = $(BE_PLUGIN) $(BE2_PLUGIN) $(CLI_PLUGIN) $(NETCONF_PLUGIN) $(RESTCONF_PLUGIN) -.PHONY: all clean depend install docker push +.PHONY: all clean depend install all: $(PLUGINS) +.SUFFIXES: .c .o + +# implicit rule +.c.o: + $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $< + CLISPECS = $(APPNAME)_cli.cli YANGSPECS = clixon-example@2019-01-13.yang @@ -131,12 +135,6 @@ install: $(YANGSPECS) $(CLISPECS) $(BE_PLUGIN) $(BE2_PLUGIN) $(CLI_PLUGIN) $(NET install -m 0644 $(CLISPECS) $(DESTDIR)$(libdir)/$(APPNAME)/clispec install -d -m 0755 $(DESTDIR)$(localstatedir)/$(APPNAME) -docker: - sudo docker build -t $(IMAGE) . - -push: - sudo docker push $(IMAGE) - uninstall: echo "libdir:$(libdir)" echo "libdir2:$(libdir2)"