Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>.
[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 INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@ \
8         -DG_DISABLE_COMPAT_H -DGLIB_COMPILATION
9
10 EXTRA_DIST =                    \
11         ChangeLog.pre-1-2       \
12         glib-2.0.m4             \
13         glib.spec.in            \
14         acglib.m4               \
15         sanity_check            \
16         README.win32            \
17         TODO.xml                \
18         glib.def                \
19         makefile.msc.in         \
20         makefile.mingw.in       \
21         glibconfig.h.win32.in   \
22         config.h.win32.in       \
23         build-dll               \
24         glib.rc.in              \
25         glib-2.0.pc.in          \
26         gobject-2.0.pc.in       \
27         gmodule-2.0.pc.in       \
28         gthread-2.0.pc.in       \
29         gen-unicode-tables.pl
30
31 # These may be in the builddir too
32 BUILT_EXTRA_DIST = \
33         makefile.msc            \
34         makefile.mingw          \
35         glibconfig.h.win32      \
36         config.h.win32          \
37         glib.rc                 \
38         glib.spec
39
40 lib_LTLIBRARIES = libglib-1.3.la
41
42 libglib_1_3_la_SOURCES =        \
43         garray.c                \
44         gasyncqueue.c           \
45         gbacktrace.c            \
46         gcache.c                \
47         gcompletion.c           \
48         gconvert.c              \
49         gdataset.c              \
50         gdate.c                 \
51         gerror.c                \
52         gfileutils.c            \
53         ghash.c                 \
54         ghook.c                 \
55         giochannel.c            \
56         glibintl.h              \
57         glist.c                 \
58         gmain.c                 \
59         gmarkup.c               \
60         gmem.c                  \
61         gmessages.c             \
62         gnode.c                 \
63         gprimes.c               \
64         gqsort.c                \
65         gqueue.c                \
66         grel.c                  \
67         grand.c                 \
68         gscanner.c              \
69         gshell.c                \
70         gslist.c                \
71         gstrfuncs.c             \
72         gstring.c               \
73         gthread.c               \
74         gthreadpool.c           \
75         gtimer.c                \
76         gtree.c                 \
77         guniprop.c              \
78         gutf8.c                 \
79         gunibreak.h             \
80         gunibreak.c             \
81         gunichartables.h        \
82         gunidecomp.h            \
83         gunidecomp.c            \
84         gutils.c
85
86 EXTRA_libglib_1_3_la_SOURCES = \
87         giounix.c       \
88         giowin32.c      \
89         gspawn.c        \
90         gspawn-win32.c  \
91         gwin32.c
92
93 glibincludedir=$(includedir)/glib-2.0
94 glibinclude_HEADERS =   \
95         galloca.h       \
96         garray.h        \
97         gasyncqueue.h   \
98         gbacktrace.h    \
99         gcache.h        \
100         gcompat.h       \
101         gcompletion.h   \
102         gconvert.h      \
103         gdataset.h      \
104         gdate.h         \
105         gerror.h        \
106         gfileutils.h    \
107         ghash.h         \
108         ghook.h         \
109         giochannel.h    \
110         glib.h          \
111         glib-object.h   \
112         glist.h         \
113         gmacros.h       \
114         gmain.h         \
115         gmarkup.h       \
116         gmem.h          \
117         gmessages.h     \
118         gnode.h         \
119         gprimes.h       \
120         gqsort.h        \
121         gquark.h        \
122         gqueue.h        \
123         grand.h         \
124         grel.h          \
125         gscanner.h      \
126         gshell.h        \
127         gslist.h        \
128         gspawn.h        \
129         gstrfuncs.h     \
130         gstring.h       \
131         gthread.h       \
132         gthreadpool.h   \
133         gtimer.h        \
134         gtree.h         \
135         gtypes.h        \
136         gunicode.h      \
137         gutils.h        \
138         gwin32.h
139
140 configexecincludedir = $(libdir)/glib-2.0/include
141 #configexecinclude_DATA = glibconfig.h
142
143 install-exec-local: glibconfig.h
144         $(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
145         file=$(DESTDIR)$(configexecincludedir)/glibconfig.h; \
146         if test -r $$file && cmp -s glibconfig.h $$file; then :; \
147         else $(INSTALL_DATA) glibconfig.h $$file; fi
148
149 CONFIGURE_DEPENDENCIES = acglib.m4
150
151 BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
152 glibconfig.h: stamp-gc-h
153         @if test -f glibconfig.h; then :; \
154         else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
155 stamp-gc-h: config.status
156         CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=glibconfig.h ./config.status
157         echo timestamp > stamp-gc-h
158
159 libglib_1_3_la_LIBADD = @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@
160 libglib_1_3_la_DEPENDENCIES = @GIO@ @GSPAWN@ @PLATFORMDEP@ 
161
162
163 if PLATFORM_WIN32
164 no_undefined = -no-undefined
165 endif
166 if OS_WIN32
167 # This requires a very new libtool
168 export_symbols = -export-symbols glib.def
169 endif
170
171 libglib_1_3_la_LDFLAGS = \
172         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
173         -export-dynamic $(no_undefined) $(export_symbols)
174
175 if OS_WIN32
176 bin_PROGRAMS = gspawn-win32-helper
177 gspawn_win32_helper_LDADD = libglib-1.3.la
178 endif
179 if ENABLE_TIMELOOP
180 timeloop = timeloop
181 endif
182 noinst_PROGRAMS = testglib testgdate testgdateparser $(timeloop)
183 testglib_LDADD = libglib-1.3.la
184 testgdate_LDADD = libglib-1.3.la
185 testgdateparser_LDADD = libglib-1.3.la
186 if ENABLE_TIMELOOP
187 timeloop_LDADD = libglib-1.3.la
188 endif
189 m4datadir = $(datadir)/aclocal
190 m4data_DATA = glib-2.0.m4
191
192 pkgconfigdir = $(libdir)/pkgconfig
193 pkgconfig_DATA = glib-2.0.pc gobject-2.0.pc gmodule-2.0.pc gthread-2.0.pc
194
195 glibconfig.h.win32: $(top_builddir)/config.status $(top_srcdir)/glibconfig.h.win32.in
196         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
197
198 config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in
199         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
200
201 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/makefile.msc.in
202         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
203
204 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/makefile.mingw.in
205         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
206
207 glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in
208         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
209
210 bin_SCRIPTS=glib-config-2.0
211 BUILT_SOURCES=glib-config-2.0
212 glib-config-2.0: glib-config-2.0.in
213
214 .PHONY: files release sanity snapshot
215
216 files:
217         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
218           echo $$p; \
219         done
220
221 release:
222         rm -rf .deps */.deps
223         cd docs && make glib.html
224         $(MAKE) distcheck
225
226 sanity:
227         ./sanity_check $(VERSION)
228
229 snapshot:
230         $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
231
232 snapcheck:
233         $(MAKE) distcheck distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
234
235 dist-hook: $(BUILT_EXTRA_DIST)
236         files='$(BUILT_EXTRA_DIST)'; \
237         for f in $$files; do \
238           if test -f $$f; then d=.; else d=$(srcdir); fi; \
239           cp $$d/$$f $(distdir) || exit 1; done