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