Update to match what is currently produced by autotools.
[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 TRIO_SUBDIR = trio
6 trio_libtrio_la = trio/libtrio.la
7 endif 
8
9 SUBDIRS = libcharset $(TRIO_SUBDIR)
10
11 DIST_SUBDIRS = libcharset trio
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.c         \
49         gbsearcharray.h         \
50         gcache.c                \
51         gcompletion.c           \
52         gconvert.c              \
53         gdataset.c              \
54         gdate.c                 \
55         gdir.c                  \
56         gerror.c                \
57         gfileutils.c            \
58         ghash.c                 \
59         ghook.c                 \
60         giochannel.c            \
61         glibintl.h              \
62         glist.c                 \
63         gmain.c                 \
64         gmarkup.c               \
65         gmem.c                  \
66         gmessages.c             \
67         gnode.c                 \
68         gpattern.c              \
69         gprimes.c               \
70         gqsort.c                \
71         gqueue.c                \
72         grel.c                  \
73         grand.c                 \
74         gscanner.c              \
75         gshell.c                \
76         gslist.c                \
77         gstrfuncs.c             \
78         gstring.c               \
79         gthread.c               \
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         gutils.c                \
93         gdebug.h                \
94         gprintf.c               \
95         gprintfint.h
96
97 EXTRA_libglib_2_0_la_SOURCES = \
98         giounix.c       \
99         giowin32.c      \
100         gspawn.c        \
101         gspawn-win32.c  \
102         gwin32.c
103
104 glibincludedir=$(includedir)/glib-2.0
105 glibinclude_HEADERS =   \
106         glib-object.h   \
107         glib.h
108
109 glibsubincludedir=$(includedir)/glib-2.0/glib
110 glibsubinclude_HEADERS =   \
111         galloca.h       \
112         garray.h        \
113         gasyncqueue.h   \
114         gbacktrace.h    \
115         gcache.h        \
116         gcompletion.h   \
117         gconvert.h      \
118         gdataset.h      \
119         gdate.h         \
120         gdir.h          \
121         gerror.h        \
122         gfileutils.h    \
123         ghash.h         \
124         ghook.h         \
125         giochannel.h    \
126         glist.h         \
127         gmacros.h       \
128         gmain.h         \
129         gmarkup.h       \
130         gmem.h          \
131         gmessages.h     \
132         gnode.h         \
133         gpattern.h      \
134         gprimes.h       \
135         gqsort.h        \
136         gquark.h        \
137         gqueue.h        \
138         grand.h         \
139         grel.h          \
140         gscanner.h      \
141         gshell.h        \
142         gslist.h        \
143         gspawn.h        \
144         gstrfuncs.h     \
145         gstring.h       \
146         gthread.h       \
147         gthreadpool.h   \
148         gtimer.h        \
149         gtree.h         \
150         gtypes.h        \
151         gunicode.h      \
152         gutils.h        \
153         gwin32.h        \
154         gprintf.h
155
156 install-data-local: install-ms-lib install-libtool-import-lib
157         @if test -f $(glibincludedir)/glist.h ; then                                    \
158           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
159           echo "*** contents of this directory and type 'make install' again." ;        \
160           false ;                                                                       \
161         fi
162
163 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
164
165 if PLATFORM_WIN32
166 no_undefined = -no-undefined
167 endif
168
169 if OS_WIN32
170 # This requires a very new libtool
171 export_symbols = -export-symbols glib.def
172
173 install-libtool-import-lib:
174         $(INSTALL) .libs/libglib-2.0.dll.a $(DESTDIR)$(libdir)
175 uninstall-libtool-import-lib:
176         -rm $(DESTDIR)$(libdir)/libglib-2.0.dll.a
177 else
178 install-libtool-import-lib:
179 uninstall-libtool-import-lib:
180 endif
181
182 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(trio_libtrio_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
183 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(trio_libtrio_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @GLIB_DEF@
184
185 libglib_2_0_la_LDFLAGS = \
186         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
187         -export-dynamic $(no_undefined) $(export_symbols)
188
189 if OS_WIN32
190 bin_PROGRAMS = gspawn-win32-helper
191 gspawn_win32_helper_LDADD = libglib-2.0.la
192 gspawn_win32_helper_LDFLAGS = -mwindows
193
194 @G_LIB_WIN32_RESOURCE@ : glib.rc
195         $(top_srcdir)/build/win32/lt-compile-resource glib.rc @G_LIB_WIN32_RESOURCE@
196 endif
197
198 glib-2.0.lib: libglib-2.0.la glib.def
199         lib -name:libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll -def:glib.def -out:$@
200
201 glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib/glib.rc.in
202         cd $(top_builddir) && CONFIG_FILES=glib/$@ CONFIG_HEADERS= $(SHELL) ./config.status
203
204 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/glib/makefile.mingw.in
205         cd $(top_builddir) && CONFIG_FILES=glib/$@ CONFIG_HEADERS= $(SHELL) ./config.status
206
207 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/glib/makefile.msc.in
208         cd $(top_builddir) && CONFIG_FILES=glib/$@ CONFIG_HEADERS= $(SHELL) ./config.status
209
210 dist-hook: $(BUILT_EXTRA_DIST)
211         files='$(BUILT_EXTRA_DIST)'; \
212         for f in $$files; do \
213           if test -f $$f; then d=.; else d=$(srcdir); fi; \
214           cp $$d/$$f $(distdir) || exit 1; done