Makefile.am 4.72 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 nanox 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@		\
21 22
@STRIP_END@

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

26
# libtool stuff: set version and export symbols for resolving
27 28
# since automake doesn't support conditionalized libsomething_la_LDFLAGS
# we use the general approach here
29 30 31 32
LDFLAGS = @STRIP_BEGIN@ 					\
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) 	\
	-export-dynamic 					\
	-rpath @prefix@/lib 					\
33
	@LIBTOOL_EXPORT_OPTIONS@				\
34
	$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la		\
35
	@GDK_DEP_LIBS@						\
36
	-lm							\
37 38 39 40 41
@STRIP_END@

#
# setup source file variables
#
Owen Taylor's avatar
Started  
Owen Taylor committed
42
#
43
# GDK header files for public installation (non-generated)
Owen Taylor's avatar
Started  
Owen Taylor committed
44 45 46
#
# Note: files added here may need to be be propagated to gdk_headers in gtk/Makefile.am
#
47 48
gdk_public_h_sources = @STRIP_BEGIN@ \
	gdk.h		\
Owen Taylor's avatar
Started  
Owen Taylor committed
49
	gdkcolor.h	\
50
	gdkcompat.h	\
Owen Taylor's avatar
Started  
Owen Taylor committed
51
	gdkcursor.h     \
52
	gdkcursors.h	\
Owen Taylor's avatar
Started  
Owen Taylor committed
53 54 55 56 57
	gdkdnd.h	\
	gdkdrawable.h	\
	gdkevents.h	\
	gdkfont.h	\
	gdkgc.h		\
58
	gdkkeysyms.h	\
Owen Taylor's avatar
Started  
Owen Taylor committed
59 60 61
	gdki18n.h	\
	gdkimage.h	\
	gdkinput.h	\
Havoc Pennington's avatar
Havoc Pennington committed
62
	gdkkeys.h	\
63
	gdkpango.h	\
Owen Taylor's avatar
Owen Taylor committed
64
	gdkpixbuf.h	\
Owen Taylor's avatar
Started  
Owen Taylor committed
65 66 67 68 69
	gdkpixmap.h	\
	gdkproperty.h	\
	gdkregion.h	\
	gdkrgb.h	\
	gdkselection.h	\
70
	gdktypes.h	\
Owen Taylor's avatar
Started  
Owen Taylor committed
71 72
	gdkvisual.h	\
	gdkwindow.h	\
73
@STRIP_END@
74

75 76 77 78 79 80
gdk_headers = @STRIP_BEGIN@       \
	$(gdk_public_h_sources)   \
	gdkenumtypes.h		  \
	gdkprivate.h		  \
@STRIP_END@

81 82 83 84 85 86 87 88 89
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
90
	gdkkeys.c		\
91 92 93 94
	gdkkeyuni.c		\
	gdkimage.c		\
	gdkinternals.h  	\
	gdkpango.c		\
Owen Taylor's avatar
Owen Taylor committed
95 96
	gdkpixbuf-drawable.c	\
	gdkpixbuf-render.c	\
97
	gdkpixmap.c		\
98 99
	gdkpoly-generic.h	\
	gdkpolyreg-generic.c	\
100 101
	gdkrgb.c		\
	gdkrectangle.c		\
102 103
	gdkregion-generic.c	\
	gdkregion-generic.h	\
104
	gdkwindow.c		\
105 106 107 108 109
@STRIP_END@

#
# setup GDK sources and their dependancies
#
110 111 112
extra = @gdktargetlib@

if USE_X11
113
libgdk_x11_includedir = $(includedir)/gtk-2.0/gdk
114

115
libgdk_x11_1_3_la_LIBADD = \
116 117
	$(gtarget)/libgdk-$(gtarget).la	

118 119
libgdk_x11_include_HEADERS = $(gdk_headers)
libgdk_x11_1_3_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
120 121 122
endif

if USE_NANOX
123
libgdk_nanox_includedir = $(includedir)/gtk-2.0/gdk
124

125
libgdk_nanox_1_3_la_LIBADD = \
126 127
	$(gtarget)/libgdk-$(gtarget).la	

128 129
libgdk_nanox_include_HEADERS = $(gdk_headers)
libgdk_nanox_1_3_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
130 131 132
endif

if USE_LINUX_FB
133
libgdk_linux_fb_includedir = $(includedir)/gtk-2.0/gdk
134

135
libgdk_linux_fb_1_3_la_LIBADD = \
136 137
	$(gtarget)/libgdk-$(gtarget).la	

138 139
libgdk_linux_fb_include_HEADERS = $(gdk_headers)
libgdk_linux_fb_1_3_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
140 141 142 143 144
endif

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

145
EXTRA_LTLIBRARIES = libgdk-x11-1.3.la libgdk-nanox-1.3.la libgdk-linux-fb-1.3.la
146

147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
MAINTAINERCLEANFILES +=
EXTRA_HEADERS +=
EXTRA_DIST +=
EXTRA_DIST +=

#
# rules to generate built sources
#
# we only need to remake these headers once a new X version is released
X-derived-headers:
	sed -e 's/^#define[ 	]*XC\([^ 	]*\)[ 	]*\([^ 	]*\)[ 	]*.*$$/GDK\1 = \2,/' \
	    -e 'tb' -e 'd' -e ':b' \
	    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
	    < @x_includes@/X11/cursorfont.h > gdkcursors.h ; \
	sed -e 's/^#define[ 	]*XK\([^ 	]*\)[ 	]*\([^ 	]*\)[ 	]*.*$$/#define GDK\1 \2/' \
	    -e 'tb' -e 'd' -e ':b' -e 's/ 0X/ 0x/' \
	    < @x_includes@/X11/keysymdef.h > gdkkeysyms.h
Elliot Lee's avatar
Elliot Lee committed
164

165 166 167
#
# Rule to install gdkconfig.h header file
#
168
configexecincludedir = $(libdir)/gtk-2.0/include
169 170 171 172 173 174
#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
175

176 177 178
#note: not gdkconfig.h
BUILT_SOURCES = stamp-gc-h @REBUILD@ gdkenumtypes.c gdkenumtypes.h

Tim Janik's avatar
Tim Janik committed
179
gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) $(srcdir)/makeenums.pl
180 181 182
	cd $(srcdir) \
	&& $(PERL) ./makeenums.pl include $(gdk_public_h_sources) > gdkenumtypes.h

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

187
gdkconfig.h: stamp-gc-h
188 189
	@if test -f gdkconfig.h; then :; \
	else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
190 191 192 193
stamp-gc-h: ../config.status
	cd .. && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=gdk/gdkconfig.h ./config.status
	echo timestamp > stamp-gc-h

Elliot Lee's avatar
Elliot Lee committed
194 195 196 197 198 199
.PHONY: files

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