Makefile.am 5.12 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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
endif

if OS_WIN32
gdk_win32_symbols = -export-symbols gdk.def

install-libtool-import-lib:
	$(INSTALL) .libs/libgdk-win32-1.3.dll.a $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
	-rm $(DESTDIR)$(libdir)/libdk-win32-1.3.dll.a
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif

if MS_LIB_AVAILABLE
noinst_DATA = gdk-win32-1.3.lib

gdk-win32-1.3.lib: libgdk-win32-1.3.la gdk.def
	lib -name:libgdk-win32-1.3-@LT_CURRENT_MINUS_AGE@.dll -def:gdk.def -out:$@

install-ms-lib:
	$(INSTALL) gdk-win32-1.3.lib $(DESTDIR)$(libdir)

uninstall-ms-lib:
	-rm $(DESTDIR)$(libdir)/gdk-win32-1.3.lib
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
70 71 72 73
LDFLAGS = @STRIP_BEGIN@ 					\
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) 	\
	-export-dynamic 					\
	-rpath @prefix@/lib 					\
Tor Lillqvist's avatar
Tor Lillqvist committed
74
	$(no_undefined)						\
75
	@LIBTOOL_EXPORT_OPTIONS@				\
76
	$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la		\
77
	$(gdk_win32_symbols)					\
78
	@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
@STRIP_END@
114

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

121 122 123 124 125 126 127 128 129
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
130
	gdkkeys.c		\
131 132 133 134
	gdkkeyuni.c		\
	gdkimage.c		\
	gdkinternals.h  	\
	gdkpango.c		\
Owen Taylor's avatar
Owen Taylor committed
135 136
	gdkpixbuf-drawable.c	\
	gdkpixbuf-render.c	\
137
	gdkpixmap.c		\
138 139
	gdkpoly-generic.h	\
	gdkpolyreg-generic.c	\
140 141
	gdkrgb.c		\
	gdkrectangle.c		\
142 143
	gdkregion-generic.c	\
	gdkregion-generic.h	\
144
	gdkwindow.c		\
145 146 147 148 149
@STRIP_END@

#
# setup GDK sources and their dependancies
#
150 151 152
extra = @gdktargetlib@

if USE_X11
153
libgdk_x11_includedir = $(includedir)/gtk-2.0/gdk
154

155
libgdk_x11_1_3_la_LIBADD = \
156 157
	$(gtarget)/libgdk-$(gtarget).la	

158 159
libgdk_x11_include_HEADERS = $(gdk_headers)
libgdk_x11_1_3_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
160 161 162
endif

if USE_LINUX_FB
163
libgdk_linux_fb_includedir = $(includedir)/gtk-2.0/gdk
164

165
libgdk_linux_fb_1_3_la_LIBADD = \
166 167
	$(gtarget)/libgdk-$(gtarget).la	

168 169
libgdk_linux_fb_include_HEADERS = $(gdk_headers)
libgdk_linux_fb_1_3_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
170 171
endif

Tor Lillqvist's avatar
Tor Lillqvist committed
172 173 174 175
if USE_WIN32
libgdk_win32_includedir = $(includedir)/gtk-2.0/gdk

libgdk_win32_1_3_la_LIBADD = \
176
	$(gtarget)/libgdk-$(gtarget).la $(wintab_lib) $(ie55uuid_lib)
Tor Lillqvist's avatar
Tor Lillqvist committed
177 178 179 180 181 182

libgdk_win32_include_HEADERS = $(gdk_headers)
libgdk_win32_1_3_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c

endif

183 184 185
# now define the real one to workaround automake's mishandling
lib_LTLIBRARIES = $(extra)

Tor Lillqvist's avatar
Tor Lillqvist committed
186
EXTRA_LTLIBRARIES = libgdk-x11-1.3.la libgdk-linux-fb-1.3.la libgdk-win32-1.3.la
187

Matt Wilson's avatar
Matt Wilson committed
188 189
MAINTAINERCLEANFILES =
EXTRA_HEADERS =
190 191 192 193

#
# Rule to install gdkconfig.h header file
#
194
configexecincludedir = $(libdir)/gtk-2.0/include
195 196 197 198 199 200
#configexecinclude_DATA = gdkconfig.h
install-exec-local: gdkconfig.h
	$(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
201

202 203 204
#note: not gdkconfig.h
BUILT_SOURCES = stamp-gc-h @REBUILD@ gdkenumtypes.c gdkenumtypes.h

Tim Janik's avatar
Tim Janik committed
205
gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) $(srcdir)/makeenums.pl
206 207 208
	cd $(srcdir) \
	&& $(PERL) ./makeenums.pl include $(gdk_public_h_sources) > gdkenumtypes.h

Tim Janik's avatar
Tim Janik committed
209
gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) $(srcdir)/makeenums.pl
210 211 212
	cd $(srcdir) \
	&& $(PERL) ./makeenums.pl cfile $(gdk_public_h_sources) > gdkenumtypes.c

213
gdkconfig.h: stamp-gc-h
214 215
	@if test -f gdkconfig.h; then :; \
	else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
216 217 218 219
stamp-gc-h: ../config.status
	cd .. && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=gdk/gdkconfig.h ./config.status
	echo timestamp > stamp-gc-h

Tor Lillqvist's avatar
Tor Lillqvist committed
220 221 222 223
install-data-local: install-ms-lib install-libtool-import-lib

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

Elliot Lee's avatar
Elliot Lee committed
224 225 226 227 228 229
.PHONY: files

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