* dirent.c, errno.c, fcntl.c, fstab.c, grp.c, macros.c, pwd.c, signal.c,
[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         map-icalls.h
26
27 # Source code which helps implement POSIX and other related Unix standards,
28 # and *may* be portable between Unix platforms.
29 MPH_UNIX_SOURCE =                               \
30         dirent.c                                \
31         fcntl.c                                 \
32         fstab.c                                 \
33         grp.c                                   \
34         macros.c                                \
35         old-map.c                               \
36         old-map.h                               \
37         pwd.c                                   \
38         serial.c                                \
39         sys-mman.c                              \
40         sys-sendfile.c                          \
41         sys-stat.c                              \
42         sys-statvfs.c                           \
43         sys-time.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 if HAVE_ZLIB
61 Z_SOURCE = zlib_macros.c
62 Z_LIBS   = -lz
63 else
64 Z_SOURCE = 
65 Z_LIBS   = 
66 endif
67
68 libMonoPosixHelper_la_SOURCES =                 \
69         $(MPH_SOURCE)                           \
70         $(Z_SOURCE)
71
72 libMonoPosixHelper_la_LIBADD =                  \
73         $(MPH_LIBS)                             \
74         $(Z_LIBS)                               \
75         $(XATTR_LIB)
76
77 # libMonoPosixHelper_la_LDFLAGS = -no-undefined -version-info 1:0:1
78 libMonoPosixHelper_la_LDFLAGS = -no-undefined -avoid-version
79 libMonoSupportW_la_LDFLAGS = -no-undefined -avoid-version
80
81 libMonoSupportW_la_SOURCES =                    \
82                 supportw.c                      \
83                 support-heap.c                  \
84                 supportw.h
85
86 libMonoSupportW_la_LIBADD =                     \
87                 $(GLIB_LIBS)
88
89 update-create-native-map:
90         cp `pkg-config --variable=Programs create-native-map` .
91
92
93 # Use this target to refresh the values in map.[ch]
94 #
95 refresh:
96         $(top_builddir)/runtime/mono-wrapper create-native-map.exe \
97         --autoconf-member=d_off                               \
98         --autoconf-member=d_reclen                            \
99         --autoconf-member=d_type                              \
100         --exclude-native-symbol=Mono_Posix_Stdlib_snprintf    \
101         --impl-macro=_GNU_SOURCE --impl-macro=_XOPEN_SOURCE   \
102         --impl-header="<sys/types.h>"                         \
103         --impl-header="<sys/stat.h>"                          \
104         --impl-header="<sys/time.h>"                          \
105         --autoconf-header="<sys/poll.h>"                      \
106         --autoconf-header="<sys/wait.h>"                      \
107         --autoconf-header="<sys/statvfs.h>"                   \
108         --autoconf-header="<sys/xattr.h>"                     \
109         --autoconf-header="<sys/mman.h>"                      \
110         --impl-header="<unistd.h>"                            \
111         --impl-header="<fcntl.h>"                             \
112         --impl-header="<signal.h>"                            \
113         --autoconf-header="<poll.h>"                          \
114         --autoconf-header="<grp.h>"                           \
115         --impl-header="<errno.h>"                             \
116         --autoconf-header="<syslog.h>"                        \
117         --impl-header="<dirent.h>"                            \
118         --impl-header="<utime.h>"                             \
119         --rename-member=st_atime=st_atime_                    \
120         --rename-member=st_ctime=st_ctime_                    \
121         --rename-member=st_mtime=st_mtime_                    \
122         --rename-namespace=Mono.Unix.Native=Mono.Posix        \
123         --library=MonoPosixHelper                             \
124         $(mcs_topdir)/class/lib/net_2_0/Mono.Posix.dll map
125