]> git.proxmox.com Git - mirror_lxcfs.git/blobdiff - Makefile.am
bindings: fix memory leak in calc_pid()
[mirror_lxcfs.git] / Makefile.am
index 384c21bfd950dba0c2b3b188db20acabfe6468ff..57631c1d8ec198d34f6e90ced91fcd9a925a83b7 100644 (file)
@@ -1,22 +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 += -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" 
+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
 
-lxcfs_SOURCES = lxcfs.c cgfs.c cgfs.h cpuset.c
+noinst_HEADERS = bindings.h macro.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
@@ -35,20 +48,6 @@ TEST_CPUSET: tests/cpusetrange.c cpuset.c
 TEST_SYSCALLS: tests/test_syscalls.c
        $(CC) -o tests/test_syscalls tests/test_syscalls.c
 
-pam_LTLIBRARIES = pam_cgfs.la
-pam_cgfs_la_SOURCES = pam/pam_cgfs.c
-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"
-
-
 tests: TEST_READ TEST_CPUSET TEST_SYSCALLS
 
 distclean:
@@ -58,7 +57,6 @@ distclean:
                Makefile.in \
                aclocal.m4 \
                autom4te.cache/ \
-               cgfs.o \
                compile \
                config.guess \
                config.h \
@@ -77,4 +75,5 @@ distclean:
                m4/ \
                missing \
                stamp-h1 \
-               tests/test_syscalls
+               tests/test_syscalls \
+               *.lo *.la