a4224af382433998b30f5232dd299e1535be2fff
[platform/upstream/glib.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 AUTOMAKE_OPTIONS = 1.4
4
5 SUBDIRS = . gobject gmodule gthread docs tests build
6
7 bin_SCRIPTS=glib-config-2.0
8 BUILT_SOURCES=glib-config-2.0
9 glib-config-2.0: glib-config-2.0.in
10
11 INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@
12
13 EXTRA_DIST =                    \
14         ChangeLog.pre-1-2       \
15         glib-2.0.m4             \
16         glib.spec.in            \
17         acglib.m4               \
18         sanity_check            \
19         README.win32            \
20         TODO.xml                \
21         glib.def                \
22         makefile.msc.in         \
23         makefile.mingw.in       \
24         giowin32.c              \
25         glibconfig.h.win32.in   \
26         gwin32.c                \
27         gspawn-win32.c          \
28         gspawn-win32-helper.c   \
29         config.h.win32.in       \
30         build-dll               \
31         glib.rc.in              \
32         glib-2.0.pc.in          \
33         gobject-2.0.pc.in       \
34         gmodule-2.0.pc.in       \
35         gthread-2.0.pc.in       \
36         gen-unicode-tables.pl
37
38 # These may be in the builddir too
39 BUILT_EXTRA_DIST = \
40         makefile.msc            \
41         makefile.mingw          \
42         glibconfig.h.win32      \
43         config.h.win32          \
44         glib.rc                 \
45         glib.spec
46
47 lib_LTLIBRARIES = libglib-1.3.la
48
49 libglib_1_3_la_SOURCES =        \
50         garray.c                \
51         gasyncqueue.c           \
52         gbacktrace.c            \
53         gcache.c                \
54         gcompletion.c           \
55         gconvert.c              \
56         gdataset.c              \
57         gdate.c                 \
58         gerror.c                \
59         gfileutils.c            \
60         ghash.c                 \
61         ghook.c                 \
62         giochannel.c            \
63         giounix.c               \
64         glist.c                 \
65         gmain.c                 \
66         gmarkup.c               \
67         gmem.c                  \
68         gmessages.c             \
69         gnode.c                 \
70         gprimes.c               \
71         gqsort.c                \
72         gqueue.c                \
73         grel.c                  \
74         grand.c                 \
75         gscanner.c              \
76         gshell.c                \
77         gslist.c                \
78         gspawn.c                \
79         gstrfuncs.c             \
80         gstring.c               \
81         gthread.c               \
82         gthreadpool.c           \
83         gtimer.c                \
84         gtree.c                 \
85         guniprop.c              \
86         gutf8.c                 \
87         gunibreak.h             \
88         gunibreak.c             \
89         gunichartables.h        \
90         gunidecomp.h            \
91         gunidecomp.c            \
92         gutils.c
93
94 ## If we decide to link in 'alloca.c', this is how to do it
95 #libglib_1_3_la_LIBADD = @ALLOCA@
96
97 glibincludedir=$(includedir)/glib-2.0
98 glibinclude_HEADERS =   \
99         galloca.h       \
100         garray.h        \
101         gasyncqueue.h   \
102         gbacktrace.h    \
103         gcache.h        \
104         gcompletion.h   \
105         gconvert.h      \
106         gdataset.h      \
107         gdate.h         \
108         gerror.h        \
109         gfileutils.h    \
110         ghash.h         \
111         ghook.h         \
112         giochannel.h    \
113         glib.h          \
114         glib-object.h   \
115         glist.h         \
116         gmacros.h       \
117         gmain.h         \
118         gmarkup.h       \
119         gmem.h          \
120         gmessages.h     \
121         gnode.h         \
122         gprimes.h       \
123         gqsort.h        \
124         gquark.h        \
125         gqueue.h        \
126         grand.h         \
127         grel.h          \
128         gscanner.h      \
129         gshell.h        \
130         gslist.h        \
131         gspawn.h        \
132         gstrfuncs.h     \
133         gstring.h       \
134         gthread.h       \
135         gthreadpool.h   \
136         gtimer.h        \
137         gtree.h         \
138         gtypes.h        \
139         gunicode.h      \
140         gutils.h        \
141         gwin32.h
142
143 configexecincludedir = $(libdir)/glib-2.0/include
144 #configexecinclude_DATA = glibconfig.h
145
146 install-exec-local: glibconfig.h
147         $(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
148         file=$(DESTDIR)$(configexecincludedir)/glibconfig.h; \
149         if test -r $$file && cmp -s glibconfig.h $$file; then :; \
150         else $(INSTALL_DATA) glibconfig.h $$file; fi
151
152 CONFIGURE_DEPENDENCIES = acglib.m4
153
154 BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
155 glibconfig.h: stamp-gc-h
156         @if test -f glibconfig.h; then :; \
157         else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
158 stamp-gc-h: config.status
159         CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=glibconfig.h ./config.status
160         echo timestamp > stamp-gc-h
161
162 libglib_1_3_la_LIBADD = @ICONV_LIBS@
163
164 libglib_1_3_la_LDFLAGS = \
165         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
166         -export-dynamic
167
168 noinst_PROGRAMS = testglib testgdate testgdateparser timeloop
169 testglib_LDADD = libglib-1.3.la
170 testgdate_LDADD = libglib-1.3.la
171 testgdateparser_LDADD = libglib-1.3.la
172 timeloop_LDADD = libglib-1.3.la
173
174 m4datadir = $(datadir)/aclocal
175 m4data_DATA = glib-2.0.m4
176
177 pkgconfigdir = $(libdir)/pkgconfig
178 pkgconfig_DATA = glib-2.0.pc gobject-2.0.pc gmodule-2.0.pc gthread-2.0.pc
179
180 glibconfig.h.win32: $(top_builddir)/config.status $(top_srcdir)/glibconfig.h.win32.in
181         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
182
183 config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in
184         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
185
186 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/makefile.msc.in
187         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
188
189 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/makefile.mingw.in
190         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
191
192 glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in
193         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
194
195 .PHONY: files release sanity snapshot
196
197 files:
198         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
199           echo $$p; \
200         done
201
202 release:
203         rm -rf .deps */.deps
204         cd docs && make glib.html
205         $(MAKE) distcheck
206
207 sanity:
208         ./sanity_check $(VERSION)
209
210 snapshot:
211         $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
212
213 snapcheck:
214         $(MAKE) distcheck distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
215
216 dist-hook: $(BUILT_EXTRA_DIST)
217         files='$(BUILT_EXTRA_DIST)'; \
218         for f in $$files; do \
219           if test -f $$f; then d=.; else d=$(srcdir); fi; \
220           cp $$d/$$f $(distdir) || exit 1; done