]> git.proxmox.com Git - mirror_lxcfs.git/blobdiff - Makefile.am
Fix test_proc on s390x
[mirror_lxcfs.git] / Makefile.am
index 7b690e28f46c39428e38d8dc591eb56b435eef2b..57631c1d8ec198d34f6e90ced91fcd9a925a83b7 100644 (file)
@@ -1,19 +1,35 @@
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = tests share
-DIST_SUBDIRS = tests share
+SUBDIRS = tests share config
+DIST_SUBDIRS = tests share config
 
-VERSION_CURRENT  = 0
-VERSION_REVISION = 0
-VERSION_AGE      = 0
+AM_CFLAGS = -Wall -ggdb -D_GNU_SOURCE -DSBINDIR=\"$(SBINDIR)\" -pthread
+AM_CFLAGS += $(FUSE_CFLAGS)
+AM_CFLAGS += -DLIBDIR=\"$(LIBDIR)\"
+AM_LDFLAGS = $(FUSE_LIBS) -pthread
+#AM_CFLAGS += -DDEBUG
 
-AM_CFLAGS = -Wall -ggdb -D_GNU_SOURCE -DSBINDIR=\"$(SBINDIR)\"
-AM_CFLAGS += $(DBUS_CFLAGS) $(NIH_CFLAGS) $(NIH_DBUS_CFLAGS) $(CGMANAGER_CFLAGS) $(FUSE_CFLAGS)
-AM_LDFLAGS = $(DBUS_LIBS) $(NIH_LIBS) $(NIH_DBUS_LIBS) $(CGMANAGER_LIBS) $(FUSE_LIBS)
+AM_CFLAGS += -DRUNTIME_PATH=\"$(RUNTIME_PATH)\"
 
-bin_PROGRAMS = lxcfs
+liblxcfs_la_SOURCES = macro.h bindings.c cpuset.c bindings.h
+liblxcfs_la_CFLAGS = $(AM_CFLAGS)
+liblxcfs_la_LDFLAGS = $(AM_CFLAGS) -module -avoid-version -shared
+
+liblxcfstest_la_SOURCES = bindings.c cpuset.c bindings.h macro.h
+liblxcfstest_la_CFLAGS = $(AM_CFLAGS) -DRELOADTEST
+liblxcfstest_la_LDFLAGS = $(AM_CFLAGS) -module -avoid-version -shared
+
+noinst_HEADERS = bindings.h macro.h
 
-lxcfs_SOURCES = lxcfs.c cgmanager.c cgmanager.h
+sodir=$(libdir)
+lxcfs_LTLIBRARIES = liblxcfs.la
+EXTRA_LTLIBRARIES = liblxcfstest.la
+
+lxcfs_SOURCES = lxcfs.c
+lxcfs_LDADD = -ldl
+lxcfs_CFLAGS = $(AM_CFLAGS)
+lxcfs_LDFLAGS = $(AM_LDFLAGS)
+bin_PROGRAMS = lxcfs
 
 EXTRA_DIST = \
        lxcfs.man.add
@@ -27,8 +43,12 @@ endif
 
 TEST_READ: tests/test-read.c
        $(CC) -o tests/test-read tests/test-read.c
+TEST_CPUSET: tests/cpusetrange.c cpuset.c
+       $(CC) -o tests/cpusetrange tests/cpusetrange.c cpuset.c
+TEST_SYSCALLS: tests/test_syscalls.c
+       $(CC) -o tests/test_syscalls tests/test_syscalls.c
 
-tests: TEST_READ
+tests: TEST_READ TEST_CPUSET TEST_SYSCALLS
 
 distclean:
        rm -rf .deps/ \
@@ -37,7 +57,6 @@ distclean:
                Makefile.in \
                aclocal.m4 \
                autom4te.cache/ \
-               cgmanager.o \
                compile \
                config.guess \
                config.h \
@@ -55,4 +74,6 @@ distclean:
                lxcfs.o \
                m4/ \
                missing \
-               stamp-h1
+               stamp-h1 \
+               tests/test_syscalls \
+               *.lo *.la