Makefile.am 4.73 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
LDFLAGS = @STRIP_BEGIN@ 					\
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) 	\
	-export-dynamic 					\
73
	-rpath $(libdir) 					\
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
gdkincludedir = $(includedir)/gtk-2.0/gdk
gdkinclude_HEADERS = $(gdk_headers)
153

154 155
libgdk_x11_1_3_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
libgdk_linux_fb_1_3_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
Tor Lillqvist's avatar
Tor Lillqvist committed
156 157
libgdk_win32_1_3_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c

158 159 160 161
libgdk_x11_1_3_la_LIBADD = x11/libgdk-x11.la	
libgdk_linux_fb_1_3_la_LIBADD = linux-fb/libgdk-linux-fb.la	
libgdk_win32_1_3_la_LIBADD = \
	win32/libgdk-win32.la $(wintab_lib) $(ie55uuid_lib)
Tor Lillqvist's avatar
Tor Lillqvist committed
162

163
lib_LTLIBRARIES = $(gdktargetlib)
164

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

Matt Wilson's avatar
Matt Wilson committed
167 168
MAINTAINERCLEANFILES =
EXTRA_HEADERS =
169 170 171 172

#
# Rule to install gdkconfig.h header file
#
173
configexecincludedir = $(libdir)/gtk-2.0/include
174 175 176 177 178 179
#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
180

181 182 183
#note: not gdkconfig.h
BUILT_SOURCES = stamp-gc-h @REBUILD@ gdkenumtypes.c gdkenumtypes.h

Tim Janik's avatar
Tim Janik committed
184
gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) $(srcdir)/makeenums.pl
185 186 187
	cd $(srcdir) \
	&& $(PERL) ./makeenums.pl include $(gdk_public_h_sources) > gdkenumtypes.h

Tim Janik's avatar
Tim Janik committed
188
gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) $(srcdir)/makeenums.pl
189 190 191
	cd $(srcdir) \
	&& $(PERL) ./makeenums.pl cfile $(gdk_public_h_sources) > gdkenumtypes.c

192
gdkconfig.h: stamp-gc-h
193 194
	@if test -f gdkconfig.h; then :; \
	else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
195 196 197 198
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
199 200 201 202
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
203 204 205 206 207 208
.PHONY: files

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