Add abicheck.sh
[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 $(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/\t/') > glib.def
18
19 galias.h: glib.symbols
20           ./makegalias.pl < $(srcdir)/glib.symbols > galias.h
21
22 if OS_UNIX
23 TESTS = abicheck.sh
24 endif
25
26 BUILT_SOURCES = galias.h
27
28 EXTRA_DIST =                    \
29         makefile.msc.in         \
30         glib.rc.in              \
31         gen-unicode-tables.pl   \
32         makegalias.pl           \
33         abicheck.sh             \
34         glib.symbols
35
36 # These may be in the builddir too
37 BUILT_EXTRA_DIST =              \
38         makefile.msc            \
39         glib.rc                 \
40         glib.def                \
41         galias.h
42
43 lib_LTLIBRARIES = libglib-2.0.la
44
45 if MS_LIB_AVAILABLE
46 noinst_DATA = glib-2.0.lib
47
48 install-ms-lib:
49         $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
50
51 uninstall-ms-lib:
52         -rm $(DESTDIR)$(libdir)/glib-2.0.lib
53 else
54 install-ms-lib:
55 uninstall-ms-lib:
56 endif
57
58 libglib_2_0_la_SOURCES =        \
59         garray.c                \
60         gasyncqueue.c           \
61         gatomic.c               \
62         gbacktrace.c            \
63         gbsearcharray.h         \
64         gcache.c                \
65         gcompletion.c           \
66         gconvert.c              \
67         gdataset.c              \
68         gdate.c                 \
69         gdir.c                  \
70         gerror.c                \
71         gfileutils.c            \
72         ghash.c                 \
73         ghook.c                 \
74         giochannel.c            \
75         glibintl.h              \
76         glist.c                 \
77         gmain.c                 \
78         gmarkup.c               \
79         gmem.c                  \
80         gmessages.c             \
81         gnode.c                 \
82         goption.c               \
83         gpattern.c              \
84         gprimes.c               \
85         gqsort.c                \
86         gqueue.c                \
87         grel.c                  \
88         grand.c                 \
89         gscanner.c              \
90         gshell.c                \
91         gslist.c                \
92         gstrfuncs.c             \
93         gstring.c               \
94         gthread.c               \
95         gthreadinit.h           \
96         gthreadpool.c           \
97         gtimer.c                \
98         gtree.c                 \
99         guniprop.c              \
100         gutf8.c                 \
101         gunibreak.h             \
102         gunibreak.c             \
103         gunichartables.h        \
104         gunicollate.c           \
105         gunicomp.h              \
106         gunidecomp.h            \
107         gunidecomp.c            \
108         gunicodeprivate.h       \
109         gutils.c                \
110         gdebug.h                \
111         gprintf.c               \
112         gprintfint.h
113
114 EXTRA_libglib_2_0_la_SOURCES = \
115         giounix.c       \
116         giowin32.c      \
117         gspawn.c        \
118         gspawn-win32.c  \
119         gwin32.c
120
121 glibincludedir=$(includedir)/glib-2.0
122 glibinclude_HEADERS =   \
123         glib-object.h   \
124         glib.h
125
126 glibsubincludedir=$(includedir)/glib-2.0/glib
127 glibsubinclude_HEADERS =   \
128         galloca.h       \
129         garray.h        \
130         gasyncqueue.h   \
131         gatomic.h       \
132         gbacktrace.h    \
133         gcache.h        \
134         gcompletion.h   \
135         gconvert.h      \
136         gdataset.h      \
137         gdate.h         \
138         gdir.h          \
139         gerror.h        \
140         gfileutils.h    \
141         ghash.h         \
142         ghook.h         \
143         gi18n.h         \
144         gi18n-lib.h     \
145         giochannel.h    \
146         glist.h         \
147         gmacros.h       \
148         gmain.h         \
149         gmarkup.h       \
150         gmem.h          \
151         gmessages.h     \
152         gnode.h         \
153         goption.h       \
154         gpattern.h      \
155         gprimes.h       \
156         gqsort.h        \
157         gquark.h        \
158         gqueue.h        \
159         grand.h         \
160         grel.h          \
161         gscanner.h      \
162         gshell.h        \
163         gslist.h        \
164         gspawn.h        \
165         gstrfuncs.h     \
166         gstring.h       \
167         gthread.h       \
168         gthreadpool.h   \
169         gtimer.h        \
170         gtree.h         \
171         gtypes.h        \
172         gunicode.h      \
173         gutils.h        \
174         gwin32.h        \
175         gprintf.h
176
177 install-data-local: install-ms-lib install-libtool-import-lib
178         @if test -f $(glibincludedir)/glist.h ; then                                    \
179           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
180           echo "*** contents of this directory and type 'make install' again." ;        \
181           false ;                                                                       \
182         fi
183
184 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
185
186 if PLATFORM_WIN32
187 no_undefined = -no-undefined
188 endif
189
190 if OS_WIN32
191 # This requires a very new libtool
192 export_symbols = -export-symbols $(srcdir)/glib.def
193
194 install-libtool-import-lib:
195         $(INSTALL) .libs/libglib-2.0.dll.a $(DESTDIR)$(libdir)
196         $(INSTALL) $(srcdir)/glib.def $(DESTDIR)$(libdir)/glib-2.0.def
197
198 uninstall-libtool-import-lib:
199         -rm $(DESTDIR)$(libdir)/libglib-2.0.dll.a $(DESTDIR)$(libdir)/glib-2.0.def
200 else
201 install-libtool-import-lib:
202 uninstall-libtool-import-lib:
203
204 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
205 endif
206
207 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
208 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @GLIB_DEF@
209
210 libglib_2_0_la_LDFLAGS = \
211         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
212         -export-dynamic $(no_undefined) $(export_symbols)
213
214 if OS_WIN32
215 bin_PROGRAMS = gspawn-win32-helper
216 gspawn_win32_helper_LDADD = libglib-2.0.la
217 gspawn_win32_helper_LDFLAGS = -mwindows
218
219 $(G_LIB_WIN32_RESOURCE): glib.rc
220         $(top_srcdir)/build/win32/lt-compile-resource glib.rc $@
221 endif
222
223 glib-2.0.lib: libglib-2.0.la glib.def
224         lib -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
225
226 dist-hook: $(BUILT_EXTRA_DIST)
227         files='$(BUILT_EXTRA_DIST)'; \
228         for f in $$files; do \
229           if test -f $$f; then d=.; else d=$(srcdir); fi; \
230           cp $$d/$$f $(distdir) || exit 1; done