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