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