New files to implement atomic operations for different platforms. Fixes
[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         gatomic.c               \
48         gbacktrace.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         gthreadinit.h           \
81         gthreadpool.c           \
82         gtimer.c                \
83         gtree.c                 \
84         guniprop.c              \
85         gutf8.c                 \
86         gunibreak.h             \
87         gunibreak.c             \
88         gunichartables.h        \
89         gunicollate.c           \
90         gunicomp.h              \
91         gunidecomp.h            \
92         gunidecomp.c            \
93         gunicodeprivate.h       \
94         gutils.c                \
95         gdebug.h                \
96         gprintf.c               \
97         gprintfint.h
98
99 EXTRA_libglib_2_0_la_SOURCES = \
100         giounix.c       \
101         giowin32.c      \
102         gspawn.c        \
103         gspawn-win32.c  \
104         gwin32.c
105
106 glibincludedir=$(includedir)/glib-2.0
107 glibinclude_HEADERS =   \
108         glib-object.h   \
109         glib.h
110
111 glibsubincludedir=$(includedir)/glib-2.0/glib
112 glibsubinclude_HEADERS =   \
113         galloca.h       \
114         garray.h        \
115         gasyncqueue.h   \
116         gatomic.h       \
117         gbacktrace.h    \
118         gcache.h        \
119         gcompletion.h   \
120         gconvert.h      \
121         gdataset.h      \
122         gdate.h         \
123         gdir.h          \
124         gerror.h        \
125         gfileutils.h    \
126         ghash.h         \
127         ghook.h         \
128         gi18n.h         \
129         gi18n-lib.h     \
130         giochannel.h    \
131         glist.h         \
132         gmacros.h       \
133         gmain.h         \
134         gmarkup.h       \
135         gmem.h          \
136         gmessages.h     \
137         gnode.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