]> git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/Makefile.am
Install legacy scripts when built without python.
[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 sodir=$(libdir)
21 # use PROGRAMS to avoid complains from automake
22 so_PROGRAMS = liblxc.so
23
24 liblxc_so_SOURCES = \
25 arguments.c arguments.h \
26 commands.c commands.h \
27 start.c start.h \
28 stop.c \
29 execute.c \
30 monitor.c monitor.h \
31 console.c \
32 freezer.c \
33 checkpoint.c \
34 restart.c \
35 error.h error.c \
36 parse.c parse.h \
37 cgroup.c cgroup.h \
38 lxc.h \
39 utils.c utils.h \
40 sync.c sync.h \
41 namespace.h namespace.c \
42 conf.c conf.h \
43 confile.c confile.h \
44 list.h \
45 state.c state.h \
46 log.c log.h \
47 attach.c attach.h \
48 \
49 network.c network.h \
50 nl.c nl.h \
51 rtnl.c rtnl.h \
52 genl.c genl.h \
53 \
54 caps.c caps.h \
55 lxcseccomp.h \
56 mainloop.c mainloop.h \
57 af_unix.c af_unix.h \
58 \
59 utmp.c utmp.h \
60 apparmor.c apparmor.h \
61 lxclock.h lxclock.c \
62 lxccontainer.c lxccontainer.h
63
64 AM_CFLAGS=-I$(top_srcdir)/src \
65 -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
66 -DLXCPATH=\"$(LXCPATH)\" \
67 -DLXCINITDIR=\"$(LXCINITDIR)\" \
68 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\"
69
70 if ENABLE_APPARMOR
71 AM_CFLAGS += -DHAVE_APPARMOR
72 endif
73
74 if ENABLE_SECCOMP
75 AM_CFLAGS += -DHAVE_SECCOMP
76 liblxc_so_SOURCES += seccomp.c
77 endif
78
79 liblxc_so_CFLAGS = -fPIC -DPIC $(AM_CFLAGS)
80
81 liblxc_so_LDFLAGS = \
82 -shared \
83 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,$(VERSION)))
84
85 liblxc_so_LDADD = -lutil $(CAP_LIBS) $(APPARMOR_LIBS) $(SECCOMP_LIBS) -lrt
86
87 bin_SCRIPTS = \
88 lxc-ps \
89 lxc-netstat \
90 lxc-checkconfig \
91 lxc-setcap \
92 lxc-setuid \
93 lxc-version \
94 lxc-create \
95 lxc-clone \
96 lxc-shutdown \
97 lxc-destroy
98
99 if ENABLE_PYTHON
100 bin_SCRIPTS += lxc-device
101 bin_SCRIPTS += lxc-ls
102 bin_SCRIPTS += lxc-start-ephemeral
103 else
104 bin_SCRIPTS += legacy/lxc-ls
105 endif
106
107 bin_PROGRAMS = \
108 lxc-attach \
109 lxc-unshare \
110 lxc-stop \
111 lxc-start \
112 lxc-execute \
113 lxc-monitor \
114 lxc-wait \
115 lxc-console \
116 lxc-freeze \
117 lxc-info \
118 lxc-cgroup \
119 lxc-unfreeze \
120 lxc-checkpoint \
121 lxc-restart \
122 lxc-kill
123
124 pkglibexec_PROGRAMS = \
125 lxc-init
126
127 AM_LDFLAGS = -Wl,-E
128 if ENABLE_RPATH
129 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
130 endif
131 LDADD=liblxc.so @CAP_LIBS@ @APPARMOR_LIBS@ @SECCOMP_LIBS@ -lrt
132
133 lxc_attach_SOURCES = lxc_attach.c
134 lxc_cgroup_SOURCES = lxc_cgroup.c
135 lxc_checkpoint_SOURCES = lxc_checkpoint.c
136 lxc_console_SOURCES = lxc_console.c
137 lxc_execute_SOURCES = lxc_execute.c
138 lxc_freeze_SOURCES = lxc_freeze.c
139 lxc_info_SOURCES = lxc_info.c
140 lxc_init_SOURCES = lxc_init.c
141 lxc_monitor_SOURCES = lxc_monitor.c
142 lxc_restart_SOURCES = lxc_restart.c
143 lxc_start_SOURCES = lxc_start.c
144 lxc_stop_SOURCES = lxc_stop.c
145 lxc_unfreeze_SOURCES = lxc_unfreeze.c
146 lxc_unshare_SOURCES = lxc_unshare.c
147 lxc_wait_SOURCES = lxc_wait.c
148 lxc_kill_SOURCES = lxc_kill.c
149
150 install-exec-local: install-soPROGRAMS
151 mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
152 /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
153 cd $(DESTDIR)$(libdir); \
154 ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
155
156 uninstall-local:
157 $(RM) $(DESTDIR)$(libdir)/liblxc.so*