Makefile.am 5.06 KB
Newer Older
1
## Makefile.am for gtk+/gdk
Elliot Lee's avatar
Elliot Lee committed
2

3
SUBDIRS=$(gdktarget)
4
DIST_SUBDIRS=linux-fb win32 x11
Tor Lillqvist's avatar
Tor Lillqvist committed
5

6 7 8 9 10
EXTRA_DIST =			\
	gdkconfig.h.win32 	\
	gdk.def 		\
	makefile.mingw 		\
	makefile.mingw.in 	\
Tim Janik's avatar
Tim Janik committed
11
	makeenums.pl		\
12
	makefile.msc
13

Owen Taylor's avatar
Owen Taylor committed
14 15 16 17 18 19
common_includes = @STRIP_BEGIN@ 	\
	-DG_LOG_DOMAIN=\"Gdk\"		\
	-I$(top_srcdir)			\
	-I$(top_builddir)/gdk		\
	-I$(top_srcdir)/gdk-pixbuf 	\
	@GTK_DEBUG_FLAGS@ 		\
20
	@GDK_DEP_CFLAGS@		\
Tor Lillqvist's avatar
Tor Lillqvist committed
21
	-DGDK_COMPILATION		\
22 23
@STRIP_END@

24 25
INCLUDES = $(common_includes)
gtarget=@gdktarget@
Elliot Lee's avatar
Elliot Lee committed
26

Tor Lillqvist's avatar
Tor Lillqvist committed
27 28 29 30 31 32
if PLATFORM_WIN32
no_undefined = -no-undefined

if HAVE_WINTAB
wintab_lib = -Lwin32 -lwntab32x
endif
33 34 35 36

if HAVE_IE55
ie55uuid_lib = -Lwin32 -lie55uuid
endif
Tor Lillqvist's avatar
Tor Lillqvist committed
37 38 39 40 41 42
endif

if OS_WIN32
gdk_win32_symbols = -export-symbols gdk.def

install-libtool-import-lib:
Owen Taylor's avatar
Owen Taylor committed
43
	$(INSTALL) .libs/libgdk-win32-$(GTK_API_VERSION).dll.a $(DESTDIR)$(libdir)
Tor Lillqvist's avatar
Tor Lillqvist committed
44
uninstall-libtool-import-lib:
45
	-rm $(DESTDIR)$(libdir)/libgdk-win32-$(GTK_API_VERSION).dll.a
Tor Lillqvist's avatar
Tor Lillqvist committed
46 47 48 49 50 51
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif

if MS_LIB_AVAILABLE
Owen Taylor's avatar
Owen Taylor committed
52
noinst_DATA = gdk-win32-$(GTK_API_VERSION).lib
Tor Lillqvist's avatar
Tor Lillqvist committed
53

Owen Taylor's avatar
Owen Taylor committed
54 55
gdk-win32-$(GTK_API_VERSION).lib: libgdk-win32-$(GTK_API_VERSION).la gdk.def
	lib -name:libgdk-win32-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gdk.def -out:$@
Tor Lillqvist's avatar
Tor Lillqvist committed
56 57

install-ms-lib:
Owen Taylor's avatar
Owen Taylor committed
58
	$(INSTALL) gdk-win32-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir)
Tor Lillqvist's avatar
Tor Lillqvist committed
59 60

uninstall-ms-lib:
Owen Taylor's avatar
Owen Taylor committed
61
	-rm $(DESTDIR)$(libdir)/gdk-win32-$(GTK_API_VERSION).lib
Tor Lillqvist's avatar
Tor Lillqvist committed
62 63 64 65 66
else
install-ms-lib:
uninstall-ms-lib:
endif

67
# libtool stuff: set version and export symbols for resolving
68 69
# since automake doesn't support conditionalized libsomething_la_LDFLAGS
# we use the general approach here
Owen Taylor's avatar
Owen Taylor committed
70 71 72 73 74 75
LDFLAGS = @STRIP_BEGIN@ 						\
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) 		\
	-export-dynamic 						\
	-rpath $(libdir) 						\
	$(no_undefined)							\
	@LIBTOOL_EXPORT_OPTIONS@					\
76
	$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la	\
Owen Taylor's avatar
Owen Taylor committed
77 78
	$(gdk_win32_symbols)						\
	@GDK_DEP_LIBS@							\
79 80 81 82 83
@STRIP_END@

#
# setup source file variables
#
Owen Taylor's avatar
Started  
Owen Taylor committed
84
#
85
# GDK header files for public installation (non-generated)
Owen Taylor's avatar
Started  
Owen Taylor committed
86 87 88
#
# Note: files added here may need to be be propagated to gdk_headers in gtk/Makefile.am
#
89 90
gdk_public_h_sources = @STRIP_BEGIN@ \
	gdk.h		\
Owen Taylor's avatar
Started  
Owen Taylor committed
91 92 93 94 95 96 97
	gdkcolor.h	\
	gdkcursor.h     \
	gdkdnd.h	\
	gdkdrawable.h	\
	gdkevents.h	\
	gdkfont.h	\
	gdkgc.h		\
98
	gdkkeysyms.h	\
Owen Taylor's avatar
Started  
Owen Taylor committed
99 100 101
	gdki18n.h	\
	gdkimage.h	\
	gdkinput.h	\
Havoc Pennington's avatar
Havoc Pennington committed
102
	gdkkeys.h	\
103
	gdkpango.h	\
Owen Taylor's avatar
Owen Taylor committed
104
	gdkpixbuf.h	\
Owen Taylor's avatar
Started  
Owen Taylor committed
105 106 107 108 109
	gdkpixmap.h	\
	gdkproperty.h	\
	gdkregion.h	\
	gdkrgb.h	\
	gdkselection.h	\
110
	gdktypes.h	\
Owen Taylor's avatar
Started  
Owen Taylor committed
111 112
	gdkvisual.h	\
	gdkwindow.h	\
113 114
	gdkdisplay.h	\
	gdkscreen.h	\
115
@STRIP_END@
116

117 118 119 120 121 122
gdk_headers = @STRIP_BEGIN@       \
	$(gdk_public_h_sources)   \
	gdkenumtypes.h		  \
	gdkprivate.h		  \
@STRIP_END@

123 124 125 126 127 128 129 130 131
gdk_c_sources = @STRIP_BEGIN@ 	\
	gdk.c			\
	gdkcolor.c		\
	gdkcursor.c		\
	gdkdraw.c		\
	gdkevents.c     	\
	gdkfont.c		\
	gdkgc.c			\
	gdkglobals.c		\
Havoc Pennington's avatar
Havoc Pennington committed
132
	gdkkeys.c		\
133 134 135 136
	gdkkeyuni.c		\
	gdkimage.c		\
	gdkinternals.h  	\
	gdkpango.c		\
Owen Taylor's avatar
Owen Taylor committed
137 138
	gdkpixbuf-drawable.c	\
	gdkpixbuf-render.c	\
139
	gdkpixmap.c		\
140 141
	gdkpoly-generic.h	\
	gdkpolyreg-generic.c	\
142 143
	gdkrgb.c		\
	gdkrectangle.c		\
144 145
	gdkregion-generic.c	\
	gdkregion-generic.h	\
146
	gdkwindow.c		\
147 148
	gdkdisplay.c		\
	gdkscreen.c		\
149 150 151 152 153
@STRIP_END@

#
# setup GDK sources and their dependancies
#
154

155 156
gdkincludedir = $(includedir)/gtk-2.0/gdk
gdkinclude_HEADERS = $(gdk_headers)
157

Owen Taylor's avatar
Owen Taylor committed
158 159 160
libgdk_x11_2_0_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
libgdk_linux_fb_2_0_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
libgdk_win32_2_0_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
Tor Lillqvist's avatar
Tor Lillqvist committed
161

Owen Taylor's avatar
Owen Taylor committed
162 163 164
libgdk_x11_2_0_la_LIBADD = x11/libgdk-x11.la	
libgdk_linux_fb_2_0_la_LIBADD = linux-fb/libgdk-linux-fb.la	
libgdk_win32_2_0_la_LIBADD = \
165
	win32/libgdk-win32.la $(wintab_lib) $(ie55uuid_lib)
Tor Lillqvist's avatar
Tor Lillqvist committed
166

167
lib_LTLIBRARIES = $(gdktargetlib)
168

Owen Taylor's avatar
Owen Taylor committed
169
EXTRA_LTLIBRARIES = libgdk-x11-2.0.la libgdk-linux-fb-2.0.la libgdk-win32-2.0.la
170

Matt Wilson's avatar
Matt Wilson committed
171 172
MAINTAINERCLEANFILES =
EXTRA_HEADERS =
173 174 175 176

#
# Rule to install gdkconfig.h header file
#
177
configexecincludedir = $(libdir)/gtk-2.0/include
178
#configexecinclude_DATA = gdkconfig.h
179

180
install-exec-local: gdkconfig.h
181 182 183 184
	$(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
	file=$(DESTDIR)$(configexecincludedir)/gdkconfig.h; \
	if test -r $$file && cmp -s gdkconfig.h $$file; then :; \
	else $(INSTALL_DATA) gdkconfig.h $$file; fi
185

186 187 188 189 190
install-exec-hook:
if DISABLE_EXPLICIT_DEPS
	$(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/$(gdktargetlib)
endif

191 192 193
#note: not gdkconfig.h
BUILT_SOURCES = stamp-gc-h @REBUILD@ gdkenumtypes.c gdkenumtypes.h

Tim Janik's avatar
Tim Janik committed
194
gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) $(srcdir)/makeenums.pl
195 196 197
	cd $(srcdir) \
	&& $(PERL) ./makeenums.pl include $(gdk_public_h_sources) > gdkenumtypes.h

Tim Janik's avatar
Tim Janik committed
198
gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) $(srcdir)/makeenums.pl
199 200 201
	cd $(srcdir) \
	&& $(PERL) ./makeenums.pl cfile $(gdk_public_h_sources) > gdkenumtypes.c

202
gdkconfig.h: stamp-gc-h
203 204
	@if test -f gdkconfig.h; then :; \
	else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
205 206 207 208
stamp-gc-h: ../config.status
	cd .. && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=gdk/gdkconfig.h ./config.status
	echo timestamp > stamp-gc-h

209
install-data-local: install-ms-lib install-libtool-import-lib
Tor Lillqvist's avatar
Tor Lillqvist committed
210 211 212

uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib

Elliot Lee's avatar
Elliot Lee committed
213 214 215 216 217 218
.PHONY: files

files:
	@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
	  echo $$p; \
	done