Makefile.am 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. if PLATFORM_WIN32
  2. SUPPORT=
  3. else
  4. SUPPORT=libMonoSupportW.la
  5. endif
  6. lib_LTLIBRARIES = \
  7. libMonoPosixHelper.la \
  8. $(SUPPORT)
  9. INCLUDES = \
  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. old-map.c \
  32. old-map.h \
  33. pwd.c \
  34. serial.c \
  35. sys-mman.c \
  36. sys-sendfile.c \
  37. sys-stat.c \
  38. sys-statvfs.c \
  39. sys-time.c \
  40. sys-utsname.c \
  41. sys-wait.c \
  42. sys-xattr.c \
  43. syslog.c \
  44. time.c \
  45. unistd.c \
  46. utime.c \
  47. x-struct-str.c
  48. if PLATFORM_WIN32
  49. MPH_SOURCE = $(MPH_C_SOURCE)
  50. MPH_LIBS =
  51. else
  52. MPH_SOURCE = $(MPH_C_SOURCE) $(MPH_UNIX_SOURCE)
  53. MPH_LIBS = $(GLIB_LIBS)
  54. endif
  55. MINIZIP_SOURCE = \
  56. minizip/crypt.h \
  57. minizip/ioapi.c \
  58. minizip/ioapi.h \
  59. minizip/unzip.c \
  60. minizip/unzip.h \
  61. minizip/zip.c \
  62. minizip/zip.h
  63. ZLIB_SOURCES = \
  64. adler32.c \
  65. compress.c \
  66. crc32.c \
  67. gzio.c \
  68. uncompr.c \
  69. deflate.c \
  70. trees.c \
  71. zutil.c \
  72. inflate.c \
  73. infback.c \
  74. inftrees.c \
  75. inffast.c \
  76. crc32.h \
  77. deflate.h \
  78. inffast.h \
  79. inffixed.h \
  80. inflate.h \
  81. inftrees.h \
  82. trees.h \
  83. zconf.h \
  84. zlib.h \
  85. zutil.h
  86. if HAVE_ZLIB
  87. Z_SOURCE = zlib_macros.c
  88. Z_LIBS= -lz
  89. else
  90. Z_SOURCE = zlib_macros.c $(ZLIB_SOURCES)
  91. Z_LIBS=
  92. endif
  93. libMonoPosixHelper_la_SOURCES = \
  94. $(MPH_SOURCE) \
  95. $(Z_SOURCE) \
  96. $(MINIZIP_SOURCE)
  97. libMonoPosixHelper_la_LIBADD = \
  98. $(MPH_LIBS) \
  99. $(Z_LIBS) \
  100. $(XATTR_LIB)
  101. # libMonoPosixHelper_la_LDFLAGS = -no-undefined -version-info 1:0:1
  102. libMonoPosixHelper_la_LDFLAGS = -no-undefined -avoid-version
  103. libMonoSupportW_la_LDFLAGS = -no-undefined -avoid-version
  104. libMonoSupportW_la_SOURCES = \
  105. supportw.c \
  106. support-heap.c \
  107. supportw.h
  108. libMonoSupportW_la_LIBADD = \
  109. $(GLIB_LIBS)
  110. #
  111. # Use this target to refresh the values in map.[ch]
  112. #
  113. refresh:
  114. cp `pkg-config --variable=Programs create-native-map` . && \
  115. $(top_builddir)/runtime/mono-wrapper create-native-map.exe \
  116. --autoconf-member=d_off \
  117. --autoconf-member=d_reclen \
  118. --autoconf-member=d_type \
  119. --exclude-native-symbol=Mono_Posix_Stdlib_snprintf \
  120. --impl-macro=_GNU_SOURCE --impl-macro=_XOPEN_SOURCE \
  121. --impl-header="<sys/types.h>" \
  122. --impl-header="<sys/stat.h>" \
  123. --autoconf-header="<sys/time.h>" \
  124. --autoconf-header="<sys/poll.h>" \
  125. --autoconf-header="<sys/wait.h>" \
  126. --autoconf-header="<sys/statvfs.h>" \
  127. --autoconf-header="<sys/xattr.h>" \
  128. --autoconf-header="<sys/mman.h>" \
  129. --autoconf-header="<unistd.h>" \
  130. --impl-header="<fcntl.h>" \
  131. --impl-header="<signal.h>" \
  132. --autoconf-header="<poll.h>" \
  133. --autoconf-header="<grp.h>" \
  134. --impl-header="<errno.h>" \
  135. --autoconf-header="<syslog.h>" \
  136. --autoconf-header="<dirent.h>" \
  137. --autoconf-header="<utime.h>" \
  138. --impl-header="<time.h>" \
  139. --impl-header="\"mph.h\"" \
  140. --rename-member=st_atime=st_atime_ \
  141. --rename-member=st_ctime=st_ctime_ \
  142. --rename-member=st_mtime=st_mtime_ \
  143. --rename-namespace=Mono.Unix.Native=Mono.Posix \
  144. --library=MonoPosixHelper \
  145. $(mcs_topdir)/class/lib/net_2_0/Mono.Posix.dll map
  146. # Useful if mono is compiled with --enable-shared=no
  147. patch-libtool:
  148. cp "../libtool" .
  149. sed -e 's,build_libtool_libs=no,build_libtool_libs=yes,g' libtool > 2; mv 2 libtool
  150. sed -e 's,LIBTOOL =,LIBTOOL2 =,g' Makefile > 2 && echo "LIBTOOL = bash ./libtool" > 1 && cat 1 2 > Makefile
  151. touch *.c