Makefile.am 2.48 KB
Newer Older
1 2
include $(top_srcdir)/Makefile.decl

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
INCLUDES =					\
	-I$(top_srcdir)				\
	-I$(top_srcdir)/glib			\
	-I$(top_srcdir)/gmodule			\
	$(GLIB_DEBUG_FLAGS)

libglib = $(top_builddir)/glib/libglib-2.0.la
libgthread = $(top_builddir)/gthread/libgthread-2.0.la
libgmodule = $(top_builddir)/gmodule/libgmodule-2.0.la
libgobject = $(top_builddir)/gobject/libgobject-2.0.la

########################################################################

noinst_LTLIBRARIES = libtestgobject.la

libtestgobject_la_SOURCES =	\
	testcommon.h		\
	testmarshal.h		\
21 22 23
	testmarshal.c		\
	testmodule.c		\
	testmodule.h
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

if CROSS_COMPILING
  glib_genmarshal=$(GLIB_GENMARSHAL)
else
  glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
endif

testmarshal.h: stamp-testmarshal.h
	@true
stamp-testmarshal.h: @REBUILD@ testmarshal.list $(glib_genmarshal)
	$(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --header >> xgen-gmh \
	&& (cmp -s xgen-gmh testmarshal.h 2>/dev/null || cp xgen-gmh testmarshal.h) \
	&& rm -f xgen-gmh xgen-gmh~ \
	&& echo timestamp > $@
testmarshal.c: @REBUILD@ testmarshal.list $(glib_genmarshal)
	$(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --body >> xgen-gmc \
	&& cp xgen-gmc testmarshal.c \
	&& rm -f xgen-gmc xgen-gmc~

BUILT_SOURCES = testmarshal.h testmarshal.c
Owen Taylor's avatar
Owen Taylor committed
44
CLEANFILES = stamp-testmarshal.h
45 46 47

########################################################################

48
LDADD = libtestgobject.la $(libgobject) 
49 50

test_programs =					\
51
	deftype					\
Matthias Clasen's avatar
Matthias Clasen committed
52
	gvalue-test				\
Matthias Clasen's avatar
Matthias Clasen committed
53
	paramspec-test				\
54
	accumulator				\
55
	defaultiface				\
56
	dynamictype				\
57
	ifacecheck				\
58
	ifaceinit				\
59
	ifaceinherit				\
60
	ifaceproperties				\
61
	override				\
62
	performance				\
63
	performance-threaded			\
64
	singleton				\
65
	references
66

67
performance_LDADD = $(libgobject) $(libgthread)
68
performance_threaded_LDADD = $(libgobject) $(libgthread)
69 70 71 72
check_PROGRAMS = $(test_programs)

TESTS = $(test_programs)
TESTS_ENVIRONMENT = srcdir=$(srcdir) \
Matthias Clasen's avatar
Matthias Clasen committed
73 74
	LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset \
	MALLOC_CHECK_=2	\
Matthias Clasen's avatar
Matthias Clasen committed
75
	MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
76 77 78

########################################################################

79
EXTRA_DIST += 		  \
Owen Taylor's avatar
Owen Taylor committed
80 81
	testmarshal.list

82 83 84 85
BUILT_EXTRA_DIST =				\
	testmarshal.h				\
	testmarshal.c

Owen Taylor's avatar
Owen Taylor committed
86
dist-hook: $(BUILT_EXTRA_DIST)
87 88 89 90 91
	files='$(BUILT_EXTRA_DIST)';				\
	for f in $$files; do					\
	  if test -f $$f; then d=.; else d=$(srcdir); fi;	\
	  cp $$d/$$f $(distdir) || exit 1; done

Owen Taylor's avatar
Owen Taylor committed
92
distclean-local:
93 94 95
	if test $(srcdir) = .; then :; else	\
	    rm -f $(BUILT_EXTRA_DIST);		\
	fi