2006-12-03 Miguel de Icaza <miguel@novell.com>
[mono-project.git] / support / Makefile.am
blob015136550a0c5e9efcf06efa5860b897bb97d2ec
1 if PLATFORM_WIN32
2 SUPPORT=
3 else
4 SUPPORT=libMonoSupportW.la
5 endif
6 lib_LTLIBRARIES =                               \
7         libMonoPosixHelper.la                   \
8         $(SUPPORT)
10 INCLUDES =                                      \
11         $(GLIB_CFLAGS)                          \
12         -I$(top_srcdir)
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
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
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
59 if HAVE_ZLIB
60 Z_SOURCE = zlib_macros.c
61 Z_LIBS   = -lz
62 else
63 Z_SOURCE = 
64 Z_LIBS   = 
65 endif
67 libMonoPosixHelper_la_SOURCES =                 \
68         $(MPH_SOURCE)                           \
69         $(Z_SOURCE)
71 libMonoPosixHelper_la_LIBADD =                  \
72         $(MPH_LIBS)                             \
73         $(Z_LIBS)                               \
74         $(XATTR_LIB)
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
80 libMonoSupportW_la_SOURCES =                    \
81                 supportw.c                      \
82                 support-heap.c                  \
83                 supportw.h
85 libMonoSupportW_la_LIBADD =                     \
86                 $(GLIB_LIBS)
88
89 # Use this target to refresh the values in map.[ch]
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