]> git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/Makefile.am
use a default per-container logfile
[mirror_lxc.git] / src / lxc / Makefile.am
1 pkginclude_HEADERS = \
2 arguments.h \
3 start.h \
4 console.h \
5 error.h \
6 monitor.h \
7 utils.h \
8 namespace.h \
9 caps.h \
10 lxc.h \
11 cgroup.h \
12 conf.h \
13 list.h \
14 log.h \
15 state.h \
16 attach.h \
17 lxccontainer.h \
18 lxclock.h
19
20 if IS_BIONIC
21 pkginclude_HEADERS += \
22 ../include/openpty.h \
23 ../include/lxcmntent.h
24 endif
25
26 if !HAVE_GETLINE
27 if HAVE_FGETLN
28 pkginclude_HEADERS += ../include/getline.h
29 endif
30 endif
31
32 sodir=$(libdir)
33 # use PROGRAMS to avoid complains from automake
34 so_PROGRAMS = liblxc.so
35
36 liblxc_so_SOURCES = \
37 arguments.c arguments.h \
38 commands.c commands.h \
39 start.c start.h \
40 stop.c \
41 execute.c \
42 monitor.c monitor.h \
43 console.c \
44 freezer.c \
45 checkpoint.c \
46 restart.c \
47 error.h error.c \
48 parse.c parse.h \
49 cgroup.c cgroup.h \
50 lxc.h \
51 utils.c utils.h \
52 sync.c sync.h \
53 namespace.h namespace.c \
54 conf.c conf.h \
55 confile.c confile.h \
56 list.h \
57 state.c state.h \
58 log.c log.h \
59 attach.c attach.h \
60 \
61 network.c network.h \
62 nl.c nl.h \
63 rtnl.c rtnl.h \
64 genl.c genl.h \
65 \
66 caps.c caps.h \
67 lxcseccomp.h \
68 mainloop.c mainloop.h \
69 af_unix.c af_unix.h \
70 \
71 lxcutmp.c lxcutmp.h \
72 apparmor.c apparmor.h \
73 lxclock.h lxclock.c \
74 lxccontainer.c lxccontainer.h
75
76 if IS_BIONIC
77 liblxc_so_SOURCES += \
78 ../include/openpty.c ../include/openpty.h \
79 ../include/lxcmntent.c ../include/lxcmntent.h
80 endif
81
82 if !HAVE_GETLINE
83 if HAVE_FGETLN
84 liblxc_so_SOURCES += ../include/getline.c ../include/getline.h
85 endif
86 endif
87
88 AM_CFLAGS=-I$(top_srcdir)/src \
89 -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
90 -DLXCPATH=\"$(LXCPATH)\" \
91 -DLXCINITDIR=\"$(LXCINITDIR)\" \
92 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
93 -DLOGPATH=\"$(LOGPATH)\"
94
95 if ENABLE_APPARMOR
96 AM_CFLAGS += -DHAVE_APPARMOR
97 endif
98
99 if USE_CONFIGPATH_LOGS
100 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
101 endif
102
103 if ENABLE_SECCOMP
104 AM_CFLAGS += -DHAVE_SECCOMP
105 liblxc_so_SOURCES += seccomp.c
106 endif
107
108 liblxc_so_CFLAGS = -fPIC -DPIC $(AM_CFLAGS)
109
110 liblxc_so_LDFLAGS = \
111 -shared \
112 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,$(VERSION)))
113
114 liblxc_so_LDADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SECCOMP_LIBS)
115
116 if !IS_BIONIC
117 liblxc_so_LDADD += -lutil -lrt
118 endif
119
120 bin_SCRIPTS = \
121 lxc-ps \
122 lxc-netstat \
123 lxc-checkconfig \
124 lxc-setcap \
125 lxc-setuid \
126 lxc-version \
127 lxc-create \
128 lxc-clone \
129 lxc-shutdown \
130 lxc-destroy
131
132 if ENABLE_PYTHON
133 EXTRA_DIST = lxc-device lxc-ls
134 bin_SCRIPTS += lxc-device
135 bin_SCRIPTS += lxc-ls
136 bin_SCRIPTS += lxc-start-ephemeral
137 else
138 bin_SCRIPTS += legacy/lxc-ls
139 endif
140
141 bin_PROGRAMS = \
142 lxc-attach \
143 lxc-unshare \
144 lxc-stop \
145 lxc-start \
146 lxc-execute \
147 lxc-monitor \
148 lxc-wait \
149 lxc-console \
150 lxc-freeze \
151 lxc-info \
152 lxc-cgroup \
153 lxc-unfreeze \
154 lxc-checkpoint \
155 lxc-restart \
156 lxc-kill
157
158 pkglibexec_PROGRAMS = \
159 lxc-init
160
161 AM_LDFLAGS = -Wl,-E
162 if ENABLE_RPATH
163 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
164 endif
165 LDADD=liblxc.so @CAP_LIBS@ @APPARMOR_LIBS@ @SECCOMP_LIBS@
166
167 if !IS_BIONIC
168 LDADD += -lrt
169 endif
170
171 lxc_attach_SOURCES = lxc_attach.c
172 lxc_cgroup_SOURCES = lxc_cgroup.c
173 lxc_checkpoint_SOURCES = lxc_checkpoint.c
174 lxc_console_SOURCES = lxc_console.c
175 lxc_execute_SOURCES = lxc_execute.c
176 lxc_freeze_SOURCES = lxc_freeze.c
177 lxc_info_SOURCES = lxc_info.c
178 lxc_init_SOURCES = lxc_init.c
179 lxc_monitor_SOURCES = lxc_monitor.c
180 lxc_restart_SOURCES = lxc_restart.c
181 lxc_start_SOURCES = lxc_start.c
182 lxc_stop_SOURCES = lxc_stop.c
183 lxc_unfreeze_SOURCES = lxc_unfreeze.c
184 lxc_unshare_SOURCES = lxc_unshare.c
185 lxc_wait_SOURCES = lxc_wait.c
186 lxc_kill_SOURCES = lxc_kill.c
187
188 install-exec-local: install-soPROGRAMS
189 mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
190 /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
191 cd $(DESTDIR)$(libdir); \
192 ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \
193 ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
194
195 uninstall-local:
196 $(RM) $(DESTDIR)$(libdir)/liblxc.so*