* create-native-map.exe: Remove. Just grab a new copy whenever we need to
[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 if HAVE_ZLIB
60 Z_SOURCE = zlib_macros.c
61 Z_LIBS   = -lz
62 else
63 Z_SOURCE = 
64 Z_LIBS   = 
65 endif
66
67 libMonoPosixHelper_la_SOURCES =                 \
68         $(MPH_SOURCE)                           \
69         $(Z_SOURCE)
70
71 libMonoPosixHelper_la_LIBADD =                  \
72         $(MPH_LIBS)                             \
73         $(Z_LIBS)                               \
74         $(XATTR_LIB)
75
76 # libMonoPosixHelper_la_LDFLAGS = -no-undefined -version-info 1:0:1
77 libMonoPosixHelper_la_LDFLAGS = -no-undefined -avoid-version
78 libMonoSupportW_la_LDFLAGS = -no-undefined -avoid-version
79
80 libMonoSupportW_la_SOURCES =                    \
81                 supportw.c                      \
82                 support-heap.c                  \
83                 supportw.h
84
85 libMonoSupportW_la_LIBADD =                     \
86                 $(GLIB_LIBS)
87
88
89 # Use this target to refresh the values in map.[ch]
90 #
91 refresh:
92         cp `pkg-config --variable=Programs create-native-map` . && \
93         $(top_builddir)/runtime/mono-wrapper create-native-map.exe \
94         --autoconf-member=d_off                               \
95         --autoconf-member=d_reclen                            \
96         --autoconf-member=d_type                              \
97         --exclude-native-symbol=Mono_Posix_Stdlib_snprintf    \
98         --impl-macro=_GNU_SOURCE --impl-macro=_XOPEN_SOURCE   \
99         --impl-header="<sys/types.h>"                         \
100         --impl-header="<sys/stat.h>"                          \
101         --impl-header="<sys/time.h>"                          \
102         --autoconf-header="<sys/poll.h>"                      \
103         --autoconf-header="<sys/wait.h>"                      \
104         --autoconf-header="<sys/statvfs.h>"                   \
105         --autoconf-header="<sys/xattr.h>"                     \
106         --autoconf-header="<sys/mman.h>"                      \
107         --impl-header="<unistd.h>"                            \
108         --impl-header="<fcntl.h>"                             \
109         --impl-header="<signal.h>"                            \
110         --autoconf-header="<poll.h>"                          \
111         --autoconf-header="<grp.h>"                           \
112         --impl-header="<errno.h>"                             \
113         --autoconf-header="<syslog.h>"                        \
114         --impl-header="<dirent.h>"                            \
115         --impl-header="<utime.h>"                             \
116         --impl-header="\"mph.h\""                             \
117         --rename-member=st_atime=st_atime_                    \
118         --rename-member=st_ctime=st_ctime_                    \
119         --rename-member=st_mtime=st_mtime_                    \
120         --rename-namespace=Mono.Unix.Native=Mono.Posix        \
121         --library=MonoPosixHelper                             \
122         $(mcs_topdir)/class/lib/net_2_0/Mono.Posix.dll map
123