]> git.proxmox.com Git - mirror_lxcfs.git/blame_incremental - Makefile.am
enable debug option
[mirror_lxcfs.git] / Makefile.am
... / ...
CommitLineData
1ACLOCAL_AMFLAGS = -I m4
2
3SUBDIRS = tests share config
4DIST_SUBDIRS = tests share config
5
6AM_CFLAGS = -Wall -ggdb -D_GNU_SOURCE -DSBINDIR=\"$(SBINDIR)\" -pthread
7AM_CFLAGS += $(FUSE_CFLAGS)
8AM_CFLAGS += -DLIBDIR=\"$(LIBDIR)\"
9AM_LDFLAGS = $(FUSE_LIBS) -pthread
10#AM_CFLAGS += -DDEBUG
11
12AM_CFLAGS += -DRUNTIME_PATH=\"$(RUNTIME_PATH)\"
13
14liblxcfs_la_SOURCES = macro.h bindings.c cpuset.c bindings.h
15liblxcfs_la_CFLAGS = $(AM_CFLAGS)
16liblxcfs_la_LDFLAGS = $(AM_CFLAGS) -module -avoid-version -shared
17
18liblxcfstest_la_SOURCES = bindings.c cpuset.c bindings.h macro.h
19liblxcfstest_la_CFLAGS = $(AM_CFLAGS) -DRELOADTEST
20liblxcfstest_la_LDFLAGS = $(AM_CFLAGS) -module -avoid-version -shared
21
22noinst_HEADERS = bindings.h macro.h
23
24sodir=$(libdir)
25lib_LTLIBRARIES = liblxcfs.la
26EXTRA_LTLIBRARIES = liblxcfstest.la
27
28lxcfs_SOURCES = lxcfs.c
29lxcfs_LDADD = -ldl
30lxcfs_CFLAGS = $(AM_CFLAGS)
31lxcfs_LDFLAGS = $(AM_LDFLAGS)
32bin_PROGRAMS = lxcfs
33
34EXTRA_DIST = \
35 lxcfs.man.add
36
37if HAVE_HELP2MAN
38man_MANS = lxcfs.1
39
40lxcfs.1: lxcfs lxcfs.man.add
41 $(HELP2MAN) -n "Set up cgroup fs for containers" --no-discard-stderr -s 1 -I lxcfs.man.add -N ./lxcfs > lxcfs.1
42endif
43
44TEST_READ: tests/test-read.c
45 $(CC) -o tests/test-read tests/test-read.c
46TEST_CPUSET: tests/cpusetrange.c cpuset.c
47 $(CC) -o tests/cpusetrange tests/cpusetrange.c cpuset.c
48TEST_SYSCALLS: tests/test_syscalls.c
49 $(CC) -o tests/test_syscalls tests/test_syscalls.c
50
51if HAVE_PAM
52pam_LTLIBRARIES = pam_cgfs.la
53pam_cgfs_la_SOURCES = pam/pam_cgfs.c macro.h
54pam_cgfs_la_CFLAGS = $(AM_CFLAGS)
55pam_cgfs_la_LIBADD = $(AM_LIBS) $(PAM_LIBS) -L$(top_srcdir)
56pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version -shared
57# pam_cgfs_la_CFLAGS += -DDEBUG
58
59install-data-hook: install-pamLTLIBRARIES
60 rm -f "$(DESTDIR)$(pamdir)/pam_cgfs.la"
61 rm -f "$(DESTDIR)$(pamdir)/pam_cgfs.a"
62uninstall-local:
63 rm -f "$(DESTDIR)$(pamdir)/pam_cgfs.so"
64endif
65
66
67tests: TEST_READ TEST_CPUSET TEST_SYSCALLS
68
69distclean:
70 rm -rf .deps/ \
71 INSTALL \
72 Makefile \
73 Makefile.in \
74 aclocal.m4 \
75 autom4te.cache/ \
76 compile \
77 config.guess \
78 config.h \
79 config.h.in \
80 config.log \
81 config.status \
82 config.sub \
83 configure \
84 depcomp \
85 install-sh \
86 libtool \
87 ltmain.sh \
88 lxcfs \
89 lxcfs.1 \
90 lxcfs.o \
91 m4/ \
92 missing \
93 stamp-h1 \
94 tests/test_syscalls \
95 *.lo *.la