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