[interp] Emit more stloc.np (#16796)
[mono-project.git] / support / Makefile.am
blob351e47d93fd1568e89978f024ce5485e61688486
1 if HOST_WIN32
2 SUPPORT=
3 else
4 SUPPORT=libMonoSupportW.la
5 endif
7 if BUILD_SUPPORT
8 lib_LTLIBRARIES =                               \
9         libMonoPosixHelper.la                   \
10         $(SUPPORT)
11 endif
13 AM_CPPFLAGS =                                   \
14         @ZLIB_CFLAGS@                           \
15         $(GLIB_CFLAGS)                          \
16         -I$(top_srcdir)
18 glib_libs = $(top_builddir)/mono/eglib/libeglib.la
20 # Source code which helps implement the ANSI C standards, and thus *should* be
21 # portable to any platform having a C compiler.
22 MPH_C_SOURCE =                                  \
23         errno.c                                 \
24         map.c                                   \
25         map.h                                   \
26         mph.h                                   \
27         signal.c                                \
28         stdio.c                                 \
29         string.c                                        \
30         stdlib.c
32 # Source code which helps implement POSIX and other related Unix standards,
33 # and *may* be portable between Unix platforms.
34 MPH_UNIX_SOURCE =                               \
35         dirent.c                                \
36         fcntl.c                                 \
37         fstab.c                                 \
38         grp.c                                   \
39         macros.c                                \
40         nl.c                                    \
41         nl.h                                    \
42         old-map.c                               \
43         old-map.h                               \
44         pwd.c                                   \
45         serial.c                                \
46         sys-mman.c                              \
47         sys-sendfile.c                          \
48         sys-socket.c                            \
49         sys-stat.c                              \
50         sys-statvfs.c                           \
51         sys-time.c                              \
52         sys-uio.c                               \
53         sys-uio.h                               \
54         sys-utsname.c   \
55         sys-wait.c                              \
56         sys-xattr.c                             \
57         syslog.c                                \
58         time.c                                  \
59         unistd.c                                \
60         utime.c                                 \
61         x-struct-str.c
63 if HOST_WIN32
64 MPH_SOURCE = $(MPH_C_SOURCE)
65 MPH_LIBS   = $(glib_libs)
66 else
67 MPH_SOURCE = $(MPH_C_SOURCE) $(MPH_UNIX_SOURCE)
68 MPH_LIBS   = $(glib_libs)
69 endif
71 MINIZIP_SOURCE = \
72         minizip/crypt.h \
73         minizip/ioapi.c \
74         minizip/ioapi.h \
75         minizip/unzip.c \
76         minizip/unzip.h \
77         minizip/zip.c   \
78         minizip/zip.h
80 ZLIB_SOURCES = \
81         adler32.c       \
82         compress.c      \
83         crc32.c         \
84         uncompr.c       \
85         deflate.c       \
86         gzguts.h        \
87         trees.c         \
88         zutil.c         \
89         inflate.c       \
90         infback.c       \
91         inftrees.c      \
92         inffast.c       \
93         crc32.h         \
94         deflate.h       \
95         inffast.h       \
96         inffixed.h      \
97         inflate.h       \
98         inftrees.h      \
99         trees.h         \
100         zconf.h         \
101         zlib.h          \
102         zutil.h
104 if HAVE_STATIC_ZLIB
105 Z_SOURCE = zlib-helper.c
106 Z_LIBS = $(STATIC_ZLIB_PATH)
107 else
108 if HAVE_SYS_ZLIB
109 Z_SOURCE = zlib-helper.c
110 Z_LIBS= -lz
111 else
112 Z_SOURCE = zlib-helper.c $(ZLIB_SOURCES)
113 Z_LIBS=
114 endif
115 endif
117 libMonoPosixHelper_la_SOURCES =                 \
118         $(MPH_SOURCE)                           \
119         $(Z_SOURCE)                             \
120         $(MINIZIP_SOURCE)
122 libMonoPosixHelper_la_LIBADD =                  \
123         $(MPH_LIBS)                             \
124         $(Z_LIBS)                               \
125         $(XATTR_LIB)
127 # libMonoPosixHelper_la_LDFLAGS = -no-undefined -version-info 1:0:1
128 libMonoPosixHelper_la_LDFLAGS = -no-undefined -avoid-version
129 libMonoSupportW_la_LDFLAGS = -no-undefined -avoid-version
131 libMonoSupportW_la_SOURCES =                    \
132                 supportw.c                      \
133                 support-heap.c                  \
134                 supportw.h
136 libMonoSupportW_la_LIBADD =                     \
137                 $(glib_libs)
139 test-bundle-local:
140         mkdir -p $(TEST_BUNDLE_PATH)
141         cp -L .libs/libMonoPosixHelper$(libsuffix) $(TEST_BUNDLE_PATH)/
144 # Use this target to refresh the values in map.[ch]
146 refresh:
147         cp `pkg-config --variable=Programs create-native-map` . && \
148         $(top_builddir)/runtime/mono-wrapper create-native-map.exe \
149         --autoconf-member=d_off                               \
150         --autoconf-member=d_reclen                            \
151         --autoconf-member=d_type                              \
152         --exclude-native-symbol=Mono_Posix_Stdlib_snprintf    \
153         --impl-macro=_GNU_SOURCE --impl-macro=_XOPEN_SOURCE   \
154         --impl-header="<sys/types.h>"                         \
155         --impl-header="<sys/stat.h>"                          \
156         --autoconf-header="<netinet/in.h>"                    \
157         --autoconf-header="<sys/time.h>"                      \
158         --autoconf-header="<sys/poll.h>"                      \
159         --autoconf-header="<sys/wait.h>"                      \
160         --autoconf-header="<sys/statvfs.h>"                   \
161         --autoconf-header="<sys/xattr.h>"                     \
162         --autoconf-header="<sys/mman.h>"                      \
163         --autoconf-header="<sys/socket.h>"                    \
164         --autoconf-header="<sys/uio.h>"                       \
165         --autoconf-header="<unistd.h>"                        \
166         --impl-header="<fcntl.h>"                             \
167         --impl-header="<signal.h>"                            \
168         --autoconf-header="<poll.h>"                          \
169         --autoconf-header="<grp.h>"                           \
170         --impl-header="<errno.h>"                             \
171         --autoconf-header="<syslog.h>"                        \
172         --autoconf-header="<dirent.h>"                        \
173         --autoconf-header="<utime.h>"                         \
174         --impl-header="<time.h>"                              \
175         --impl-header="\"mph.h\""                             \
176         --rename-member=st_atime=st_atime_                    \
177         --rename-member=st_ctime=st_ctime_                    \
178         --rename-member=st_mtime=st_mtime_                    \
179         --rename-namespace=Mono.Unix.Native=Mono.Posix        \
180         --library=MonoPosixHelper                             \
181         $(mcs_topdir_from_srcdir)/class/lib/net_4_x/Mono.Posix.dll map
183 # Useful if mono is compiled with --enable-shared=no
184 patch-libtool:
185         cp "../libtool" .
186         sed -e 's,build_libtool_libs=no,build_libtool_libs=yes,g' libtool > 2; mv 2 libtool
187         echo "LIBTOOL = bash ./libtool" > 1
188         echo "LTCOMPILE = bash ./libtool --mode=compile $(COMPILE)" >> 1
189         sed -e 's,LIBTOOL =,LIBTOOL2 =,g' Makefile > 2
190         sed -e 's,LTCOMPILE =,LTCOMPILE2 =,g' 2 > 3
191         cat 1 3 > Makefile
192         touch *.c