Makefile.am 3.46 KB
Newer Older
Bruno Coudoin's avatar
Bruno Coudoin committed
1
## Process this file with automake to produce Makefile.in
2
if PYTHON_PLUGIN
3 4
python_ldadd = $(PYTHON_LIBS)
python_ldflags = -u Py_Initialize
5
else
6 7
python_ldadd =
python_ldflags =
8
endif
9

10
if USE_SQLITE
11
sqlite_ldadd = $(SQLITE3_LIBS)
12 13
sqlite_cflags = $(SQLITE3_CFLAGS)
else
14
sqlite_ldadd =
15 16 17
sqlite_cflags =
endif

18 19 20 21 22 23 24 25 26 27 28
#if USE_CAIRO
#cairo_ldflags = $(CAIRO_LIBS)
#cairo_cflags = $(CAIRO_CFLAGS)
#cairo_h = gcompris-cairo.h
#cairo_c = gcompris-cairo.c
#else
#cairo_ldflags =
#cairo_cflags =
#cairo_h =
#cairo_c =
#endif
29

30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
if PLATFORM_WIN32
no_undefined = -no-undefined
shared = -shared
else
no_undefined =
shared =
endif

if OS_WIN32
install-libtool-import-lib:
	$(INSTALL) .libs/libgcompris-1.dll.a $(DESTDIR)$(libdir)

uninstall-libtool-import-lib:
	-rm $(DESTDIR)$(libdir)/libgcompris-1.dll.a
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif

49
bin_PROGRAMS = gcompris
50

Bruno Coudoin's avatar
Bruno Coudoin committed
51 52
INCLUDES = \
	-I$(top_srcdir)/intl \
53 54
	-DDATADIR=\""$(datadir)"\" \
	$(GCOMPRIS_CFLAGS) \
55
	$(GNOME_INCLUDEDIR) \
56
	$(XML_CFLAGS) \
57
	$(SDL_CFLAGS) \
58
	-DGNOME_DISABLE_DEPRECATED \
59
        $(sqlite_cflags) \
60
	$(GNET_CFLAGS) \
61
	$(cairo_cflags)
Bruno Coudoin's avatar
Bruno Coudoin committed
62 63

gcompris_SOURCES = \
64
	main.c
65 66

gcompris_LDFLAGS = \
67
	-export-dynamic $(python_ldflags) $(cairo_ldflags)
68

69

Bruno Coudoin's avatar
Bruno Coudoin committed
70
gcompris_LDADD = \
71
	$(top_builddir)/src/gcompris/libgcompris-1.la \
72
	$(LIBICONV)		\
73
        $(INTLLIBS) \
Bruno Coudoin's avatar
Bruno Coudoin committed
74
	$(python_ldadd)
75

76 77
#
# Gcompris library
78
#
79 80 81
lib_LTLIBRARIES = libgcompris-1.la

libgcompris_1_la_LIBADD = \
82
	$(GCOMPRIS_LIBS) $(sqlite_ldadd) $(XML_LIBS) $(GNET_LIBS) $(SDL_LIBS)
83

84
libgcompris_1_la_LDFLAGS = $(shared) $(no_undefined) \
85
	-version-info $(LIBGCOMPRIS_CURRENT):$(LIBGCOMPRIS_REVISION):$(LIBGCOMPRIS_AGE)
86 87 88 89

libgcomprisincludedir = $(includedir)/libgcompris-1.0/libgcompris

libgcomprisinclude_HEADERS =			\
90 91
	about.h \
	anim.h \
92
	binreloc.h \
93
	bonus.h \
94
	gc_core.h \
95
	gameutil.h \
96
	gc_net.h \
Bruno Coudoin's avatar
Bruno Coudoin committed
97
	gcompris.h \
98
	gcompris-board.h \
Bruno Coudoin's avatar
Bruno Coudoin committed
99
	board_config.h \
Bruno Coudoin's avatar
Bruno Coudoin committed
100
	gcompris_alphabeta.h \
101 102
	gcompris_config.h \
	gcompris_db.h \
103
	gcompris_im.h \
104
	wordlist.h \
105 106
	pixbuf_util.h \
	plugin.h \
107 108
	profile.h \
	properties.h \
109 110
	score.h \
	skin.h \
111 112
	soundutil.h \
	timer.h \
Yves Combe's avatar
Yves Combe committed
113
	drag.h \
114
	$(cairo_h)
115 116 117

libgcompris_1_la_SOURCES =			\
	$(libgcomprisinclude_HEADERS)	\
118 119
	about.c \
	anim.c \
120
	bar.c \
121
	binreloc.c \
122
	board.h board.c \
123
	board_config.h board_config.c \
124 125 126 127 128 129
	bonus.c \
	config.c \
	dialog.c \
	file_selector.c \
	gameutil.c \
	gc_net.c \
130
	cache.c \
131
	gcompris.c \
Bruno Coudoin's avatar
Bruno Coudoin committed
132 133
	gcompris_alphabeta.c \
	gcompris_confirm.c \
134 135
	gcompris_db.c \
	gcompris_im.c \
136 137
	help.c \
	images_selector.c \
138
	log.c \
139 140 141 142 143
	menu.c \
	pixbuf_util.c \
	profile.c \
	properties.c \
	score.c \
144
	sdlplayer.c \
145 146 147 148
	skin.c \
	soundutil.c \
	timer.c \
	wordlist.c \
Yves Combe's avatar
Yves Combe committed
149
	drag.c \
150 151
        $(profile_c) \
	$(cairo_c)
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169

$(libgcompris_1_la_OBJECTS): $(marshal_sources)

marshal_sources =				\
	gcompris-marshal.c			\
	gcompris-marshal.h

BUILT_SOURCES =					\
	$(marshal_sources)

gcompris-marshal.h: gcompris-marshal.list $(GLIB_GENMARSHAL)
	$(GLIB_GENMARSHAL) $< --header --prefix=gnome_canvas_marshal > $@
gcompris-marshal.c: gcompris-marshal.list $(GLIB_GENMARSHAL)
	$(GLIB_GENMARSHAL) $< --body --prefix=gnome_canvas_marshal > $@

EXTRA_DIST = \
	gcompris-marshal.list	\
	libgcompris-1.0.pc.in	\
170 171 172
	libgcompris-1.0-uninstalled.pc.in \
	Makefile.mingw gcomprisrc.rc

173 174 175 176 177 178 179 180 181 182 183

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libgcompris-1.0.pc

DONT_DIST_SOURCE = $(marshal_sources)

dist-hook:
	for file in $(DONT_DIST_SOURCE) ; do \
	    rm -f $(distdir)/$$file ; \
	done

184 185 186 187
install-data-local: install-libtool-import-lib

uninstall-local: uninstall-libtool-import-lib

188
clean-local:
189
	rm -f $(marshal_sources)