1
0

Makefile 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. ################################################################################
  2. #
  3. # Copyright (c) 2013 Minoca Corp.
  4. #
  5. # This file is licensed under the terms of the GNU General Public License
  6. # version 3. Alternative licensing terms are available. Contact
  7. # info@minocacorp.com for details. See the LICENSE file at the root of this
  8. # project for complete licensing information.
  9. #
  10. # Module Name:
  11. #
  12. # C Library
  13. #
  14. # Abstract:
  15. #
  16. # This module contains the dynamic library portion of the C library,
  17. # which is nearly everything. Implementing the bulk of the functionality
  18. # in a dynamic library reduces wasted space on disk and in memory across
  19. # processes by reducing duplicated code. It also allows the C library to
  20. # be updated without recompiling all applications.
  21. #
  22. # Author:
  23. #
  24. # Evan Green 4-Mar-2013
  25. #
  26. # Environment:
  27. #
  28. # User Mode C Library
  29. #
  30. ################################################################################
  31. BINARY = libc.so.1
  32. BINARYTYPE = so
  33. BINPLACE = bin
  34. ##
  35. ## Link in all object files of the included libraries as they are exported.
  36. ##
  37. EXTRA_LDFLAGS += -Wl,--whole-archive -nostdlib
  38. ##
  39. ## Use the initial-exec TLS model, as it's faster for all those C library
  40. ## functions that need to set errno. This means the C library can only be
  41. ## loaded at startup, not dynamically loaded later.
  42. ##
  43. EXTRA_CFLAGS += -ftls-model=initial-exec
  44. INCLUDES += $(SRCROOT)/os/apps/libc/include;
  45. OBJS = assert.o \
  46. brk.o \
  47. bsearch.o \
  48. convert.o \
  49. ctype.o \
  50. dirio.o \
  51. dynlib.o \
  52. env.o \
  53. err.o \
  54. errno.o \
  55. exec.o \
  56. exit.o \
  57. fileio.o \
  58. fnmatch.o \
  59. gaddrinf.o \
  60. getopt.o \
  61. glob.o \
  62. heap.o \
  63. if.o \
  64. inet.o \
  65. init.o \
  66. kerror.o \
  67. langinfo.o \
  68. line.o \
  69. link.o \
  70. locale.o \
  71. math/abs.o \
  72. math/ceil.o \
  73. math/ceilf.o \
  74. math/div.o \
  75. math/exp.o \
  76. math/expf.o \
  77. math/exp2.o \
  78. math/exp2f.o \
  79. math/expm1.o \
  80. math/expm1f.o \
  81. math/floor.o \
  82. math/floorf.o \
  83. math/fmod.o \
  84. math/fmodf.o \
  85. math/hypot.o \
  86. math/hypotf.o \
  87. math/log.o \
  88. math/logf.o \
  89. math/log2.o \
  90. math/log2f.o \
  91. math/log10.o \
  92. math/log10f.o \
  93. math/lround.o \
  94. math/lroundf.o \
  95. math/minmax.o \
  96. math/minmaxf.o \
  97. math/modf.o \
  98. math/modff.o \
  99. math/pow.o \
  100. math/powf.o \
  101. math/rint.o \
  102. math/rintf.o \
  103. math/scalbn.o \
  104. math/scalbnf.o \
  105. math/sqrt.o \
  106. math/sqrtf.o \
  107. math/trig.o \
  108. math/trigf.o \
  109. math/trigarc.o \
  110. math/trigarcf.o \
  111. math/trighyp.o \
  112. math/trighypf.o \
  113. math/trunc.o \
  114. math/truncf.o \
  115. math/util.o \
  116. memory.o \
  117. netaddr.o \
  118. netent.o \
  119. passwd.o \
  120. path.o \
  121. pid.o \
  122. pthread/atfork.o \
  123. pthread/barrier.o \
  124. pthread/cond.o \
  125. pthread/key.o \
  126. pthread/mutex.o \
  127. pthread/once.o \
  128. pthread/pthread.o \
  129. pthread/rwlock.o \
  130. pthread/sema.o \
  131. pthread/setids.o \
  132. pthread/thrattr.o \
  133. pty.o \
  134. qsort.o \
  135. rand.o \
  136. random.o \
  137. realpath.o \
  138. regexcmp.o \
  139. regexexe.o \
  140. resolv.o \
  141. resource.o \
  142. setjmp.o \
  143. scan.o \
  144. scandir.o \
  145. sched.o \
  146. shadow.o \
  147. signals.o \
  148. socket.o \
  149. spawn.o \
  150. stat.o \
  151. statvfs.o \
  152. stream.o \
  153. streamex.o \
  154. string.o \
  155. sysconf.o \
  156. syslog.o \
  157. system.o \
  158. termios.o \
  159. time.o \
  160. times.o \
  161. tmpfile.o \
  162. ucontext.o \
  163. uio.o \
  164. uname.o \
  165. usershel.o \
  166. utmpx.o \
  167. wchar.o \
  168. wctype.o \
  169. wscan.o \
  170. wstream.o \
  171. wstring.o \
  172. ARMV7_OBJS = armv7/contexta.o \
  173. armv7/contextc.o \
  174. armv7/fenva.o \
  175. armv7/fenvc.o \
  176. armv7/setjmpa.o \
  177. armv7/tlsaddr.o \
  178. ARMV6_OBJS = $(ARMV7_OBJS)
  179. X86_OBJS = x86/contexta.o \
  180. x86/contextc.o \
  181. x86/fenv.o \
  182. x86/fenvc.o \
  183. x86/setjmpa.o \
  184. x86/tlsaddr.o \
  185. X64_OBJS = x64/contexta.o \
  186. x64/contextc.o \
  187. x64/fenv.o \
  188. x64/setjmpa.o \
  189. x64/tlsaddr.o \
  190. x86/fenvc.o \
  191. EXTRA_SRC_DIRS = x86 x64 armv7 math pthread
  192. DYNLIBS = $(BINROOT)/libminocaos.so.1 \
  193. ifneq ($(ARCH),x64)
  194. TARGETLIBS = $(OBJROOT)/os/lib/rtl/base/intrins/intrins.a
  195. endif
  196. DIRS = wincsup pthread
  197. TESTDIRS = testc
  198. include $(SRCROOT)/os/minoca.mk
  199. postbuild:
  200. @mkdir -p $(BINROOT)/skel/lib
  201. @cp -p $(BINROOT)/$(BINARY) $(BINROOT)/skel/lib