* map.h: Flush; add Mono_Posix_Syscall__Utsname, Mono_Posix_Syscall_uname()
[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-utsname.c   \
44         sys-wait.c                              \
45         sys-xattr.c                             \
46         syslog.c                                \
47         time.c                                  \
48         unistd.c                                \
49         utime.c                                 \
50         x-struct-str.c
51
52 if PLATFORM_WIN32
53 MPH_SOURCE = $(MPH_C_SOURCE)
54 MPH_LIBS   =
55 else
56 MPH_SOURCE = $(MPH_C_SOURCE) $(MPH_UNIX_SOURCE)
57 MPH_LIBS   = $(GLIB_LIBS)
58 endif
59
60 ZLIB_SOURCES = \
61         adler32.c       \
62         compress.c      \
63         crc32.c         \
64         gzio.c          \
65         uncompr.c       \
66         deflate.c       \
67         trees.c         \
68         zutil.c         \
69         inflate.c       \
70         infback.c       \
71         inftrees.c      \
72         inffast.c       \
73         crc32.h         \
74         deflate.h       \
75         inffast.h       \
76         inffixed.h      \
77         inflate.h       \
78         inftrees.h      \
79         trees.h         \
80         zconf.h         \
81         zlib.h          \
82         zutil.h
83
84 if HAVE_ZLIB
85 Z_SOURCE = zlib_macros.c 
86 Z_LIBS= -lz
87 else
88 Z_SOURCE = zlib_macros.c $(ZLIB_SOURCES)
89 Z_LIBS=
90 endif
91
92 libMonoPosixHelper_la_SOURCES =                 \
93         $(MPH_SOURCE)                           \
94         $(Z_SOURCE)
95
96 libMonoPosixHelper_la_LIBADD =                  \
97         $(MPH_LIBS)                             \
98         $(Z_LIBS)                               \
99         $(XATTR_LIB)
100
101 # libMonoPosixHelper_la_LDFLAGS = -no-undefined -version-info 1:0:1
102 libMonoPosixHelper_la_LDFLAGS = -no-undefined -avoid-version
103 libMonoSupportW_la_LDFLAGS = -no-undefined -avoid-version
104
105 libMonoSupportW_la_SOURCES =                    \
106                 supportw.c                      \
107                 support-heap.c                  \
108                 supportw.h
109
110 libMonoSupportW_la_LIBADD =                     \
111                 $(GLIB_LIBS)
112
113
114 # Use this target to refresh the values in map.[ch]
115 #
116 refresh:
117         cp `pkg-config --variable=Programs create-native-map` . && \
118         $(top_builddir)/runtime/mono-wrapper create-native-map.exe \
119         --autoconf-member=d_off                               \
120         --autoconf-member=d_reclen                            \
121         --autoconf-member=d_type                              \
122         --exclude-native-symbol=Mono_Posix_Stdlib_snprintf    \
123         --impl-macro=_GNU_SOURCE --impl-macro=_XOPEN_SOURCE   \
124         --impl-header="<sys/types.h>"                         \
125         --impl-header="<sys/stat.h>"                          \
126         --impl-header="<sys/time.h>"                          \
127         --autoconf-header="<sys/poll.h>"                      \
128         --autoconf-header="<sys/wait.h>"                      \
129         --autoconf-header="<sys/statvfs.h>"                   \
130         --autoconf-header="<sys/xattr.h>"                     \
131         --autoconf-header="<sys/mman.h>"                      \
132         --impl-header="<unistd.h>"                            \
133         --impl-header="<fcntl.h>"                             \
134         --impl-header="<signal.h>"                            \
135         --autoconf-header="<poll.h>"                          \
136         --autoconf-header="<grp.h>"                           \
137         --impl-header="<errno.h>"                             \
138         --autoconf-header="<syslog.h>"                        \
139         --impl-header="<dirent.h>"                            \
140         --impl-header="<utime.h>"                             \
141         --impl-header="\"mph.h\""                             \
142         --rename-member=st_atime=st_atime_                    \
143         --rename-member=st_ctime=st_ctime_                    \
144         --rename-member=st_mtime=st_mtime_                    \
145         --rename-namespace=Mono.Unix.Native=Mono.Posix        \
146         --library=MonoPosixHelper                             \
147         $(mcs_topdir)/class/lib/net_2_0/Mono.Posix.dll map
148