~ubuntu-branches/ubuntu/raring/pthreads-win32/raring-proposed

« back to all changes in this revision

Viewing changes to .pc/build-without-need_errno.patch/GNUmakefile

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2012-08-20 08:22:05 UTC
  • Revision ID: package-import@ubuntu.com-20120820082205-0qenriq46lhrlopg
Tags: 2.9.1+dfsg-1
Initial release (Closes: #685545).

Show diffs side-by-side

added added

removed removed

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