More Win32 automake macros. For .def files: GLIB_DEF, GMODULE_DEF,
[platform/upstream/glib.git] / glib / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 INCLUDES = -I$(top_srcdir) -DG_LOG_DOMAIN=g_log_domain_glib \
4         @GLIB_DEBUG_FLAGS@ -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION 
5
6 EXTRA_DIST =                    \
7         gen-unicode-tables.pl   \
8         glib.def
9
10 # These may be in the builddir too
11 BUILT_EXTRA_DIST =              \
12         makefile.msc            \
13         makefile.mingw          \
14         glib.rc
15
16 lib_LTLIBRARIES = libglib-1.3.la
17
18 if MS_LIB_AVAILABLE
19 noinst_DATA = glib-1.3.lib
20 endif
21
22 libglib_1_3_la_SOURCES =        \
23         garray.c                \
24         gasyncqueue.c           \
25         gbacktrace.c            \
26         gbsearcharray.c         \
27         gbsearcharray.h         \
28         gcache.c                \
29         gcompletion.c           \
30         gconvert.c              \
31         gdataset.c              \
32         gdate.c                 \
33         gerror.c                \
34         gfileutils.c            \
35         ghash.c                 \
36         ghook.c                 \
37         giochannel.c            \
38         glibintl.h              \
39         glist.c                 \
40         gmain.c                 \
41         gmarkup.c               \
42         gmem.c                  \
43         gmessages.c             \
44         gnode.c                 \
45         gpattern.c              \
46         gprimes.c               \
47         gqsort.c                \
48         gqueue.c                \
49         grel.c                  \
50         grand.c                 \
51         gscanner.c              \
52         gshell.c                \
53         gslist.c                \
54         gstrfuncs.c             \
55         gstring.c               \
56         gthread.c               \
57         gthreadpool.c           \
58         gtimer.c                \
59         gtree.c                 \
60         guniprop.c              \
61         gutf8.c                 \
62         gunibreak.h             \
63         gunibreak.c             \
64         gunichartables.h        \
65         gunicollate.c           \
66         gunicomp.h              \
67         gunidecomp.h            \
68         gunidecomp.c            \
69         gutils.c
70
71 EXTRA_libglib_1_3_la_SOURCES = \
72         giounix.c       \
73         giowin32.c      \
74         gspawn.c        \
75         gspawn-win32.c  \
76         gwin32.c
77
78 glibincludedir=$(includedir)/glib-2.0
79 glibinclude_HEADERS =   \
80         glib-object.h   \
81         glib.h
82
83 glibsubincludedir=$(includedir)/glib-2.0/glib
84 glibsubinclude_HEADERS =   \
85         galloca.h       \
86         garray.h        \
87         gasyncqueue.h   \
88         gbacktrace.h    \
89         gcache.h        \
90         gcompletion.h   \
91         gconvert.h      \
92         gdataset.h      \
93         gdate.h         \
94         gerror.h        \
95         gfileutils.h    \
96         ghash.h         \
97         ghook.h         \
98         giochannel.h    \
99         glist.h         \
100         gmacros.h       \
101         gmain.h         \
102         gmarkup.h       \
103         gmem.h          \
104         gmessages.h     \
105         gnode.h         \
106         gpattern.h      \
107         gprimes.h       \
108         gqsort.h        \
109         gquark.h        \
110         gqueue.h        \
111         grand.h         \
112         grel.h          \
113         gscanner.h      \
114         gshell.h        \
115         gslist.h        \
116         gspawn.h        \
117         gstrfuncs.h     \
118         gstring.h       \
119         gthread.h       \
120         gthreadpool.h   \
121         gtimer.h        \
122         gtree.h         \
123         gtypes.h        \
124         gunicode.h      \
125         gutils.h        \
126         gwin32.h
127
128 install-data-local:
129         @if test -f $(glibincludedir)/glist.h ; then                                    \
130           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
131           echo "*** contents of this directory and type 'make install' again." ;        \
132           false ;                                                                       \
133         fi
134
135 if PLATFORM_WIN32
136 no_undefined = -no-undefined
137
138 endif
139 if OS_WIN32
140 # This requires a very new libtool
141 export_symbols = -export-symbols glib.def
142 endif
143
144 libglib_1_3_la_LIBADD = @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
145 libglib_1_3_la_DEPENDENCIES = @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @GLIB_DEF@
146
147 libglib_1_3_la_LDFLAGS = \
148         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
149         -export-dynamic $(no_undefined) $(export_symbols)
150
151 if OS_WIN32
152 bin_PROGRAMS = gspawn-win32-helper
153 gspawn_win32_helper_LDADD = libglib-1.3.la
154
155 @G_LIB_WIN32_RESOURCE@ : glib.rc
156         $(top_srcdir)/build/win32/lt-compile-resource glib.rc @G_LIB_WIN32_RESOURCE@
157 endif
158
159 glib-1.3.lib: libglib-1.3.la glib.def
160         lib -name:libglib-1.3-@LT_CURRENT_MINUS_AGE@.dll -def:glib.def -out:$@
161
162 glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib/glib.rc.in
163         cd $(top_builddir) && CONFIG_FILES=glib/$@ CONFIG_HEADERS= $(SHELL) ./config.status
164
165 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/glib/makefile.mingw.in
166         cd $(top_builddir) && CONFIG_FILES=glib/$@ CONFIG_HEADERS= $(SHELL) ./config.status
167
168 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/glib/makefile.msc.in
169         cd $(top_builddir) && CONFIG_FILES=glib/$@ CONFIG_HEADERS= $(SHELL) ./config.status
170
171 dist-hook: $(BUILT_EXTRA_DIST)
172         files='$(BUILT_EXTRA_DIST)'; \
173         for f in $$files; do \
174           if test -f $$f; then d=.; else d=$(srcdir); fi; \
175           cp $$d/$$f $(distdir) || exit 1; done