]> git.proxmox.com Git - mirror_lxcfs.git/blob - src/Makefile.am
rename fuse_compat.h to avoid conflict with system header
[mirror_lxcfs.git] / src / Makefile.am
1 AM_CFLAGS = -Wall -ggdb -D_GNU_SOURCE -DSBINDIR=\"$(SBINDIR)\" -pthread
2 AM_CFLAGS += $(FUSE_CFLAGS)
3 AM_CFLAGS += -DLIBDIR=\"$(LIBDIR)\"
4 AM_LDFLAGS = $(FUSE_LIBS) -pthread
5 #AM_CFLAGS += -DDEBUG
6 #AM_CFLAGS += -DVERBOSE
7
8 AM_CFLAGS += -DRUNTIME_PATH=\"$(RUNTIME_PATH)\"
9
10 liblxcfs_la_SOURCES = api_extensions.h \
11 bindings.c bindings.h \
12 cgroup_fuse.c cgroup_fuse.h \
13 cgroups/cgfsng.c \
14 cgroups/cgroup.c cgroups/cgroup.h \
15 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
16 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
17 cpuset_parse.c cpuset_parse.h \
18 lxcfs_fuse_compat.h \
19 macro.h \
20 memory_utils.h \
21 proc_cpuview.c proc_cpuview.h \
22 proc_fuse.c proc_fuse.h \
23 proc_loadavg.c proc_loadavg.h \
24 syscall_numbers.h \
25 sysfs_fuse.c sysfs_fuse.h \
26 utils.c utils.h
27 liblxcfs_la_CFLAGS = $(AM_CFLAGS)
28
29 if ENABLE_ASAN
30 liblxcfs_la_CFLAGS += -fsanitize=address \
31 -fno-omit-frame-pointer
32 endif
33
34 if ENABLE_UBSAN
35 liblxcfs_la_CFLAGS += -fsanitize=undefined
36 endif
37
38 liblxcfs_la_LDFLAGS = $(AM_CFLAGS) -module -avoid-version -shared
39
40 liblxcfstest_la_SOURCES = api_extensions.h \
41 bindings.c bindings.h \
42 cgroup_fuse.c cgroup_fuse.h \
43 cgroups/cgfsng.c \
44 cgroups/cgroup.c cgroups/cgroup.h \
45 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
46 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
47 cpuset_parse.c cpuset_parse.h \
48 lxcfs_fuse_compat.h \
49 macro.h \
50 memory_utils.h \
51 proc_cpuview.c proc_cpuview.h \
52 proc_fuse.c proc_fuse.h \
53 proc_loadavg.c proc_loadavg.h \
54 syscall_numbers.h \
55 sysfs_fuse.c sysfs_fuse.h \
56 utils.c utils.h
57 liblxcfstest_la_CFLAGS = $(AM_CFLAGS) -DRELOADTEST
58
59 if ENABLE_ASAN
60 liblxcfstest_la_CFLAGS += -fsanitize=address \
61 -fno-omit-frame-pointer
62 endif
63
64 if ENABLE_UBSAN
65 liblxcfstest_la_CFLAGS += -fsanitize=undefined
66 endif
67
68 liblxcfstest_la_LDFLAGS = $(AM_CFLAGS) -module -avoid-version -shared
69
70 noinst_HEADERS = api_extensions.h \
71 bindings.h \
72 cgroup_fuse.h \
73 cgroups/cgroup.h \
74 cgroups/cgroup2_devices.h \
75 cgroups/cgroup_utils.h \
76 cpuset_parse.h \
77 lxcfs_fuse_compat.h \
78 macro.h \
79 memory_utils.h \
80 proc_cpuview.h \
81 proc_fuse.h \
82 proc_loadavg.h \
83 syscall_numbers.h \
84 sysfs_fuse.h \
85 utils.h
86
87 sodir=$(libdir)
88 lxcfs_LTLIBRARIES = liblxcfs.la
89 EXTRA_LTLIBRARIES = liblxcfstest.la
90
91 lxcfs_SOURCES = lxcfs.c
92 lxcfs_LDADD = -ldl
93 lxcfs_CFLAGS = $(AM_CFLAGS)
94 lxcfs_LDFLAGS = $(AM_LDFLAGS)
95 bin_PROGRAMS = lxcfs
96
97 TEST_READ: tests/test-read.c
98 $(CC) -o tests/test-read \
99 tests/test-read.c
100 TEST_CPUSET: tests/cpusetrange.c cpuset_parse.c
101 $(CC) -o tests/cpusetrange \
102 tests/cpusetrange.c \
103 cpuset_parse.c
104 TEST_SYSCALLS: tests/test_syscalls.c
105 $(CC) -o tests/test_syscalls \
106 tests/test_syscalls.c
107 tests: TEST_READ TEST_CPUSET TEST_SYSCALLS