]> git.proxmox.com Git - mirror_lxc.git/blame - src/lxc/Makefile.am
make lxc_af_unix_open() safely return error on long pathnames
[mirror_lxc.git] / src / lxc / Makefile.am
CommitLineData
0ad19a3f 1pkginclude_HEADERS = \
e788178a 2 arguments.h \
1bc5cc8c 3 start.h \
d45fdd27 4 console.h \
85a31821 5 error.h \
eae6543d 6 monitor.h \
61ba7fe6
DL
7 utils.h \
8 namespace.h \
b3357a6f 9 caps.h \
0ad19a3f 10 lxc.h \
170d528e 11 cgroup.h \
13954cce 12 conf.h \
951cc719 13 list.h \
731cc33f 14 log.h \
e0732705 15 state.h \
72d0e1cb
SG
16 attach.h \
17 lxccontainer.h \
b6b918a1
SG
18 lxclock.h \
19 version.h
61ba7fe6 20
e827ff7e
SG
21if IS_BIONIC
22pkginclude_HEADERS += \
edaf8b1b
SG
23 ../include/openpty.h \
24 ../include/lxcmntent.h
e827ff7e
SG
25endif
26
1ba0013f
SG
27if !HAVE_GETLINE
28if HAVE_FGETLN
29pkginclude_HEADERS += ../include/getline.h
30endif
31endif
32
5b46e19c
CLG
33sodir=$(libdir)
34# use PROGRAMS to avoid complains from automake
35so_PROGRAMS = liblxc.so
0ad19a3f 36
5b46e19c 37liblxc_so_SOURCES = \
cda02a28 38 arguments.c arguments.h \
724e753c 39 commands.c commands.h \
563f2f2c 40 start.c start.h \
0ad19a3f 41 stop.c \
0ae4f887 42 execute.c \
0ad19a3f 43 monitor.c monitor.h \
b0a33c1e 44 console.c \
0ad19a3f 45 freezer.c \
925aaa31 46 checkpoint.c \
47 restart.c \
58412580 48 error.h error.c \
b2718c72 49 parse.c parse.h \
576f946d 50 cgroup.c cgroup.h \
0ad19a3f 51 lxc.h \
e3642c43 52 utils.c utils.h \
3c22086f 53 sync.c sync.h \
5bb3ba8a 54 namespace.h namespace.c \
13954cce 55 conf.c conf.h \
df83bf6f 56 confile.c confile.h \
951cc719 57 list.h \
35d2c3e7 58 state.c state.h \
731cc33f 59 log.c log.h \
e0732705 60 attach.c attach.h \
0ad19a3f 61 \
62 network.c network.h \
63 nl.c nl.h \
64 rtnl.c rtnl.h \
13832f48 65 genl.c genl.h \
66 \
b3357a6f 67 caps.c caps.h \
c8dee0f1 68 lxcseccomp.h \
b0a33c1e 69 mainloop.c mainloop.h \
563f2f2c
DL
70 af_unix.c af_unix.h \
71 \
565c2d76 72 lxcutmp.c lxcutmp.h \
72d0e1cb
SG
73 apparmor.c apparmor.h \
74 lxclock.h lxclock.c \
b6b918a1
SG
75 lxccontainer.c lxccontainer.h \
76 version.c version.h
0ad19a3f 77
e827ff7e
SG
78if IS_BIONIC
79liblxc_so_SOURCES += \
edaf8b1b
SG
80 ../include/openpty.c ../include/openpty.h \
81 ../include/lxcmntent.c ../include/lxcmntent.h
e827ff7e
SG
82endif
83
1ba0013f
SG
84if !HAVE_GETLINE
85if HAVE_FGETLN
86liblxc_so_SOURCES += ../include/getline.c ../include/getline.h
87endif
88endif
89
9c7c9037 90AM_CFLAGS=-I$(top_srcdir)/src \
1c41ddcb
GK
91 -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
92 -DLXCPATH=\"$(LXCPATH)\" \
2a59a681 93 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
72d0e1cb 94 -DLXCINITDIR=\"$(LXCINITDIR)\" \
5e1e7aaf
SH
95 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
96 -DLOGPATH=\"$(LOGPATH)\"
b9f94fc1 97
e075f5d9
SH
98if ENABLE_APPARMOR
99AM_CFLAGS += -DHAVE_APPARMOR
100endif
101
5e1e7aaf
SH
102if USE_CONFIGPATH_LOGS
103AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
104endif
105
8f2c3a70
SH
106if ENABLE_SECCOMP
107AM_CFLAGS += -DHAVE_SECCOMP
c8dee0f1 108liblxc_so_SOURCES += seccomp.c
8f2c3a70
SH
109endif
110
b9f94fc1 111liblxc_so_CFLAGS = -fPIC -DPIC $(AM_CFLAGS)
5b46e19c
CLG
112
113liblxc_so_LDFLAGS = \
114 -shared \
115 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,$(VERSION)))
116
20d2e91b
SG
117liblxc_so_LDADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SECCOMP_LIBS)
118
5e97c3fc 119bin_SCRIPTS = \
22e761af 120 lxc-ps \
0387b7a0 121 lxc-netstat \
237315ff 122 lxc-checkconfig \
ab2d32f8
DL
123 lxc-version \
124 lxc-create \
be8b5972 125 lxc-clone \
72be4f89 126 lxc-shutdown \
ab2d32f8 127 lxc-destroy
5e97c3fc 128
c13c0e08
SG
129EXTRA_DIST = \
130 lxc-device \
131 lxc-ls \
132 lxc-top
133
d7415aea 134if ENABLE_PYTHON
69c478da 135 bin_SCRIPTS += lxc-device
4e7186c5 136 bin_SCRIPTS += lxc-ls
d7415aea 137 bin_SCRIPTS += lxc-start-ephemeral
6a85cf91
SG
138else
139 bin_SCRIPTS += legacy/lxc-ls
d7415aea
SG
140endif
141
f080ffd7 142if ENABLE_LUA
f080ffd7
DE
143 bin_SCRIPTS += lxc-top
144endif
145
5e97c3fc 146bin_PROGRAMS = \
81c75799 147 lxc-attach \
13832f48 148 lxc-unshare \
5e97c3fc 149 lxc-stop \
150 lxc-start \
151 lxc-execute \
152 lxc-monitor \
b3ec9713 153 lxc-wait \
5e97c3fc 154 lxc-console \
5e97c3fc 155 lxc-freeze \
0ad19a3f 156 lxc-info \
576f946d 157 lxc-cgroup \
187d3a35 158 lxc-unfreeze \
925aaa31 159 lxc-checkpoint \
e4b3fe58 160 lxc-restart \
161 lxc-kill
5e97c3fc 162
ce6ce9d6 163pkglibexec_PROGRAMS = \
a25ba7aa
GT
164 lxc-init
165
2a59a681
SH
166#pkglibexec_SCRIPTS = \
167# lxc.functions
168
1c41ddcb
GK
169AM_LDFLAGS = -Wl,-E
170if ENABLE_RPATH
171AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
172endif
20d2e91b
SG
173LDADD=liblxc.so @CAP_LIBS@ @APPARMOR_LIBS@ @SECCOMP_LIBS@
174
81c75799 175lxc_attach_SOURCES = lxc_attach.c
b9f94fc1
DL
176lxc_cgroup_SOURCES = lxc_cgroup.c
177lxc_checkpoint_SOURCES = lxc_checkpoint.c
178lxc_console_SOURCES = lxc_console.c
df83bf6f 179lxc_execute_SOURCES = lxc_execute.c
5e97c3fc 180lxc_freeze_SOURCES = lxc_freeze.c
b9f94fc1
DL
181lxc_info_SOURCES = lxc_info.c
182lxc_init_SOURCES = lxc_init.c
183lxc_monitor_SOURCES = lxc_monitor.c
925aaa31 184lxc_restart_SOURCES = lxc_restart.c
b9f94fc1
DL
185lxc_start_SOURCES = lxc_start.c
186lxc_stop_SOURCES = lxc_stop.c
187lxc_unfreeze_SOURCES = lxc_unfreeze.c
188lxc_unshare_SOURCES = lxc_unshare.c
189lxc_wait_SOURCES = lxc_wait.c
e4b3fe58 190lxc_kill_SOURCES = lxc_kill.c
5b46e19c
CLG
191
192install-exec-local: install-soPROGRAMS
2a59a681
SH
193 mkdir -p $(DESTDIR)$(datadir)/lxc
194 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
5b46e19c
CLG
195 mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
196 /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
197 cd $(DESTDIR)$(libdir); \
7af3759f 198 ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \
5b46e19c
CLG
199 ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
200
201uninstall-local:
202 $(RM) $(DESTDIR)$(libdir)/liblxc.so*