GNUmakefile 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. #
  2. # --------------------------------------------------------------------------
  3. #
  4. # Pthreads-win32 - POSIX Threads Library for Win32
  5. # Copyright(C) 1998 John E. Bossom
  6. # Copyright(C) 1999,2005 Pthreads-win32 contributors
  7. #
  8. # Contact Email: [email protected]
  9. #
  10. # The current list of contributors is contained
  11. # in the file CONTRIBUTORS included with the source
  12. # code distribution. The list can also be seen at the
  13. # following World Wide Web location:
  14. # http://sources.redhat.com/pthreads-win32/contributors.html
  15. #
  16. # This library is free software; you can redistribute it and/or
  17. # modify it under the terms of the GNU Lesser General Public
  18. # License as published by the Free Software Foundation; either
  19. # version 2 of the License, or (at your option) any later version.
  20. #
  21. # This library is distributed in the hope that it will be useful,
  22. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  24. # Lesser General Public License for more details.
  25. #
  26. # You should have received a copy of the GNU Lesser General Public
  27. # License along with this library in the file COPYING.LIB;
  28. # if not, write to the Free Software Foundation, Inc.,
  29. # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  30. #
  31. DLL_VER = 2
  32. DLL_VERD= $(DLL_VER)d
  33. DEVROOT = C:\PTHREADS
  34. DLLDEST = $(DEVROOT)\DLL
  35. LIBDEST = $(DEVROOT)\DLL
  36. # If Running MsysDTK
  37. RM = rm -f
  38. MV = mv -f
  39. CP = cp -f
  40. # If not.
  41. #RM = erase
  42. #MV = rename
  43. #CP = copy
  44. # For cross compiling use e.g.
  45. # make CROSS=x86_64-w64-mingw32- clean GC-inlined
  46. CROSS =
  47. AR = $(CROSS)ar
  48. DLLTOOL = $(CROSS)dlltool
  49. CC = $(CROSS)gcc
  50. CXX = $(CROSS)g++
  51. RANLIB = $(CROSS)ranlib
  52. RC = $(CROSS)windres
  53. OPT = $(CLEANUP) -O3 # -finline-functions -findirect-inlining
  54. XOPT =
  55. RCFLAGS = --include-dir=.
  56. # Uncomment this if config.h defines RETAIN_WSALASTERROR
  57. #LFLAGS = -lws2_32
  58. # ----------------------------------------------------------------------
  59. # The library can be built with some alternative behaviour to
  60. # facilitate development of applications on Win32 that will be ported
  61. # to other POSIX systems. Nothing definable here will make the library
  62. # non-compliant, but applications that make assumptions that POSIX
  63. # does not garrantee may fail or misbehave under some settings.
  64. #
  65. # PTW32_THREAD_ID_REUSE_INCREMENT
  66. # Purpose:
  67. # POSIX says that applications should assume that thread IDs can be
  68. # recycled. However, Solaris and some other systems use a [very large]
  69. # sequence number as the thread ID, which provides virtual uniqueness.
  70. # Pthreads-win32 provides pseudo-unique IDs when the default increment
  71. # (1) is used, but pthread_t is not a scalar type like Solaris's.
  72. #
  73. # Usage:
  74. # Set to any value in the range: 0 <= value <= 2^wordsize
  75. #
  76. # Examples:
  77. # Set to 0 to emulate non recycle-unique behaviour like Linux or *BSD.
  78. # Set to 1 for recycle-unique thread IDs (this is the default).
  79. # Set to some other +ve value to emulate smaller word size types
  80. # (i.e. will wrap sooner).
  81. #
  82. #PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0"
  83. #
  84. # ----------------------------------------------------------------------
  85. GC_CFLAGS = $(PTW32_FLAGS)
  86. GCE_CFLAGS = $(PTW32_FLAGS) -mthreads
  87. ## Mingw
  88. MAKE ?= make
  89. CFLAGS = $(OPT) $(XOPT) -I. -DHAVE_PTW32_CONFIG_H -Wall
  90. DLL_INLINED_OBJS = \
  91. pthread.o \
  92. version.o
  93. # Agregate modules for inlinability
  94. DLL_OBJS = \
  95. attr.o \
  96. barrier.o \
  97. cancel.o \
  98. cleanup.o \
  99. condvar.o \
  100. create.o \
  101. dll.o \
  102. errno.o \
  103. exit.o \
  104. fork.o \
  105. global.o \
  106. misc.o \
  107. mutex.o \
  108. nonportable.o \
  109. private.o \
  110. rwlock.o \
  111. sched.o \
  112. semaphore.o \
  113. signal.o \
  114. spin.o \
  115. sync.o \
  116. tsd.o \
  117. version.o
  118. # Separate modules for minimum size statically linked images
  119. SMALL_STATIC_OBJS = \
  120. pthread_attr_init.o \
  121. pthread_attr_destroy.o \
  122. pthread_attr_getdetachstate.o \
  123. pthread_attr_setdetachstate.o \
  124. pthread_attr_getstackaddr.o \
  125. pthread_attr_setstackaddr.o \
  126. pthread_attr_getstacksize.o \
  127. pthread_attr_setstacksize.o \
  128. pthread_attr_getscope.o \
  129. pthread_attr_setscope.o \
  130. pthread_attr_setschedpolicy.o \
  131. pthread_attr_getschedpolicy.o \
  132. pthread_attr_setschedparam.o \
  133. pthread_attr_getschedparam.o \
  134. pthread_attr_setinheritsched.o \
  135. pthread_attr_getinheritsched.o \
  136. pthread_barrier_init.o \
  137. pthread_barrier_destroy.o \
  138. pthread_barrier_wait.o \
  139. pthread_barrierattr_init.o \
  140. pthread_barrierattr_destroy.o \
  141. pthread_barrierattr_setpshared.o \
  142. pthread_barrierattr_getpshared.o \
  143. pthread_setcancelstate.o \
  144. pthread_setcanceltype.o \
  145. pthread_testcancel.o \
  146. pthread_cancel.o \
  147. cleanup.o \
  148. pthread_condattr_destroy.o \
  149. pthread_condattr_getpshared.o \
  150. pthread_condattr_init.o \
  151. pthread_condattr_setpshared.o \
  152. pthread_cond_destroy.o \
  153. pthread_cond_init.o \
  154. pthread_cond_signal.o \
  155. pthread_cond_wait.o \
  156. create.o \
  157. dll.o \
  158. autostatic.o \
  159. errno.o \
  160. pthread_exit.o \
  161. fork.o \
  162. global.o \
  163. pthread_mutex_init.o \
  164. pthread_mutex_destroy.o \
  165. pthread_mutexattr_init.o \
  166. pthread_mutexattr_destroy.o \
  167. pthread_mutexattr_getpshared.o \
  168. pthread_mutexattr_setpshared.o \
  169. pthread_mutexattr_settype.o \
  170. pthread_mutexattr_gettype.o \
  171. pthread_mutexattr_setrobust.o \
  172. pthread_mutexattr_getrobust.o \
  173. pthread_mutex_lock.o \
  174. pthread_mutex_timedlock.o \
  175. pthread_mutex_unlock.o \
  176. pthread_mutex_trylock.o \
  177. pthread_mutex_consistent.o \
  178. pthread_mutexattr_setkind_np.o \
  179. pthread_mutexattr_getkind_np.o \
  180. pthread_getw32threadhandle_np.o \
  181. pthread_getunique_np.o \
  182. pthread_delay_np.o \
  183. pthread_num_processors_np.o \
  184. pthread_win32_attach_detach_np.o \
  185. pthread_equal.o \
  186. pthread_getconcurrency.o \
  187. pthread_once.o \
  188. pthread_self.o \
  189. pthread_setconcurrency.o \
  190. pthread_rwlock_init.o \
  191. pthread_rwlock_destroy.o \
  192. pthread_rwlockattr_init.o \
  193. pthread_rwlockattr_destroy.o \
  194. pthread_rwlockattr_getpshared.o \
  195. pthread_rwlockattr_setpshared.o \
  196. pthread_rwlock_rdlock.o \
  197. pthread_rwlock_wrlock.o \
  198. pthread_rwlock_unlock.o \
  199. pthread_rwlock_tryrdlock.o \
  200. pthread_rwlock_trywrlock.o \
  201. pthread_setschedparam.o \
  202. pthread_getschedparam.o \
  203. pthread_timechange_handler_np.o \
  204. ptw32_is_attr.o \
  205. ptw32_cond_check_need_init.o \
  206. ptw32_MCS_lock.o \
  207. ptw32_mutex_check_need_init.o \
  208. ptw32_processInitialize.o \
  209. ptw32_processTerminate.o \
  210. ptw32_threadStart.o \
  211. ptw32_threadDestroy.o \
  212. ptw32_tkAssocCreate.o \
  213. ptw32_tkAssocDestroy.o \
  214. ptw32_callUserDestroyRoutines.o \
  215. ptw32_timespec.o \
  216. ptw32_throw.o \
  217. ptw32_getprocessors.o \
  218. ptw32_calloc.o \
  219. ptw32_new.o \
  220. ptw32_reuse.o \
  221. ptw32_semwait.o \
  222. ptw32_relmillisecs.o \
  223. ptw32_rwlock_check_need_init.o \
  224. sched_get_priority_max.o \
  225. sched_get_priority_min.o \
  226. sched_setscheduler.o \
  227. sched_getscheduler.o \
  228. sched_yield.o \
  229. sem_init.o \
  230. sem_destroy.o \
  231. sem_trywait.o \
  232. sem_timedwait.o \
  233. sem_wait.o \
  234. sem_post.o \
  235. sem_post_multiple.o \
  236. sem_getvalue.o \
  237. sem_open.o \
  238. sem_close.o \
  239. sem_unlink.o \
  240. signal.o \
  241. pthread_kill.o \
  242. ptw32_spinlock_check_need_init.o \
  243. pthread_spin_init.o \
  244. pthread_spin_destroy.o \
  245. pthread_spin_lock.o \
  246. pthread_spin_unlock.o \
  247. pthread_spin_trylock.o \
  248. pthread_detach.o \
  249. pthread_join.o \
  250. pthread_key_create.o \
  251. pthread_key_delete.o \
  252. pthread_setspecific.o \
  253. pthread_getspecific.o \
  254. w32_CancelableWait.o \
  255. version.o
  256. INCL = \
  257. config.h \
  258. implement.h \
  259. semaphore.h \
  260. pthread.h \
  261. need_errno.h
  262. ATTR_SRCS = \
  263. pthread_attr_init.c \
  264. pthread_attr_destroy.c \
  265. pthread_attr_getdetachstate.c \
  266. pthread_attr_setdetachstate.c \
  267. pthread_attr_getstackaddr.c \
  268. pthread_attr_setstackaddr.c \
  269. pthread_attr_getstacksize.c \
  270. pthread_attr_setstacksize.c \
  271. pthread_attr_getscope.c \
  272. pthread_attr_setscope.c
  273. BARRIER_SRCS = \
  274. pthread_barrier_init.c \
  275. pthread_barrier_destroy.c \
  276. pthread_barrier_wait.c \
  277. pthread_barrierattr_init.c \
  278. pthread_barrierattr_destroy.c \
  279. pthread_barrierattr_setpshared.c \
  280. pthread_barrierattr_getpshared.c
  281. CANCEL_SRCS = \
  282. pthread_setcancelstate.c \
  283. pthread_setcanceltype.c \
  284. pthread_testcancel.c \
  285. pthread_cancel.c
  286. CONDVAR_SRCS = \
  287. ptw32_cond_check_need_init.c \
  288. pthread_condattr_destroy.c \
  289. pthread_condattr_getpshared.c \
  290. pthread_condattr_init.c \
  291. pthread_condattr_setpshared.c \
  292. pthread_cond_destroy.c \
  293. pthread_cond_init.c \
  294. pthread_cond_signal.c \
  295. pthread_cond_wait.c
  296. EXIT_SRCS = \
  297. pthread_exit.c
  298. MISC_SRCS = \
  299. pthread_equal.c \
  300. pthread_getconcurrency.c \
  301. pthread_kill.c \
  302. pthread_once.c \
  303. pthread_self.c \
  304. pthread_setconcurrency.c \
  305. ptw32_calloc.c \
  306. ptw32_MCS_lock.c \
  307. ptw32_new.c \
  308. ptw32_reuse.c \
  309. w32_CancelableWait.c
  310. MUTEX_SRCS = \
  311. ptw32_mutex_check_need_init.c \
  312. pthread_mutex_init.c \
  313. pthread_mutex_destroy.c \
  314. pthread_mutexattr_init.c \
  315. pthread_mutexattr_destroy.c \
  316. pthread_mutexattr_getpshared.c \
  317. pthread_mutexattr_setpshared.c \
  318. pthread_mutexattr_settype.c \
  319. pthread_mutexattr_gettype.c \
  320. pthread_mutexattr_setrobust.c \
  321. pthread_mutexattr_getrobust.c \
  322. pthread_mutex_lock.c \
  323. pthread_mutex_timedlock.c \
  324. pthread_mutex_unlock.c \
  325. pthread_mutex_trylock.c \
  326. pthread_mutex_consistent.c
  327. NONPORTABLE_SRCS = \
  328. pthread_mutexattr_setkind_np.c \
  329. pthread_mutexattr_getkind_np.c \
  330. pthread_getw32threadhandle_np.c \
  331. pthread_getunique_np.c \
  332. pthread_delay_np.c \
  333. pthread_num_processors_np.c \
  334. pthread_win32_attach_detach_np.c \
  335. pthread_timechange_handler_np.c
  336. PRIVATE_SRCS = \
  337. ptw32_is_attr.c \
  338. ptw32_processInitialize.c \
  339. ptw32_processTerminate.c \
  340. ptw32_threadStart.c \
  341. ptw32_threadDestroy.c \
  342. ptw32_tkAssocCreate.c \
  343. ptw32_tkAssocDestroy.c \
  344. ptw32_callUserDestroyRoutines.c \
  345. ptw32_semwait.c \
  346. ptw32_relmillisecs.c \
  347. ptw32_timespec.c \
  348. ptw32_throw.c \
  349. ptw32_getprocessors.c
  350. RWLOCK_SRCS = \
  351. ptw32_rwlock_check_need_init.c \
  352. ptw32_rwlock_cancelwrwait.c \
  353. pthread_rwlock_init.c \
  354. pthread_rwlock_destroy.c \
  355. pthread_rwlockattr_init.c \
  356. pthread_rwlockattr_destroy.c \
  357. pthread_rwlockattr_getpshared.c \
  358. pthread_rwlockattr_setpshared.c \
  359. pthread_rwlock_rdlock.c \
  360. pthread_rwlock_timedrdlock.c \
  361. pthread_rwlock_wrlock.c \
  362. pthread_rwlock_timedwrlock.c \
  363. pthread_rwlock_unlock.c \
  364. pthread_rwlock_tryrdlock.c \
  365. pthread_rwlock_trywrlock.c
  366. SCHED_SRCS = \
  367. pthread_attr_setschedpolicy.c \
  368. pthread_attr_getschedpolicy.c \
  369. pthread_attr_setschedparam.c \
  370. pthread_attr_getschedparam.c \
  371. pthread_attr_setinheritsched.c \
  372. pthread_attr_getinheritsched.c \
  373. pthread_setschedparam.c \
  374. pthread_getschedparam.c \
  375. sched_get_priority_max.c \
  376. sched_get_priority_min.c \
  377. sched_setscheduler.c \
  378. sched_getscheduler.c \
  379. sched_yield.c
  380. SEMAPHORE_SRCS = \
  381. sem_init.c \
  382. sem_destroy.c \
  383. sem_trywait.c \
  384. sem_timedwait.c \
  385. sem_wait.c \
  386. sem_post.c \
  387. sem_post_multiple.c \
  388. sem_getvalue.c \
  389. sem_open.c \
  390. sem_close.c \
  391. sem_unlink.c
  392. SPIN_SRCS = \
  393. ptw32_spinlock_check_need_init.c \
  394. pthread_spin_init.c \
  395. pthread_spin_destroy.c \
  396. pthread_spin_lock.c \
  397. pthread_spin_unlock.c \
  398. pthread_spin_trylock.c
  399. SYNC_SRCS = \
  400. pthread_detach.c \
  401. pthread_join.c
  402. TSD_SRCS = \
  403. pthread_key_create.c \
  404. pthread_key_delete.c \
  405. pthread_setspecific.c \
  406. pthread_getspecific.c
  407. GCE_DLL = pthreadGCE$(DLL_VER).dll
  408. GCED_DLL= pthreadGCE$(DLL_VERD).dll
  409. GCE_LIB = libpthreadGCE$(DLL_VER).a
  410. GCED_LIB= libpthreadGCE$(DLL_VERD).a
  411. GCE_INLINED_STAMP = pthreadGCE$(DLL_VER).stamp
  412. GCED_INLINED_STAMP = pthreadGCE$(DLL_VERD).stamp
  413. GCE_STATIC_STAMP = libpthreadGCE$(DLL_VER).stamp
  414. GCED_STATIC_STAMP = libpthreadGCE$(DLL_VERD).stamp
  415. GC_DLL = pthreadGC$(DLL_VER).dll
  416. GCD_DLL = pthreadGC$(DLL_VERD).dll
  417. GC_LIB = libpthreadGC$(DLL_VER).a
  418. GCD_LIB = libpthreadGC$(DLL_VERD).a
  419. GC_INLINED_STAMP = pthreadGC$(DLL_VER).stamp
  420. GCD_INLINED_STAMP = pthreadGC$(DLL_VERD).stamp
  421. GC_STATIC_STAMP = libpthreadGC$(DLL_VER).stamp
  422. GCD_STATIC_STAMP = libpthreadGC$(DLL_VERD).stamp
  423. PTHREAD_DEF = pthread.def
  424. help:
  425. @ echo "Run one of the following command lines:"
  426. @ echo "make clean GC (to build the GNU C dll with C cleanup code)"
  427. @ echo "make clean GCE (to build the GNU C dll with C++ exception handling)"
  428. @ echo "make clean GC-inlined (to build the GNU C inlined dll with C cleanup code)"
  429. @ echo "make clean GCE-inlined (to build the GNU C inlined dll with C++ exception handling)"
  430. @ echo "make clean GC-static (to build the GNU C inlined static lib with C cleanup code)"
  431. @ echo "make clean GC-debug (to build the GNU C debug dll with C cleanup code)"
  432. @ echo "make clean GCE-debug (to build the GNU C debug dll with C++ exception handling)"
  433. @ echo "make clean GC-inlined-debug (to build the GNU C inlined debug dll with C cleanup code)"
  434. @ echo "make clean GCE-inlined-debug (to build the GNU C inlined debug dll with C++ exception handling)"
  435. @ echo "make clean GC-static-debug (to build the GNU C inlined static debug lib with C cleanup code)"
  436. all:
  437. @ $(MAKE) clean GCE
  438. @ $(MAKE) clean GC
  439. GC:
  440. $(MAKE) CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL)
  441. GC-debug:
  442. $(MAKE) CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL)
  443. GCE:
  444. $(MAKE) CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL)
  445. GCE-debug:
  446. $(MAKE) CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL)
  447. GC-inlined:
  448. $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GC_INLINED_STAMP)
  449. GC-inlined-debug:
  450. $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STAMP)
  451. GCE-inlined:
  452. $(MAKE) CC=$(CXX) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GCE_INLINED_STAMP)
  453. GCE-inlined-debug:
  454. $(MAKE) CC=$(CXX) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_INLINED_STAMP)
  455. GC-static:
  456. $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GC_STATIC_STAMP)
  457. GC-static-debug:
  458. $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_STATIC_STAMP)
  459. tests:
  460. @ cd tests
  461. @ $(MAKE) auto
  462. %.pre: %.c
  463. $(CC) -E -o $@ $(CFLAGS) $^
  464. %.s: %.c
  465. $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@
  466. %.o: %.rc
  467. $(RC) $(RCFLAGS) $(CLEANUP) -o $@ -i $<
  468. .SUFFIXES: .dll .rc .c .o
  469. .c.o:; $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $<
  470. $(GC_DLL) $(GCD_DLL): $(DLL_OBJS)
  471. $(CC) $(OPT) -shared -o $(GC_DLL) $(DLL_OBJS) $(LFLAGS)
  472. $(DLLTOOL) -z pthread.def $(DLL_OBJS)
  473. $(DLLTOOL) -k --dllname $@ --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
  474. $(GCE_DLL): $(DLL_OBJS)
  475. $(CC) $(OPT) -mthreads -shared -o $(GCE_DLL) $(DLL_OBJS) $(LFLAGS)
  476. $(DLLTOOL) -z pthread.def $(DLL_OBJS)
  477. $(DLLTOOL) -k --dllname $@ --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
  478. $(GC_INLINED_STAMP) $(GCD_INLINED_STAMP): $(DLL_INLINED_OBJS)
  479. $(CC) $(OPT) $(XOPT) -shared -o $(GC_DLL) $(DLL_INLINED_OBJS) $(LFLAGS)
  480. $(DLLTOOL) -z pthread.def $(DLL_INLINED_OBJS)
  481. $(DLLTOOL) -k --dllname $(GC_DLL) --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
  482. echo touched > $(GC_INLINED_STAMP)
  483. $(GCE_INLINED_STAMP) $(GCED_INLINED_STAMP): $(DLL_INLINED_OBJS)
  484. $(CC) $(OPT) $(XOPT) -mthreads -shared -o $(GCE_DLL) $(DLL_INLINED_OBJS) $(LFLAGS)
  485. $(DLLTOOL) -z pthread.def $(DLL_INLINED_OBJS)
  486. $(DLLTOOL) -k --dllname $(GCE_DLL) --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
  487. echo touched > $(GCE_INLINED_STAMP)
  488. $(GC_STATIC_STAMP) $(GCD_STATIC_STAMP): $(DLL_INLINED_OBJS)
  489. $(RM) $(GC_LIB)
  490. $(AR) -rv $(GC_LIB) $(DLL_INLINED_OBJS)
  491. $(RANLIB) $(GC_LIB)
  492. echo touched > $(GC_STATIC_STAMP)
  493. clean:
  494. -$(RM) *~
  495. -$(RM) *.i
  496. -$(RM) *.s
  497. -$(RM) *.o
  498. -$(RM) *.obj
  499. -$(RM) *.exe
  500. -$(RM) $(PTHREAD_DEF)
  501. realclean: clean
  502. -$(RM) $(GC_LIB)
  503. -$(RM) $(GCE_LIB)
  504. -$(RM) $(GC_DLL)
  505. -$(RM) $(GCE_DLL)
  506. -$(RM) $(GC_INLINED_STAMP)
  507. -$(RM) $(GCE_INLINED_STAMP)
  508. -$(RM) $(GC_STATIC_STAMP)
  509. -$(RM) $(GCD_LIB)
  510. -$(RM) $(GCED_LIB)
  511. -$(RM) $(GCD_DLL)
  512. -$(RM) $(GCED_DLL)
  513. -$(RM) $(GCD_INLINED_STAMP)
  514. -$(RM) $(GCED_INLINED_STAMP)
  515. -$(RM) $(GCD_STATIC_STAMP)
  516. attr.o: attr.c $(ATTR_SRCS) $(INCL)
  517. barrier.o: barrier.c $(BARRIER_SRCS) $(INCL)
  518. cancel.o: cancel.c $(CANCEL_SRCS) $(INCL)
  519. condvar.o: condvar.c $(CONDVAR_SRCS) $(INCL)
  520. exit.o: exit.c $(EXIT_SRCS) $(INCL)
  521. misc.o: misc.c $(MISC_SRCS) $(INCL)
  522. mutex.o: mutex.c $(MUTEX_SRCS) $(INCL)
  523. nonportable.o: nonportable.c $(NONPORTABLE_SRCS) $(INCL)
  524. private.o: private.c $(PRIVATE_SRCS) $(INCL)
  525. rwlock.o: rwlock.c $(RWLOCK_SRCS) $(INCL)
  526. sched.o: sched.c $(SCHED_SRCS) $(INCL)
  527. semaphore.o: semaphore.c $(SEMAPHORE_SRCS) $(INCL)
  528. spin.o: spin.c $(SPIN_SRCS) $(INCL)
  529. sync.o: sync.c $(SYNC_SRCS) $(INCL)
  530. tsd.o: tsd.c $(TSD_SRCS) $(INCL)
  531. version.o: version.rc $(INCL)