Add a parser for desktop entries and similar files with a .ini-like
[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         gkeyfile.c              \
76         glibintl.h              \
77         glist.c                 \
78         gmain.c                 \
79         gmarkup.c               \
80         gmem.c                  \
81         gmessages.c             \
82         gnode.c                 \
83         goption.c               \
84         gpattern.c              \
85         gprimes.c               \
86         gqsort.c                \
87         gqueue.c                \
88         grel.c                  \
89         grand.c                 \
90         gscanner.c              \
91         gshell.c                \
92         gslist.c                \
93         gstrfuncs.c             \
94         gstring.c               \
95         gthread.c               \
96         gthreadinit.h           \
97         gthreadpool.c           \
98         gtimer.c                \
99         gtree.c                 \
100         guniprop.c              \
101         gutf8.c                 \
102         gunibreak.h             \
103         gunibreak.c             \
104         gunichartables.h        \
105         gunicollate.c           \
106         gunicomp.h              \
107         gunidecomp.h            \
108         gunidecomp.c            \
109         gunicodeprivate.h       \
110         gutils.c                \
111         gdebug.h                \
112         gprintf.c               \
113         gprintfint.h
114
115 EXTRA_libglib_2_0_la_SOURCES = \
116         giounix.c       \
117         giowin32.c      \
118         gspawn.c        \
119         gspawn-win32.c  \
120         gwin32.c
121
122 glibincludedir=$(includedir)/glib-2.0
123 glibinclude_HEADERS =   \
124         glib-object.h   \
125         glib.h
126
127 glibsubincludedir=$(includedir)/glib-2.0/glib
128 glibsubinclude_HEADERS =   \
129         galloca.h       \
130         garray.h        \
131         gasyncqueue.h   \
132         gatomic.h       \
133         gbacktrace.h    \
134         gcache.h        \
135         gcompletion.h   \
136         gconvert.h      \
137         gdataset.h      \
138         gdate.h         \
139         gdir.h          \
140         gerror.h        \
141         gfileutils.h    \
142         ghash.h         \
143         ghook.h         \
144         gi18n.h         \
145         gi18n-lib.h     \
146         giochannel.h    \
147         gkeyfile.h      \
148         glist.h         \
149         gmacros.h       \
150         gmain.h         \
151         gmarkup.h       \
152         gmem.h          \
153         gmessages.h     \
154         gnode.h         \
155         goption.h       \
156         gpattern.h      \
157         gprimes.h       \
158         gqsort.h        \
159         gquark.h        \
160         gqueue.h        \
161         grand.h         \
162         grel.h          \
163         gscanner.h      \
164         gshell.h        \
165         gslist.h        \
166         gspawn.h        \
167         gstrfuncs.h     \
168         gstring.h       \
169         gthread.h       \
170         gthreadpool.h   \
171         gtimer.h        \
172         gtree.h         \
173         gtypes.h        \
174         gunicode.h      \
175         gutils.h        \
176         gwin32.h        \
177         gprintf.h
178
179 install-data-local: install-ms-lib install-libtool-import-lib
180         @if test -f $(glibincludedir)/glist.h ; then                                    \
181           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
182           echo "*** contents of this directory and type 'make install' again." ;        \
183           false ;                                                                       \
184         fi
185
186 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
187
188 if PLATFORM_WIN32
189 no_undefined = -no-undefined
190 endif
191
192 if OS_WIN32
193 # This requires a very new libtool
194 export_symbols = -export-symbols $(srcdir)/glib.def
195
196 install-libtool-import-lib:
197         $(INSTALL) .libs/libglib-2.0.dll.a $(DESTDIR)$(libdir)
198         $(INSTALL) $(srcdir)/glib.def $(DESTDIR)$(libdir)/glib-2.0.def
199
200 uninstall-libtool-import-lib:
201         -rm $(DESTDIR)$(libdir)/libglib-2.0.dll.a $(DESTDIR)$(libdir)/glib-2.0.def
202 else
203 install-libtool-import-lib:
204 uninstall-libtool-import-lib:
205
206 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
207 endif
208
209 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
210 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @GLIB_DEF@
211
212 libglib_2_0_la_LDFLAGS = \
213         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
214         -export-dynamic $(no_undefined) $(export_symbols)
215
216 if OS_WIN32
217 bin_PROGRAMS = gspawn-win32-helper
218 gspawn_win32_helper_LDADD = libglib-2.0.la
219 gspawn_win32_helper_LDFLAGS = -mwindows
220
221 $(G_LIB_WIN32_RESOURCE): glib.rc
222         $(top_srcdir)/build/win32/lt-compile-resource glib.rc $@
223 endif
224
225 glib-2.0.lib: libglib-2.0.la glib.def
226         lib -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
227
228 dist-hook: $(BUILT_EXTRA_DIST)
229         files='$(BUILT_EXTRA_DIST)'; \
230         for f in $$files; do \
231           if test -f $$f; then d=.; else d=$(srcdir); fi; \
232           cp $$d/$$f $(distdir) || exit 1; done