Add GOption.
[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.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         glib.rc
26
27 lib_LTLIBRARIES = libglib-2.0.la
28
29 if MS_LIB_AVAILABLE
30 noinst_DATA = glib-2.0.lib
31
32 install-ms-lib:
33         $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
34
35 uninstall-ms-lib:
36         -rm $(DESTDIR)$(libdir)/glib-2.0.lib
37 else
38 install-ms-lib:
39 uninstall-ms-lib:
40 endif
41
42 libglib_2_0_la_SOURCES =        \
43         garray.c                \
44         gasyncqueue.c           \
45         gatomic.c               \
46         gbacktrace.c            \
47         gbsearcharray.h         \
48         gcache.c                \
49         gcompletion.c           \
50         gconvert.c              \
51         gdataset.c              \
52         gdate.c                 \
53         gdir.c                  \
54         gerror.c                \
55         gfileutils.c            \
56         ghash.c                 \
57         ghook.c                 \
58         giochannel.c            \
59         glibintl.h              \
60         glist.c                 \
61         gmain.c                 \
62         gmarkup.c               \
63         gmem.c                  \
64         gmessages.c             \
65         gnode.c                 \
66         goption.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         gatomic.h       \
116         gbacktrace.h    \
117         gcache.h        \
118         gcompletion.h   \
119         gconvert.h      \
120         gdataset.h      \
121         gdate.h         \
122         gdir.h          \
123         gerror.h        \
124         gfileutils.h    \
125         ghash.h         \
126         ghook.h         \
127         gi18n.h         \
128         gi18n-lib.h     \
129         giochannel.h    \
130         glist.h         \
131         gmacros.h       \
132         gmain.h         \
133         gmarkup.h       \
134         gmem.h          \
135         gmessages.h     \
136         gnode.h         \
137         goption.h       \
138         gpattern.h      \
139         gprimes.h       \
140         gqsort.h        \
141         gquark.h        \
142         gqueue.h        \
143         grand.h         \
144         grel.h          \
145         gscanner.h      \
146         gshell.h        \
147         gslist.h        \
148         gspawn.h        \
149         gstrfuncs.h     \
150         gstring.h       \
151         gthread.h       \
152         gthreadpool.h   \
153         gtimer.h        \
154         gtree.h         \
155         gtypes.h        \
156         gunicode.h      \
157         gutils.h        \
158         gwin32.h        \
159         gprintf.h
160
161 install-data-local: install-ms-lib install-libtool-import-lib
162         @if test -f $(glibincludedir)/glist.h ; then                                    \
163           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
164           echo "*** contents of this directory and type 'make install' again." ;        \
165           false ;                                                                       \
166         fi
167
168 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
169
170 if PLATFORM_WIN32
171 no_undefined = -no-undefined
172 endif
173
174 if OS_WIN32
175 # This requires a very new libtool
176 export_symbols = -export-symbols $(srcdir)/glib.def
177
178 install-libtool-import-lib:
179         $(INSTALL) .libs/libglib-2.0.dll.a $(DESTDIR)$(libdir)
180         $(INSTALL) $(srcdir)/glib.def $(DESTDIR)$(libdir)/glib-2.0.def
181
182 uninstall-libtool-import-lib:
183         -rm $(DESTDIR)$(libdir)/libglib-2.0.dll.a $(DESTDIR)$(libdir)/glib-2.0.def
184 else
185 install-libtool-import-lib:
186 uninstall-libtool-import-lib:
187 endif
188
189 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
190 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @GLIB_DEF@
191
192 libglib_2_0_la_LDFLAGS = \
193         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
194         -export-dynamic $(no_undefined) $(export_symbols)
195
196 if OS_WIN32
197 bin_PROGRAMS = gspawn-win32-helper
198 gspawn_win32_helper_LDADD = libglib-2.0.la
199 gspawn_win32_helper_LDFLAGS = -mwindows
200
201 $(G_LIB_WIN32_RESOURCE): glib.rc
202         $(top_srcdir)/build/win32/lt-compile-resource glib.rc $@
203 endif
204
205 glib-2.0.lib: libglib-2.0.la glib.def
206         lib -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
207
208 dist-hook: $(BUILT_EXTRA_DIST)
209         files='$(BUILT_EXTRA_DIST)'; \
210         for f in $$files; do \
211           if test -f $$f; then d=.; else d=$(srcdir); fi; \
212           cp $$d/$$f $(distdir) || exit 1; done