summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jussi.pakkanen@canonical.com>2012-02-02 14:36:32 +0200
committerChase Douglas <chase.douglas@canonical.com>2012-02-02 11:51:29 -0800
commit24fbaa20c179ce4b4d9be9627bb41daffc91527a (patch)
treeda76e468c911b5953920260211f3644fddad79a0
parent79b2d4e7f976621705bd32a9fd16e56c989a5a45 (diff)
Fix build system.
The project could not be built from scratch due to erroneous Autofoo setup. This commit makes it work. Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--Makefile.am35
-rw-r--r--configure.ac4
-rw-r--r--examples/Makefile.am6
-rw-r--r--src/Makefile.am31
4 files changed, 38 insertions, 38 deletions
diff --git a/Makefile.am b/Makefile.am
index d10bca8..5bdde0e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,43 +1,10 @@
-SUBDIRS = doc examples
-
-lib_LTLIBRARIES = libxorg-gtest.la libxorg-gtest_main.la
-
-libxorg_gtest_la_SOURCES = \
- src/environment.cpp \
- src/process.cpp \
- src/test.cpp
-
-libxorg_gtest_la_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- $(GTEST_CPPFLAGS)
-
-libxorg_gtest_main_la_SOURCES = \
- src/main.cpp
-
-library_includedir = $(includedir)/xorg/gtest
-library_include_HEADERS = \
- include/xorg/gtest/environment.h \
- include/xorg/gtest/process.h \
- include/xorg/gtest/test.h
-
-library_datadir = $(datadir)/xorg/gtest
-library_data_DATA = conf/dummy.conf
-
-libxorg_gtest_main_la_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- $(GTEST_CPPFLAGS) \
- -DDUMMY_CONF_PATH="\"$(library_datadir)/dummy.conf\""
-
-libxorg_gtest_la_LDFLAGS = $(X11_LIBS)
-libxorg_gtest_main_la_LDFLAGS = $(X11_LIBS)
+SUBDIRS = src doc examples
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xorg-gtest.pc
ACLOCAL_AMFLAGS = -I m4
-AM_CXXFLAGS = -Iinclude
-
.PHONY: ChangeLog INSTALL
INSTALL:
$(INSTALL_CMD)
diff --git a/configure.ac b/configure.ac
index 9d7b36b..1623394 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,7 +12,7 @@ m4_include([m4/gtest.m4])
# Initialize Automake
AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2])
AM_SILENT_RULES([yes])
-AM_MAINTAINER_MODE
+AM_MAINTAINER_MODE([enable])
LIB_VERSION=0:0:0
AC_SUBST([LIB_VERSION])
@@ -43,6 +43,6 @@ AC_CONFIG_FILES([Makefile
AC_SUBST(AM_CPPFLAGS, "-Wall -Werror")
-AC_CONFIG_FILES([doc/Makefile examples/Makefile])
+AC_CONFIG_FILES([doc/Makefile examples/Makefile src/Makefile])
AC_OUTPUT
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 0bc8272..5f57519 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -24,6 +24,8 @@ xorg_gtest_example_SOURCES = xorg-gtest.cpp
xorg_gtest_example_CPPFLAGS = \
$(AM_CPPFLAGS) \
- $(GTEST_CPPFLAGS)
+ $(GTEST_CPPFLAGS) \
+ -I$(top_srcdir)/include
+
+xorg_gtest_example_LDADD = $(top_builddir)/src/libxorg-gtest.la $(top_builddir)/src/libxorg-gtest_main.la -lgtest -lpthread -lX11
-xorg_gtest_example_LDFLAGS = -lxorg-gtest -lxorg-gtest_main -lgtest -lpthread -lX11
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..b56bc8a
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,31 @@
+lib_LTLIBRARIES = libxorg-gtest.la libxorg-gtest_main.la
+
+libxorg_gtest_la_SOURCES = \
+ environment.cpp \
+ process.cpp \
+ test.cpp
+
+libxorg_gtest_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ $(GTEST_CPPFLAGS)
+
+libxorg_gtest_main_la_SOURCES = \
+ main.cpp
+
+library_includedir = $(includedir)/xorg/gtest
+library_include_HEADERS = \
+ $(top_srcdir)/include/xorg/gtest/environment.h \
+ $(top_srcdir)/include/xorg/gtest/process.h \
+ $(top_srcdir)/include/xorg/gtest/test.h
+library_datadir = $(datadir)/xorg/gtest
+library_data_DATA = $(top_srcdir)/conf/dummy.conf
+
+libxorg_gtest_main_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ $(GTEST_CPPFLAGS) \
+ -DDUMMY_CONF_PATH="\"$(library_datadir)/dummy.conf\""
+
+libxorg_gtest_la_LDFLAGS = $(X11_LIBS)
+libxorg_gtest_main_la_LDFLAGS = $(X11_LIBS)
+
+AM_CXXFLAGS = -I$(top_srcdir)/include