]> git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/Makefile.am
1dfca0088b95252dafa59b69fd7505902c5e49dc
[mirror_lxc.git] / src / lxc / Makefile.am
1 pkginclude_HEADERS = \
2 start.h \
3 console.h \
4 error.h \
5 monitor.h \
6 utils.h \
7 namespace.h \
8 caps.h \
9 lxc.h \
10 cgroup.h \
11 conf.h \
12 list.h \
13 log.h \
14 state.h
15
16 sodir=$(libdir)
17 # use PROGRAMS to avoid complains from automake
18 so_PROGRAMS = liblxc.so
19
20 liblxc_so_SOURCES = \
21 arguments.c arguments.h \
22 commands.c commands.h \
23 start.c start.h \
24 stop.c \
25 monitor.c monitor.h \
26 console.c \
27 freezer.c \
28 checkpoint.c \
29 restart.c \
30 error.h error.c \
31 parse.c parse.h \
32 cgroup.c cgroup.h \
33 lxc.h \
34 utils.c utils.h \
35 sync.c sync.h \
36 namespace.h namespace.c \
37 conf.c conf.h \
38 confile.c confile.h \
39 list.h \
40 state.c state.h \
41 log.c log.h \
42 \
43 network.c network.h \
44 nl.c nl.h \
45 rtnl.c rtnl.h \
46 genl.c genl.h \
47 \
48 caps.c caps.h \
49 mainloop.c mainloop.h \
50 af_unix.c af_unix.h \
51 \
52 utmp.c utmp.h
53
54 AM_CFLAGS=-I$(top_srcdir)/src
55
56 liblxc_so_CFLAGS = -fPIC -DPIC $(AM_CFLAGS)
57
58 liblxc_so_LDFLAGS = \
59 -shared \
60 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,$(VERSION)))
61
62 liblxc_so_LDADD = -lutil $(CAP_LIBS)
63
64 bin_SCRIPTS = \
65 lxc-ps \
66 lxc-netstat \
67 lxc-ls \
68 lxc-checkconfig \
69 lxc-setcap \
70 lxc-setuid \
71 lxc-version \
72 lxc-create \
73 lxc-clone \
74 lxc-destroy
75
76 bin_PROGRAMS = \
77 lxc-attach \
78 lxc-unshare \
79 lxc-stop \
80 lxc-start \
81 lxc-execute \
82 lxc-monitor \
83 lxc-wait \
84 lxc-console \
85 lxc-freeze \
86 lxc-info \
87 lxc-cgroup \
88 lxc-unfreeze \
89 lxc-checkpoint \
90 lxc-restart \
91 lxc-kill
92
93 pkglib_PROGRAMS = \
94 lxc-init
95
96 AM_LDFLAGS=-Wl,-E -Wl,-rpath -Wl,$(libdir)
97 LDADD=liblxc.so @CAP_LIBS@
98
99 lxc_attach_SOURCES = lxc_attach.c
100 lxc_cgroup_SOURCES = lxc_cgroup.c
101 lxc_checkpoint_SOURCES = lxc_checkpoint.c
102 lxc_console_SOURCES = lxc_console.c
103 lxc_execute_SOURCES = lxc_execute.c
104 lxc_freeze_SOURCES = lxc_freeze.c
105 lxc_info_SOURCES = lxc_info.c
106 lxc_init_SOURCES = lxc_init.c
107 lxc_monitor_SOURCES = lxc_monitor.c
108 lxc_restart_SOURCES = lxc_restart.c
109 lxc_start_SOURCES = lxc_start.c
110 lxc_stop_SOURCES = lxc_stop.c
111 lxc_unfreeze_SOURCES = lxc_unfreeze.c
112 lxc_unshare_SOURCES = lxc_unshare.c
113 lxc_wait_SOURCES = lxc_wait.c
114 lxc_kill_SOURCES = lxc_kill.c
115
116 install-exec-local: install-soPROGRAMS
117 mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
118 /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
119 cd $(DESTDIR)$(libdir); \
120 ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
121
122 uninstall-local:
123 $(RM) $(DESTDIR)$(libdir)/liblxc.so*
124
125 namespace.c: setns.h
126
127 setns.h:
128 -$(CC) $(CPPFLAGS) -M -MT$@ $(LINUX_DIR)/arch/$(LINUX_SRCARCH)/include/asm/unistd.h >setns.P
129 -$(CPP) $(CPPFLAGS) -dM $(LINUX_DIR)/arch/$(LINUX_SRCARCH)/include/asm/unistd.h |grep setns > $@
130
131 clean-local:
132 $(RM) setns.h setns.P
133
134 -include setns.P