Makefile.am 4.6 KB

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