X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile.am;h=3ad276d8389fb609b7faa348ff612ec886e8fdae;hb=94d64a3c2844a71117c4c34d5d74435f61f7668f;hp=070a97445091c2899a9766a5f173ef75a1283278;hpb=3e13a059741b1ad275deafdb10bd826547f80c8a;p=mirror_lxcfs.git diff --git a/Makefile.am b/Makefile.am index 070a974..3ad276d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,24 +1,35 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = tests share -DIST_SUBDIRS = tests share - -VERSION_CURRENT = 0 -VERSION_REVISION = 0 -VERSION_AGE = 0 +SUBDIRS = tests share config +DIST_SUBDIRS = tests share config AM_CFLAGS = -Wall -ggdb -D_GNU_SOURCE -DSBINDIR=\"$(SBINDIR)\" -pthread -AM_CFLAGS += $(DBUS_CFLAGS) $(FUSE_CFLAGS) $(GLIB_CFLAGS) $(GLIBDBUS_CFLAGS) $(GIO_CFLAGS) -AM_LDFLAGS = $(DBUS_LIBS) $(FUSE_LIBS) $(GLIB_LIBS) -pthread $(GLIBDBUS_LIBS) $(GIO_LIBS) +AM_CFLAGS += $(FUSE_CFLAGS) +AM_CFLAGS += -DLIBDIR=\"$(LIBDIR)\" +AM_LDFLAGS = $(FUSE_LIBS) -pthread +#AM_CFLAGS += -DDEBUG -AM_CFLAGS += -DLIBEXECDIR=\"$(LIBEXECDIR)\" +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 -pkglibexec_PROGRAMS = lxcfs_mkdir +noinst_HEADERS = bindings.h macro.h -lxcfs_SOURCES = lxcfs.c cgmanager.c cgmanager.h cpuset.c -lxcfs_mkdir_SOURCES = lxcfs_mkdir.c cgmanager.c cgmanager.h cpuset.c +sodir=$(libdir) +lib_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 @@ -32,11 +43,28 @@ 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 + +if HAVE_PAM +pam_LTLIBRARIES = pam_cgfs.la +pam_cgfs_la_SOURCES = pam/pam_cgfs.c macro.h +pam_cgfs_la_CFLAGS = $(AM_CFLAGS) +pam_cgfs_la_LIBADD = $(AM_LIBS) $(PAM_LIBS) -L$(top_srcdir) +pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version -shared +# pam_cgfs_la_CFLAGS += -DDEBUG + +install-data-hook: install-pamLTLIBRARIES + rm -f "$(DESTDIR)$(pamdir)/pam_cgfs.la" + rm -f "$(DESTDIR)$(pamdir)/pam_cgfs.a" +uninstall-local: + rm -f "$(DESTDIR)$(pamdir)/pam_cgfs.so" +endif + -tests: TEST_READ TEST_CPUSET +tests: TEST_READ TEST_CPUSET TEST_SYSCALLS distclean: rm -rf .deps/ \ @@ -45,7 +73,6 @@ distclean: Makefile.in \ aclocal.m4 \ autom4te.cache/ \ - cgmanager.o \ compile \ config.guess \ config.h \ @@ -63,4 +90,6 @@ distclean: lxcfs.o \ m4/ \ missing \ - stamp-h1 + stamp-h1 \ + tests/test_syscalls \ + *.lo *.la