Makefile.am 4.68 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@		\
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 37 38 39 40
@STRIP_END@

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

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

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

#
# setup GDK sources and their dependancies
#
108 109 110
extra = @gdktargetlib@

if USE_X11
111
libgdk_x11_includedir = $(includedir)/gtk-2.0/gdk
112

113
libgdk_x11_1_3_la_LIBADD = \
114 115
	$(gtarget)/libgdk-$(gtarget).la	

116 117
libgdk_x11_include_HEADERS = $(gdk_headers)
libgdk_x11_1_3_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
118 119 120
endif

if USE_NANOX
121
libgdk_nanox_includedir = $(includedir)/gtk-2.0/gdk
122

123
libgdk_nanox_1_3_la_LIBADD = \
124 125
	$(gtarget)/libgdk-$(gtarget).la	

126 127
libgdk_nanox_include_HEADERS = $(gdk_headers)
libgdk_nanox_1_3_la_SOURCES = $(gdk_c_sources) gdkenumtypes.c
128 129 130
endif

if USE_LINUX_FB
131
libgdk_linux_fb_includedir = $(includedir)/gtk-2.0/gdk
132

133
libgdk_linux_fb_1_3_la_LIBADD = \
134 135
	$(gtarget)/libgdk-$(gtarget).la	

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

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

143
EXTRA_LTLIBRARIES = libgdk-x11-1.3.la libgdk-nanox-1.3.la libgdk-linux-fb-1.3.la
144

145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
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
162

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

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

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

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

185
gdkconfig.h: stamp-gc-h
186 187
	@if test -f gdkconfig.h; then :; \
	else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
188 189 190 191
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
192 193 194 195 196 197
.PHONY: files

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