New headers defining common gettext-support macros.
[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         gi18n.h         \
127         gi18n-lib.h     \
128         giochannel.h    \
129         glist.h         \
130         gmacros.h       \
131         gmain.h         \
132         gmarkup.h       \
133         gmem.h          \
134         gmessages.h     \
135         gnode.h         \
136         gpattern.h      \
137         gprimes.h       \
138         gqsort.h        \
139         gquark.h        \
140         gqueue.h        \
141         grand.h         \
142         grel.h          \
143         gscanner.h      \
144         gshell.h        \
145         gslist.h        \
146         gspawn.h        \
147         gstrfuncs.h     \
148         gstring.h       \
149         gthread.h       \
150         gthreadpool.h   \
151         gtimer.h        \
152         gtree.h         \
153         gtypes.h        \
154         gunicode.h      \
155         gutils.h        \
156         gwin32.h        \
157         gprintf.h
158
159 install-data-local: install-ms-lib install-libtool-import-lib
160         @if test -f $(glibincludedir)/glist.h ; then                                    \
161           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
162           echo "*** contents of this directory and type 'make install' again." ;        \
163           false ;                                                                       \
164         fi
165
166 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
167
168 if PLATFORM_WIN32
169 no_undefined = -no-undefined
170 endif
171
172 if OS_WIN32
173 # This requires a very new libtool
174 export_symbols = -export-symbols $(srcdir)/glib.def
175
176 install-libtool-import-lib:
177         $(INSTALL) .libs/libglib-2.0.dll.a $(DESTDIR)$(libdir)
178         $(INSTALL) $(srcdir)/glib.def $(DESTDIR)$(libdir)/glib-2.0.def
179
180 uninstall-libtool-import-lib:
181         -rm $(DESTDIR)$(libdir)/libglib-2.0.dll.a $(DESTDIR)$(libdir)/glib-2.0.def
182 else
183 install-libtool-import-lib:
184 uninstall-libtool-import-lib:
185 endif
186
187 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
188 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @GLIB_DEF@
189
190 libglib_2_0_la_LDFLAGS = \
191         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
192         -export-dynamic $(no_undefined) $(export_symbols)
193
194 if OS_WIN32
195 bin_PROGRAMS = gspawn-win32-helper
196 gspawn_win32_helper_LDADD = libglib-2.0.la
197 gspawn_win32_helper_LDFLAGS = -mwindows
198
199 $(G_LIB_WIN32_RESOURCE): glib.rc
200         $(top_srcdir)/build/win32/lt-compile-resource glib.rc $@
201 endif
202
203 glib-2.0.lib: libglib-2.0.la glib.def
204         lib -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
205
206 dist-hook: $(BUILT_EXTRA_DIST)
207         files='$(BUILT_EXTRA_DIST)'; \
208         for f in $$files; do \
209           if test -f $$f; then d=.; else d=$(srcdir); fi; \
210           cp $$d/$$f $(distdir) || exit 1; done