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