Makefile.am 5.69 KB
Newer Older
1
## Makefile.am for GTK+
Elliot Lee's avatar
Elliot Lee committed
2

3
SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib
4
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros
Elliot Lee's avatar
Elliot Lee committed
5

6
# require automake 1.4
7
AUTOMAKE_OPTIONS = 1.7
8

Owen Taylor's avatar
Owen Taylor committed
9 10 11 12
EXTRA_DIST =			\
	HACKING			\
	makecopyright		\
	NEWS.pre-1-0		\
13
	ChangeLog.pre-1-0	\
Owen Taylor's avatar
Owen Taylor committed
14
	ChangeLog.pre-1-2	\
15
	ChangeLog.pre-2-0	\
16 17 18
	ChangeLog.pre-2-2	\
	ChangeLog.pre-2-4	\
	ChangeLog.pre-2-6	\
Matthias Clasen's avatar
Matthias Clasen committed
19
	ChangeLog.pre-2-8	\
20
	ChangeLog.pre-2-10	\
21
	ChangeLog.gtk-async-file-chooser	\
22
	ChangeLog.gtk-printing	\
23
	README.commits	\
Owen Taylor's avatar
Owen Taylor committed
24
	README.win32		\
Tor Lillqvist's avatar
Tor Lillqvist committed
25
	config.h.win32		\
26
	makefile.msc	\
27
	gtk-zip.sh.in		\
jacob berkman's avatar
jacob berkman committed
28
	sanitize-la.sh		\
Owen Taylor's avatar
Owen Taylor committed
29
	po/README.translators	\
30
	po/po2tbl.sed.in	\
Owen Taylor's avatar
Owen Taylor committed
31 32
	examples/aspectframe/Makefile  \
	examples/aspectframe/aspectframe.c  \
33 34 35 36
	examples/Makefile  \
	examples/README.1ST  \
	examples/extract.awk  \
	examples/extract.sh  \
Owen Taylor's avatar
Owen Taylor committed
37 38
	examples/arrow/Makefile	\
	examples/arrow/arrow.c	\
39 40
	examples/base/Makefile  \
	examples/base/base.c  \
Owen Taylor's avatar
Owen Taylor committed
41 42
	examples/buttonbox/Makefile \
	examples/buttonbox/buttonbox.c	\
Owen Taylor's avatar
Owen Taylor committed
43 44 45
	examples/buttons/Makefile  \
	examples/buttons/buttons.c  \
	examples/buttons/info.xpm  \
46
	examples/calendar/Makefile  \
Owen Taylor's avatar
Owen Taylor committed
47
	examples/calendar/calendar.c  \
48 49
	examples/clist/Makefile  \
	examples/clist/clist.c  \
Owen Taylor's avatar
Owen Taylor committed
50 51 52 53 54 55 56 57 58 59 60 61 62 63
	examples/entry/Makefile  \
	examples/entry/entry.c  \
	examples/eventbox/Makefile  \
	examples/eventbox/eventbox.c  \
	examples/filesel/Makefile  \
	examples/filesel/filesel.c  \
	examples/gtkdial/Makefile  \
	examples/gtkdial/dial_test.c  \
	examples/gtkdial/gtkdial.c  \
	examples/gtkdial/gtkdial.h  \
	examples/helloworld/Makefile  \
	examples/helloworld/helloworld.c  \
	examples/helloworld2/Makefile  \
	examples/helloworld2/helloworld2.c  \
Owen Taylor's avatar
Owen Taylor committed
64 65
	examples/label/Makefile	\
	examples/label/label.c	\
Owen Taylor's avatar
Owen Taylor committed
66 67 68 69
	examples/list/Makefile  \
	examples/list/list.c  \
	examples/menu/Makefile  \
	examples/menu/menu.c  \
CST 1999 Shawn T. Amundson's avatar
CST 1999 Shawn T. Amundson committed
70
	examples/menu/itemfactory.c  \
Owen Taylor's avatar
Owen Taylor committed
71 72 73 74 75 76 77 78 79 80 81 82
	examples/notebook/Makefile  \
	examples/notebook/notebook.c  \
	examples/packbox/Makefile  \
	examples/packbox/packbox.c  \
	examples/paned/Makefile  \
	examples/paned/paned.c  \
	examples/pixmap/Makefile  \
	examples/pixmap/pixmap.c  \
	examples/progressbar/Makefile  \
	examples/progressbar/progressbar.c  \
	examples/radiobuttons/Makefile  \
	examples/radiobuttons/radiobuttons.c  \
83 84
	examples/rangewidgets/Makefile  \
	examples/rangewidgets/rangewidgets.c  \
Owen Taylor's avatar
Owen Taylor committed
85 86 87 88
	examples/rulers/Makefile  \
	examples/rulers/rulers.c  \
	examples/scribble-simple/Makefile  \
	examples/scribble-simple/scribble-simple.c  \
Owen Taylor's avatar
Owen Taylor committed
89 90
	examples/scribble-xinput/Makefile	\
	examples/scribble-xinput/scribble-xinput.c	\
Owen Taylor's avatar
Owen Taylor committed
91 92 93 94 95 96 97 98 99
	examples/scrolledwin/Makefile  \
	examples/scrolledwin/scrolledwin.c  \
	examples/selection/Makefile  \
	examples/selection/gettargets.c  \
	examples/selection/setselection.c  \
	examples/statusbar/Makefile  \
	examples/statusbar/statusbar.c  \
	examples/table/Makefile  \
	examples/table/table.c  \
100 101
	examples/text/Makefile  \
	examples/text/text.c  \
Owen Taylor's avatar
Owen Taylor committed
102 103 104 105
	examples/tictactoe/Makefile  \
	examples/tictactoe/tictactoe.c  \
	examples/tictactoe/tictactoe.h  \
	examples/tictactoe/ttt_test.c  \
106 107
	examples/tree/Makefile  \
	examples/tree/tree.c  \
Owen Taylor's avatar
Owen Taylor committed
108 109
	examples/wheelbarrow/Makefile  \
	examples/wheelbarrow/wheelbarrow.c  \
110 111 112 113 114 115
	examples/fixed/fixed.c  \
	examples/fixed/Makefile  \
	examples/frame/frame.c  \
	examples/frame/Makefile  \
	examples/spinbutton/spinbutton.c  \
	examples/spinbutton/Makefile  \
Owen Taylor's avatar
Owen Taylor committed
116
	examples/find-examples.sh
117

118 119 120 121
GDKTARGET=@gdktarget@

## Copy .pc files to target-specific names
gtk+-$(GDKTARGET)-2.0.pc: gtk+-2.0.pc
122 123
	rm -f gtk+-$(GDKTARGET)-2.0.pc && \
	cp gtk+-2.0.pc gtk+-$(GDKTARGET)-2.0.pc
124 125

gdk-$(GDKTARGET)-2.0.pc: gdk-2.0.pc
126 127
	rm -f gdk-$(GDKTARGET)-2.0.pc && \
	cp gdk-2.0.pc gdk-$(GDKTARGET)-2.0.pc
128

129 130 131 132 133 134 135 136
gtk+-$(GDKTARGET)-2.0-uninstalled.pc: gtk+-2.0-uninstalled.pc
	rm -f gtk+-$(GDKTARGET)-2.0-uninstalled.pc && \
	cp gtk+-2.0-uninstalled.pc gtk+-$(GDKTARGET)-2.0-uninstalled.pc

gdk-$(GDKTARGET)-2.0-uninstalled.pc: gdk-2.0-uninstalled.pc
	rm -f gdk-$(GDKTARGET)-2.0-uninstalled.pc && \
	cp gdk-2.0-uninstalled.pc gdk-$(GDKTARGET)-2.0-uninstalled.pc

137
pkgconfigdir = $(libdir)/pkgconfig
138 139 140 141 142
pkgconfig_DATA= gdk-pixbuf-2.0.pc gdk-$(GDKTARGET)-2.0.pc gtk+-$(GDKTARGET)-2.0.pc

if OS_UNIX
pkgconfig_DATA += gtk+-unix-print-2.0.pc
endif
143

144
DISTCLEANFILES =				\
145
	gtk+-unix-print-2.0.pc			\
146 147 148 149 150
	gtk+-$(GDKTARGET)-2.0.pc		\
	gdk-$(GDKTARGET)-2.0.pc			\
	gtk+-$(GDKTARGET)-2.0-uninstalled.pc	\
	gdk-$(GDKTARGET)-2.0-uninstalled.pc

151
## copy the default target for this platform to gdk-2.0.pc and gtk+-2.0.pc
152
DEFAULT_GDKTARGET=x11
Matt Wilson's avatar
Matt Wilson committed
153
install-data-hook:
154
	(cd $(DESTDIR)$(pkgconfigdir) && \
155 156
	 test -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc && \
	 test -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc && \
157 158
	 rm -f gdk-2.0.pc && cp -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc gdk-2.0.pc && \
	 rm -f gtk+-2.0.pc && cp -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc gtk+-2.0.pc) || \
159
	(cd $(DESTDIR)$(pkgconfigdir) && \
160 161
	 rm -f gdk-2.0.pc && cp -f gdk-$(GDKTARGET)-2.0.pc gdk-2.0.pc && \
	 rm -f gtk+-2.0.pc && cp -f gtk+-$(GDKTARGET)-2.0.pc gtk+-2.0.pc)
162

163 164 165 166
uninstall-local:
	rm -f $(DESTDIR)$(pkgconfigdir)/gdk-2.0.pc
	rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-2.0.pc

167
dist-hook:
168
	if test -f $(srcdir)/INSTALL.in && test -f $(srcdir)/README.in ; then \
169 170 171 172
	     CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
	     CONFIG_HEADERS= \
	     $(SHELL) config.status \
	     && cp INSTALL README $(distdir) ; \
173
	fi
Elliot Lee's avatar
Elliot Lee committed
174

175
.PHONY: files release sanity snapshot
Elliot Lee's avatar
Elliot Lee committed
176 177 178 179 180 181 182 183 184 185 186 187

files:
	@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
	  echo $$p; \
	done
	@for subdir in $(SUBDIRS); do \
	  files=`cd $$subdir; $(MAKE) files | grep -v "make\[[1-9]\]"`; \
	  for file in $$files; do \
	    echo $$subdir/$$file; \
	  done; \
	done

188 189 190
release:
	rm -rf .deps */.deps
	$(MAKE) distcheck
Elliot Lee's avatar
Elliot Lee committed
191

192 193
sanity:
	./sanity_check $(VERSION)
Elliot Lee's avatar
Elliot Lee committed
194

195 196

snapshot:
197
	$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
198

Matthias Clasen's avatar
2.9.0  
Matthias Clasen committed
199
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds