* dirent.c: Fix `struct dirent' overflow on Solaris. See #82678.
[mono.git] / support / Makefile.am
1 if PLATFORM_WIN32
2 SUPPORT=
3 else
4 SUPPORT=libMonoSupportW.la
5 endif
6 lib_LTLIBRARIES =                               \
7         libMonoPosixHelper.la                   \
8         $(SUPPORT)
9
10 INCLUDES =                                      \
11         $(GLIB_CFLAGS)                          \
12         -I$(top_srcdir)
13
14 # Source code which helps implement the ANSI C standards, and thus *should* be
15 # portable to any platform having a C compiler.
16 MPH_C_SOURCE =                                  \
17         errno.c                                 \
18         map.c                                   \
19         map.h                                   \
20         mph.h                                   \
21         signal.c                                \
22         stdio.c                                 \
23         string.c                                        \
24         stdlib.c
25
26 # Source code which helps implement POSIX and other related Unix standards,
27 # and *may* be portable between Unix platforms.
28 MPH_UNIX_SOURCE =                               \
29         dirent.c                                \
30         fcntl.c                                 \
31         fstab.c                                 \
32         grp.c                                   \
33         macros.c                                \
34         old-map.c                               \
35         old-map.h                               \
36         pwd.c                                   \
37         serial.c                                \
38         sys-mman.c                              \
39         sys-sendfile.c                          \
40         sys-stat.c                              \
41         sys-statvfs.c                           \
42         sys-time.c                              \
43         sys-wait.c                              \
44         sys-xattr.c                             \
45         syslog.c                                \
46         time.c                                  \
47         unistd.c                                \
48         utime.c                                 \
49         x-struct-str.c
50
51 if PLATFORM_WIN32
52 MPH_SOURCE = $(MPH_C_SOURCE)
53 MPH_LIBS   =
54 else
55 MPH_SOURCE = $(MPH_C_SOURCE) $(MPH_UNIX_SOURCE)
56 MPH_LIBS   = $(GLIB_LIBS)
57 endif
58
59 ZLIB_SOURCES = \
60         adler32.c       \
61         compress.c      \
62         crc32.c         \
63         gzio.c          \
64         uncompr.c       \
65         deflate.c       \
66         trees.c         \
67         zutil.c         \
68         inflate.c       \
69         infback.c       \
70         inftrees.c      \
71         inffast.c       \
72         crc32.h         \
73         deflate.h       \
74         inffast.h       \
75         inffixed.h      \
76         inflate.h       \
77         inftrees.h      \
78         trees.h         \
79         zconf.h         \
80         zlib.h          \
81         zutil.h
82
83 if HAVE_ZLIB
84 Z_SOURCE = zlib_macros.c 
85 Z_LIBS= -lz
86 else
87 Z_SOURCE = zlib_macros.c $(ZLIB_SOURCES)
88 Z_LIBS=
89 endif
90
91 libMonoPosixHelper_la_SOURCES =                 \
92         $(MPH_SOURCE)                           \
93         $(Z_SOURCE)
94
95 libMonoPosixHelper_la_LIBADD =                  \
96         $(MPH_LIBS)                             \
97         $(Z_LIBS)                               \
98         $(XATTR_LIB)
99
100 # libMonoPosixHelper_la_LDFLAGS = -no-undefined -version-info 1:0:1
101 libMonoPosixHelper_la_LDFLAGS = -no-undefined -avoid-version
102 libMonoSupportW_la_LDFLAGS = -no-undefined -avoid-version
103
104 libMonoSupportW_la_SOURCES =                    \
105                 supportw.c                      \
106                 support-heap.c                  \
107                 supportw.h
108
109 libMonoSupportW_la_LIBADD =                     \
110                 $(GLIB_LIBS)
111
112
113 # Use this target to refresh the values in map.[ch]
114 #
115 refresh:
116         cp `pkg-config --variable=Programs create-native-map` . && \
117         $(top_builddir)/runtime/mono-wrapper create-native-map.exe \
118         --autoconf-member=d_off                               \
119         --autoconf-member=d_reclen                            \
120         --autoconf-member=d_type                              \
121         --exclude-native-symbol=Mono_Posix_Stdlib_snprintf    \
122         --impl-macro=_GNU_SOURCE --impl-macro=_XOPEN_SOURCE   \
123         --impl-header="<sys/types.h>"                         \
124         --impl-header="<sys/stat.h>"                          \
125         --impl-header="<sys/time.h>"                          \
126         --autoconf-header="<sys/poll.h>"                      \
127         --autoconf-header="<sys/wait.h>"                      \
128         --autoconf-header="<sys/statvfs.h>"                   \
129         --autoconf-header="<sys/xattr.h>"                     \
130         --autoconf-header="<sys/mman.h>"                      \
131         --impl-header="<unistd.h>"                            \
132         --impl-header="<fcntl.h>"                             \
133         --impl-header="<signal.h>"                            \
134         --autoconf-header="<poll.h>"                          \
135         --autoconf-header="<grp.h>"                           \
136         --impl-header="<errno.h>"                             \
137         --autoconf-header="<syslog.h>"                        \
138         --impl-header="<dirent.h>"                            \
139         --impl-header="<utime.h>"                             \
140         --impl-header="\"mph.h\""                             \
141         --rename-member=st_atime=st_atime_                    \
142         --rename-member=st_ctime=st_ctime_                    \
143         --rename-member=st_mtime=st_mtime_                    \
144         --rename-namespace=Mono.Unix.Native=Mono.Posix        \
145         --library=MonoPosixHelper                             \
146         $(mcs_topdir)/class/lib/net_2_0/Mono.Posix.dll map
147