makefile cleanup for docker and example

This commit is contained in:
Olof Hagsand 2019-02-11 21:05:24 +01:00
parent f1be029f71
commit 663088e393
2 changed files with 10 additions and 10 deletions

View file

@ -44,6 +44,8 @@ SHELL = /bin/sh
SUBDIRS = backend SUBDIRS = backend
SUBDIRS += cli SUBDIRS += cli
SUBDIRS += netconf SUBDIRS += netconf
SUBDIRS += restconf
# See configure.ac # See configure.ac
ifeq ($(with_restconf),yes) ifeq ($(with_restconf),yes)
SUBDIRS += restconf SUBDIRS += restconf

View file

@ -53,6 +53,7 @@ CFLAGS = @CFLAGS@ -rdynamic -fPIC
INSTALLFLAGS = @INSTALLFLAGS@ INSTALLFLAGS = @INSTALLFLAGS@
INCLUDES = -I$(includedir) @INCLUDES@ INCLUDES = -I$(includedir) @INCLUDES@
CPPFLAGS = @CPPFLAGS@ -fPIC
BE_PLUGIN = $(APPNAME)_backend.so BE_PLUGIN = $(APPNAME)_backend.so
BE2_PLUGIN = $(APPNAME)_backend_nacm.so BE2_PLUGIN = $(APPNAME)_backend_nacm.so
@ -61,15 +62,18 @@ NETCONF_PLUGIN = $(APPNAME)_netconf.so
RESTCONF_PLUGIN = $(APPNAME)_restconf.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) 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) all: $(PLUGINS)
.SUFFIXES: .c .o
# implicit rule
.c.o:
$(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $<
CLISPECS = $(APPNAME)_cli.cli CLISPECS = $(APPNAME)_cli.cli
YANGSPECS = clixon-example@2019-01-13.yang 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 -m 0644 $(CLISPECS) $(DESTDIR)$(libdir)/$(APPNAME)/clispec
install -d -m 0755 $(DESTDIR)$(localstatedir)/$(APPNAME) install -d -m 0755 $(DESTDIR)$(localstatedir)/$(APPNAME)
docker:
sudo docker build -t $(IMAGE) .
push:
sudo docker push $(IMAGE)
uninstall: uninstall:
echo "libdir:$(libdir)" echo "libdir:$(libdir)"
echo "libdir2:$(libdir2)" echo "libdir2:$(libdir2)"