Renamed to glib/gthreadprivate.h and moved system thread identifier
[platform/upstream/glib.git] / glib / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 if HAVE_GOOD_PRINTF
4 else
5 PRINTF_SUBDIR = gnulib
6 printf_la = gnulib/libgnulib.la
7 endif 
8
9 SUBDIRS = libcharset $(PRINTF_SUBDIR)
10
11 DIST_SUBDIRS = libcharset gnulib
12
13 INCLUDES = -I$(top_srcdir) -DG_LOG_DOMAIN=\"GLib\" \
14         $(GLIB_DEBUG_FLAGS) -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION 
15
16 glib.def: glib.symbols
17         (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/        /' -e 's/G_GNUC_[^ ]*//g') > glib.def
18
19 galias.h: glib.symbols
20           $(PERL) $(srcdir)/makegalias.pl < $(srcdir)/glib.symbols > galias.h
21
22 galiasdef.c: glib.symbols
23           $(PERL) $(srcdir)/makegalias.pl -def < $(srcdir)/glib.symbols > galiasdef.c
24
25 if OS_LINUX
26 if HAVE_GNUC_VISIBILITY
27 TESTS = abicheck.sh
28 endif
29 endif
30
31 BUILT_SOURCES = galias.h galiasdef.c
32
33 MIRRORING_TAB_SOURCES =                         \
34         glib-mirroring-tab/Makefile             \
35         glib-mirroring-tab/gen-mirroring-tab.c  \
36         glib-mirroring-tab/packtab.h            \
37         glib-mirroring-tab/packtab.c
38
39 EXTRA_DIST =                    \
40         makefile.msc.in         \
41         glib.rc.in              \
42         gen-unicode-tables.pl   \
43         makegalias.pl           \
44         abicheck.sh             \
45         glib.symbols            \
46         $(MIRRORING_TAB_SOURCES)
47
48 # These may be in the builddir too
49 BUILT_EXTRA_DIST =              \
50         makefile.msc            \
51         glib.rc                 \
52         galias.h                \
53         galiasdef.c
54
55 lib_LTLIBRARIES = libglib-2.0.la
56
57 if MS_LIB_AVAILABLE
58 noinst_DATA = glib-2.0.lib
59
60 install-ms-lib:
61         $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
62
63 uninstall-ms-lib:
64         -rm $(DESTDIR)$(libdir)/glib-2.0.lib
65 else
66 install-ms-lib:
67 uninstall-ms-lib:
68 endif
69
70 libglib_2_0_la_SOURCES =        \
71         garray.c                \
72         gasyncqueue.c           \
73         gatomic.c               \
74         gbacktrace.c            \
75         gbase64.c               \
76         gbookmarkfile.c         \
77         gbsearcharray.h         \
78         gcache.c                \
79         gcompletion.c           \
80         gconvert.c              \
81         gdataset.c              \
82         gdatasetprivate.h       \
83         gdate.c                 \
84         gdir.c                  \
85         gerror.c                \
86         gfileutils.c            \
87         ghash.c                 \
88         ghook.c                 \
89         giochannel.c            \
90         gkeyfile.c              \
91         glibintl.h              \
92         glist.c                 \
93         gmain.c                 \
94         gmappedfile.c           \
95         gmarkup.c               \
96         gmem.c                  \
97         gmessages.c             \
98         gmirroringtable.h       \
99         gnode.c                 \
100         goption.c               \
101         gpattern.c              \
102         gprimes.c               \
103         gqsort.c                \
104         gqueue.c                \
105         grel.c                  \
106         grand.c                 \
107         gscanner.c              \
108         gshell.c                \
109         gslice.c                \
110         gslist.c                \
111         gstdio.c                \
112         gstrfuncs.c             \
113         gstring.c               \
114         gthread.c               \
115         gthreadprivate.h        \
116         gthreadpool.c           \
117         gtimer.c                \
118         gtree.c                 \
119         guniprop.c              \
120         gutf8.c                 \
121         gunibreak.h             \
122         gunibreak.c             \
123         gunichartables.h        \
124         gunicollate.c           \
125         gunicomp.h              \
126         gunidecomp.h            \
127         gunidecomp.c            \
128         gunicodeprivate.h       \
129         gutils.c                \
130         gdebug.h                \
131         gprintf.c               \
132         gprintfint.h
133
134 EXTRA_libglib_2_0_la_SOURCES = \
135         giounix.c       \
136         giowin32.c      \
137         gspawn.c        \
138         gspawn-win32.c  \
139         gwin32.c
140
141 glibincludedir=$(includedir)/glib-2.0
142 glibinclude_HEADERS =   \
143         glib-object.h   \
144         glib.h
145
146 glibsubincludedir=$(includedir)/glib-2.0/glib
147 glibsubinclude_HEADERS =   \
148         galloca.h       \
149         garray.h        \
150         gasyncqueue.h   \
151         gatomic.h       \
152         gbacktrace.h    \
153         gbase64.h       \
154         gbookmarkfile.h \
155         gcache.h        \
156         gcompletion.h   \
157         gconvert.h      \
158         gdataset.h      \
159         gdate.h         \
160         gdir.h          \
161         gerror.h        \
162         gfileutils.h    \
163         ghash.h         \
164         ghook.h         \
165         gi18n.h         \
166         gi18n-lib.h     \
167         giochannel.h    \
168         gkeyfile.h      \
169         glist.h         \
170         gmacros.h       \
171         gmain.h         \
172         gmappedfile.h   \
173         gmarkup.h       \
174         gmem.h          \
175         gmessages.h     \
176         gnode.h         \
177         goption.h       \
178         gpattern.h      \
179         gprimes.h       \
180         gqsort.h        \
181         gquark.h        \
182         gqueue.h        \
183         grand.h         \
184         grel.h          \
185         gscanner.h      \
186         gshell.h        \
187         gslice.h        \
188         gslist.h        \
189         gspawn.h        \
190         gstdio.h        \
191         gstrfuncs.h     \
192         gstring.h       \
193         gthread.h       \
194         gthreadpool.h   \
195         gtimer.h        \
196         gtree.h         \
197         gtypes.h        \
198         gunicode.h      \
199         gutils.h        \
200         gwin32.h        \
201         gprintf.h
202
203 install-data-local: install-ms-lib install-def-file
204         @if test -f $(glibincludedir)/glist.h ; then                                    \
205           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
206           echo "*** contents of this directory and type 'make install' again." ;        \
207           false ;                                                                       \
208         fi
209
210 uninstall-local: uninstall-ms-lib uninstall-def-file
211
212 if PLATFORM_WIN32
213 no_undefined = -no-undefined
214 endif
215
216 if OS_WIN32
217 # This requires a very new libtool
218 export_symbols = -export-symbols glib.def
219
220 install-def-file:
221         $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def
222
223 uninstall-def-file:
224         -rm $(DESTDIR)$(libdir)/glib-2.0.def
225 else
226 install-def-file:
227 uninstall-def-file:
228
229 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
230 endif
231
232 if OS_WIN32
233 glib_win32_res = glib-win32-res.o
234 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
235 endif
236
237 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
238 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) @GLIB_DEF@
239
240 libglib_2_0_la_LDFLAGS = \
241          $(glib_win32_res_ldflag) \
242         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
243         -export-dynamic $(no_undefined) $(export_symbols)
244
245 if OS_WIN32
246 bin_PROGRAMS = gspawn-win32-helper gspawn-win32-helper-console
247 gspawn_win32_helper_LDADD = libglib-2.0.la
248 gspawn_win32_helper_LDFLAGS = -mwindows
249 gspawn_win32_helper_console_LDADD = libglib-2.0.la
250
251 glib-win32-res.o: glib.rc
252         $(WINDRES) glib.rc $@
253 endif
254
255 gspawn-win32-helper-console.c:
256         echo '#include "gspawn-win32-helper.c"' >$@
257
258 glib-2.0.lib: libglib-2.0.la glib.def
259         lib -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
260
261 dist-hook: $(BUILT_EXTRA_DIST)
262         files='$(BUILT_EXTRA_DIST)'; \
263         for f in $$files; do \
264           if test -f $$f; then d=.; else d=$(srcdir); fi; \
265           cp $$d/$$f $(distdir) || exit 1; done