]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/Makefile.am
refactor AppArmor into LSM backend, add SELinux support
[mirror_lxc.git] / src / lxc / Makefile.am
index 70fcd257c3a2079ac927387dde77b97dbc89de2e..873b97d0443ae7e3d71dc605976ed0c8f6865c72 100644 (file)
@@ -1,26 +1,28 @@
 pkginclude_HEADERS = \
                arguments.h \
-               start.h \
-               console.h \
-               error.h \
-               monitor.h \
-               utils.h \
-               namespace.h \
+               attach.h \
+               attach_options.h \
+               bdev.h \
                caps.h \
-               lxc.h \
                cgroup.h \
                conf.h \
+               console.h \
+               error.h \
                list.h \
                log.h \
-               state.h \
-               attach.h \
                lxccontainer.h \
+               lxc.h \
                lxclock.h \
-               bdev.h \
+               monitor.h \
+               namespace.h \
+               start.h \
+               state.h \
+               utils.h \
                version.h
 
 if IS_BIONIC
 pkginclude_HEADERS += \
+       ../include/ifaddrs.h \
        ../include/openpty.h \
        ../include/lxcmntent.h
 endif
@@ -35,6 +37,18 @@ sodir=$(libdir)
 # use PROGRAMS to avoid complains from automake
 so_PROGRAMS = liblxc.so
 
+LSM_SOURCES = \
+       lsm/nop.c \
+       lsm/lsm.h lsm/lsm.c
+
+if ENABLE_APPARMOR
+LSM_SOURCES += lsm/apparmor.c
+endif
+
+if ENABLE_SELINUX
+LSM_SOURCES += lsm/selinux.c
+endif
+
 liblxc_so_SOURCES = \
        arguments.c arguments.h \
        bdev.c bdev.h \
@@ -61,9 +75,9 @@ liblxc_so_SOURCES = \
        attach.c attach.h \
        \
        network.c network.h \
-        nl.c nl.h \
-        rtnl.c rtnl.h \
-        genl.c genl.h \
+       nl.c nl.h \
+       rtnl.c rtnl.h \
+       genl.c genl.h \
        \
        caps.c caps.h \
        lxcseccomp.h \
@@ -71,13 +85,15 @@ liblxc_so_SOURCES = \
        af_unix.c af_unix.h \
        \
        lxcutmp.c lxcutmp.h \
-       apparmor.c apparmor.h \
        lxclock.h lxclock.c \
        lxccontainer.c lxccontainer.h \
-       version.c version.h
+       version.c version.h \
+       \
+       $(LSM_SOURCES)
 
 if IS_BIONIC
 liblxc_so_SOURCES += \
+       ../include/ifaddrs.c ../include/ifaddrs.h \
        ../include/openpty.c ../include/openpty.h \
        ../include/lxcmntent.c ../include/lxcmntent.h
 endif
@@ -94,12 +110,24 @@ AM_CFLAGS=-I$(top_srcdir)/src \
        -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
        -DLXCINITDIR=\"$(LXCINITDIR)\" \
        -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
-       -DLOGPATH=\"$(LOGPATH)\"
+       -DLOGPATH=\"$(LOGPATH)\" \
+       -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
+       -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
+       -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
+       -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\"
 
 if ENABLE_APPARMOR
 AM_CFLAGS += -DHAVE_APPARMOR
 endif
 
+if ENABLE_SELINUX
+AM_CFLAGS += -DHAVE_SELINUX
+endif
+
+if HAVE_NEWUIDMAP
+AM_CFLAGS += -DHAVE_NEWUIDMAP
+endif
+
 if USE_CONFIGPATH_LOGS
 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
 endif
@@ -129,15 +157,15 @@ EXTRA_DIST = \
        lxc-top
 
 if ENABLE_PYTHON
-    bin_SCRIPTS += lxc-device
-    bin_SCRIPTS += lxc-ls
-    bin_SCRIPTS += lxc-start-ephemeral
+bin_SCRIPTS += lxc-device
+bin_SCRIPTS += lxc-ls
+bin_SCRIPTS += lxc-start-ephemeral
 else
-    bin_SCRIPTS += legacy/lxc-ls
+bin_SCRIPTS += legacy/lxc-ls
 endif
 
 if ENABLE_LUA
-    bin_SCRIPTS += lxc-top
+bin_SCRIPTS += lxc-top
 endif
 
 bin_PROGRAMS = \
@@ -160,14 +188,17 @@ bin_PROGRAMS = \
        lxc-kill \
        lxc-config \
        lxc-destroy \
-    lxc-create
+       lxc-create \
+       lxc-user-nic \
+       lxc-snapshot
+
+if HAVE_NEWUIDMAP
+bin_PROGRAMS += lxc-usernsexec
+endif
 
 pkglibexec_PROGRAMS = \
        lxc-init
 
-#pkglibexec_SCRIPTS = \
-#      lxc.functions
-
 AM_LDFLAGS = -Wl,-E
 if ENABLE_RPATH
 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
@@ -195,6 +226,9 @@ lxc_unshare_SOURCES = lxc_unshare.c
 lxc_wait_SOURCES = lxc_wait.c
 lxc_kill_SOURCES = lxc_kill.c
 lxc_create_SOURCES = lxc_create.c
+lxc_snapshot_SOURCES = lxc_snapshot.c
+lxc_usernsexec_SOURCES = lxc_usernsexec.c
+lxc_user_nic_SOURCES = lxc_user_nic.c
 
 install-exec-local: install-soPROGRAMS
        mkdir -p $(DESTDIR)$(datadir)/lxc