From: Ɓukasz Stelmach Date: Mon, 8 May 2017 21:02:59 +0000 (+0200) Subject: Make faultd build X-Git-Tag: submit/tizen/20170622.101818~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8ef47d97ffaf3d172f35876dccd9867d501b676;p=platform%2Fcore%2Fsystem%2Ffaultd.git Make faultd build --- diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..786ae41 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,39 @@ +EXTRA_DIST = +CLEANFILES = +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} +AM_MAKEFLAGS = --no-print-directory + +AM_CPPFLAGS = \ + -include $(top_builddir)/config.h \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ + -I${top_srcdir}/src \ + -I${top_srcdir}/src/core \ + -I${top_srcdir}/src/util + + +AM_CFLAGS = ${my_CFLAGS} + +AM_LDFLAGS = \ + -Wl,--gc-sections \ + -Wl,--as-needed + +SED_PROCESS = \ + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \ + -e 's,@VERSION\@,$(VERSION),g' \ + -e 's,@prefix\@,$(prefix),g' \ + -e 's,@exec_prefix\@,$(exec_prefix),g' \ + -e 's,@libdir\@,$(libdir),g' \ + -e 's,@includedir\@,$(includedir),g' \ + < $< > $@ || rm $@ + +%.pc: %.pc.in Makefile + $(SED_PROCESS) + +sbin_PROGRAMS = faultd +faultd_SOURCES = \ + src/core/module.c \ + src/faultd.c \ + src/util/log.c \ + src/util/notify_queue.c +faultd_LDADD = $(LIBSYSTEMD_LIBS) ${AUDIT_LIBS} + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..c47df37 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +set -e + +if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then + cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \ + chmod +x .git/hooks/pre-commit && \ + echo "Activated pre-commit hook." || : +fi + +autoreconf --install --symlink + +libdir() { + echo $(cd $1/$(gcc -print-multi-os-directory); pwd) +} + + +args="--prefix=/usr \ +--sysconfdir=/etc \ +--libdir=$(libdir /usr/lib)" + +echo +echo "----------------------------------------------------------------" +echo "Initialized build system. For a common configuration please run:" +echo "----------------------------------------------------------------" +echo +echo "./configure CFLAGS='-g -O0' $args" +echo diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..4f296b5 --- /dev/null +++ b/configure.ac @@ -0,0 +1,78 @@ +AC_PREREQ(2.69) +AC_INIT([faultd], + [0.0.1], + [abc-devel@example.com], + [faultd], + [http://review.tizen.org/git/]) +AC_CONFIG_SRCDIR([src/faultd.c]) +AC_CONFIG_AUX_DIR([build-aux]) +AM_INIT_AUTOMAKE([ + check-news + foreign + 1.11 + -Wall + -Wno-portability + silent-rules + tar-pax + no-dist-gzip + dist-xz + subdir-objects +]) +AC_PROG_CC_STDC +AC_USE_SYSTEM_EXTENSIONS +AC_SYS_LARGEFILE +AC_CONFIG_MACRO_DIR([m4]) +AM_SILENT_RULES([yes]) +AC_PREFIX_DEFAULT([/usr]) + +AC_PROG_SED +AC_PROG_MKDIR_P + +PKG_CHECK_MODULES(LIBSYSTEMD, + [libsystemd >= 231], + have_libsystemd=yes, + have_libsystemd=no) +AS_IF([test "x$have_libsystemd" = "xno"], + AC_MSG_ERROR([libsystemd version 221 or newer not found])) + +AC_CHECK_FUNCS([ \ + printf\ +]) + +my_CFLAGS="\ +-Wall \ +-Wchar-subscripts \ +-Wformat-security \ +-Wmissing-declarations \ +-Wmissing-prototypes \ +-Wnested-externs \ +-Wpointer-arith \ +-Wshadow \ +-Wsign-compare \ +-Wstrict-prototypes \ +-Wtype-limits \ +" +AC_SUBST([my_CFLAGS]) + +AC_CONFIG_HEADERS(config.h) +AC_CONFIG_FILES([ + Makefile +]) + +AC_OUTPUT +AC_MSG_RESULT([ + $PACKAGE $VERSION + ===== + + prefix: ${prefix} + sysconfdir: ${sysconfdir} + libdir: ${libdir} + includedir: ${includedir} + + compiler: ${CC} + cflags: ${CFLAGS} + ldflags: ${LDFLAGS} + + libsystemd: ${have_libsystemd} +]) + diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 0000000..38066dd --- /dev/null +++ b/m4/.gitignore @@ -0,0 +1,5 @@ +libtool.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +lt~obsolete.m4 diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..088ef79 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,5 @@ +.dirstamp +.deps/ +.libs/ +*.la +*.lo