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