efb1bcc37cee0314129d57cd87a78492b6253143
[platform/upstream/glib.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 AUTOMAKE_OPTIONS = 1.4
4
5 SUBDIRS = . gobject gmodule gthread docs tests build
6
7 bin_SCRIPTS=glib-config-2.0
8 BUILT_SOURCES=glib-config-2.0
9 glib-config-2.0: glib-config-2.0.in
10
11 INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@
12
13 EXTRA_DIST =                    \
14         ChangeLog.pre-1-2       \
15         glib-2.0.m4             \
16         glib.spec.in            \
17         acglib.m4               \
18         sanity_check            \
19         README.win32            \
20         TODO.xml                \
21         glib.def                \
22         makefile.msc.in         \
23         makefile.mingw.in       \
24         giowin32.c              \
25         glibconfig.h.win32.in   \
26         gwin32.c                \
27         config.h.win32.in       \
28         build-dll               \
29         glib.rc.in              \
30         glib-2.0.pc.in          \
31         gobject-2.0.pc.in       \
32         gmodule-2.0.pc.in       \
33         gthread-2.0.pc.in
34
35 # These may be in the builddir too
36 BUILT_EXTRA_DIST = \
37         makefile.msc            \
38         makefile.mingw          \
39         glibconfig.h.win32      \
40         config.h.win32          \
41         glib.rc                 \
42         glib.spec
43
44 lib_LTLIBRARIES = libglib-1.3.la
45
46 libglib_1_3_la_SOURCES =        \
47         garray.c                \
48         gasyncqueue.c           \
49         gbacktrace.c            \
50         gcache.c                \
51         gcompletion.c           \
52         gconvert.c              \
53         gdataset.c              \
54         gdate.c                 \
55         gerror.c                \
56         gfileutils.c            \
57         ghash.c                 \
58         ghook.c                 \
59         giochannel.c            \
60         giounix.c               \
61         glist.c                 \
62         gmain.c                 \
63         gmem.c                  \
64         gmessages.c             \
65         gnode.c                 \
66         gprimes.c               \
67         gqueue.c                \
68         grel.c                  \
69         grand.c                 \
70         gscanner.c              \
71         gshell.c                \
72         gslist.c                \
73         gspawn.c                \
74         gstrfuncs.c             \
75         gstring.c               \
76         gthread.c               \
77         gthreadpool.c           \
78         gtimer.c                \
79         gtree.c                 \
80         guniprop.c              \
81         gutf8.c                 \
82         gunichartables.h        \
83         gunidecomp.h            \
84         gunidecomp.c            \
85         gutils.c
86
87 ## If we decide to link in 'alloca.c', this is how to do it
88 #libglib_1_3_la_LIBADD = @ALLOCA@
89
90 glibincludedir=$(includedir)/glib-2.0
91 glibinclude_HEADERS =   \
92         galloca.h       \
93         garray.h        \
94         gasyncqueue.h   \
95         gbacktrace.h    \
96         gcache.h        \
97         gcompletion.h   \
98         gconvert.h      \
99         gdataset.h      \
100         gdate.h         \
101         gerror.h        \
102         gfileutils.h    \
103         ghash.h         \
104         ghook.h         \
105         giochannel.h    \
106         glib.h          \
107         glib-object.h   \
108         glist.h         \
109         gmacros.h       \
110         gmain.h         \
111         gmem.h          \
112         gmessages.h     \
113         gnode.h         \
114         gprimes.h       \
115         gquark.h        \
116         gqueue.h        \
117         grand.h         \
118         grel.h          \
119         gscanner.h      \
120         gshell.h        \
121         gslist.h        \
122         gspawn.h        \
123         gstrfuncs.h     \
124         gstring.h       \
125         gthread.h       \
126         gthreadpool.h   \
127         gtimer.h        \
128         gtree.h         \
129         gtypes.h        \
130         gunicode.h      \
131         gutils.h
132
133 configexecincludedir = $(libdir)/glib-2.0/include
134 #configexecinclude_DATA = glibconfig.h
135
136 install-exec-local: glibconfig.h
137         $(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
138         file=$(DESTDIR)$(configexecincludedir)/glibconfig.h; \
139         if test -r $$file && cmp -s glibconfig.h $$file; then :; \
140         else $(INSTALL_DATA) glibconfig.h $$file; fi
141
142 CONFIGURE_DEPENDENCIES = acglib.m4
143
144 BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
145 glibconfig.h: stamp-gc-h
146         @if test -f glibconfig.h; then :; \
147         else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
148 stamp-gc-h: config.status
149         CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=glibconfig.h ./config.status
150         echo timestamp > stamp-gc-h
151
152 libglib_1_3_la_LDFLAGS = \
153         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
154         -export-dynamic
155
156 noinst_PROGRAMS = testglib testgdate testgdateparser
157 testglib_LDADD = libglib-1.3.la
158 testgdate_LDADD = libglib-1.3.la
159 testgdateparser_LDADD = libglib-1.3.la
160
161 m4datadir = $(datadir)/aclocal
162 m4data_DATA = glib-2.0.m4
163
164 pkgconfigdir = $(libdir)/pkgconfig
165 pkgconfig_DATA = glib-2.0.pc gobject-2.0.pc gmodule-2.0.pc gthread-2.0.pc
166
167 glibconfig.h.win32: $(top_builddir)/config.status $(top_srcdir)/glibconfig.h.win32.in
168         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
169
170 config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in
171         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
172
173 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/makefile.msc.in
174         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
175
176 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/makefile.mingw.in
177         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
178
179 glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in
180         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
181
182 .PHONY: files release sanity snapshot
183
184 files:
185         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
186           echo $$p; \
187         done
188
189 release:
190         rm -rf .deps */.deps
191         cd docs && make glib.html
192         $(MAKE) distcheck
193
194 sanity:
195         ./sanity_check $(VERSION)
196
197 snapshot:
198         $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
199
200 snapcheck:
201         $(MAKE) distcheck distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
202
203 dist-hook: $(BUILT_EXTRA_DIST)
204         files='$(BUILT_EXTRA_DIST)'; \
205         for f in $$files; do \
206           if test -f $$f; then d=.; else d=$(srcdir); fi; \
207           cp $$d/$$f $(distdir) || exit 1; done