CLEANFILES = lex.c parse.c parse.h
AM_CPPFLAGS = -I$(top_srcdir)/include
-lib_LTLIBRARIES = libcgroup.la libcgroupfortesting.la
+
+lib_LTLIBRARIES = libcgroup.la
libcgroup_la_SOURCES = parse.h parse.y lex.l api.c config.c libcgroup-internal.h libcgroup.map wrapper.c log.c
libcgroup_la_LIBADD = -lpthread $(CODE_COVERAGE_LIBS)
libcgroup_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) -DSTATIC=static
libcgroup_la_LDFLAGS = -Wl,--version-script,$(srcdir)/libcgroup.map \
-version-number $(LIBRARY_VERSION_MAJOR):$(LIBRARY_VERSION_MINOR):$(LIBRARY_VERSION_RELEASE)
+noinst_LTLIBRARIES = libcgroupfortesting.la
libcgroupfortesting_la_SOURCES = $(libcgroup_la_SOURCES)
libcgroupfortesting_la_LIBADD = -lpthread $(CODE_COVERAGE_LIBS)
libcgroupfortesting_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) -DSTATIC= -DUNIT_TEST
libcgroupfortesting_la_LDFLAGS = -Wl,--version-script,$(top_srcdir)/tests/gunit/libcgroup_unittest.map \
-version-number $(LIBRARY_VERSION_MAJOR):$(LIBRARY_VERSION_MINOR):$(LIBRARY_VERSION_RELEASE)
-
-install-exec-hook:
- find $(DESTDIR)$(libdir) -type f -name libcgroupfortesting.\* -delete
- unlink $(DESTDIR)$(libdir)/libcgroupfortesting.so
- unlink $(DESTDIR)$(libdir)/libcgroupfortesting.so.$(LIBRARY_VERSION_MAJOR)
sbin_PROGRAMS = cgconfigparser cgclear
-lib_LTLIBRARIES = libcgset.la
+noinst_LTLIBRARIES = libcgset.la
cgexec_SOURCES = cgexec.c tools-common.c tools-common.h
cgexec_LIBS = $(CODE_COVERAGE_LIBS)
install-exec-hook:
chmod u+s $(DESTDIR)$(bindir)/cgexec
- find $(DESTDIR)$(libdir) -type f -name libcgset.\* -delete
- unlink $(DESTDIR)$(libdir)/libcgset.so
- unlink $(DESTDIR)$(libdir)/libcgset.so.0
endif
COPY_FROM_OPTION = CHAR_MAX + 1
};
+#ifndef UNIT_TEST
static struct option const long_options[] =
{
{"rule", required_argument, NULL, 'r'},
printf(" --copy-from <source_cgroup_path> Control group whose "\
"parameters will be copied\n");
}
+#endif /* !UNIT_TEST */
STATIC int parse_r_flag(const char * const program_name,
const char * const name_value_str,
return ret;
}
+#ifndef UNIT_TEST
int main(int argc, char *argv[])
{
int ret = 0;
free(name_value);
return ret;
}
+#endif /* !UNIT_TEST */