~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to win32/3rdparty/pthreads/GNUmakefile

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-20 10:33:44 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20070220103344-zgcu2psnx9d98fpa
Tags: upstream-0.90
ImportĀ upstreamĀ versionĀ 0.90

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=i386-mingw32msvc- 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
62
 
DOPT    = $(CLEANUP) -g -O0
63
 
XOPT    =
64
 
 
65
 
RCFLAGS         = --include-dir=.
66
 
LFLAGS          = -lwsock32
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
 
## Mingw32
100
 
MAKE            ?= make
101
 
CFLAGS  = $(OPT) $(XOPT) -I. -DHAVE_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
 
                errno.o \
174
 
                pthread_exit.o \
175
 
                fork.o \
176
 
                global.o \
177
 
                pthread_mutex_init.o \
178
 
                pthread_mutex_destroy.o \
179
 
                pthread_mutexattr_init.o \
180
 
                pthread_mutexattr_destroy.o \
181
 
                pthread_mutexattr_getpshared.o \
182
 
                pthread_mutexattr_setpshared.o \
183
 
                pthread_mutexattr_settype.o \
184
 
                pthread_mutexattr_gettype.o \
185
 
                pthread_mutex_lock.o \
186
 
                pthread_mutex_timedlock.o \
187
 
                pthread_mutex_unlock.o \
188
 
                pthread_mutex_trylock.o \
189
 
                pthread_mutexattr_setkind_np.o \
190
 
                pthread_mutexattr_getkind_np.o \
191
 
                pthread_getw32threadhandle_np.o \
192
 
                pthread_delay_np.o \
193
 
                pthread_num_processors_np.o \
194
 
                pthread_win32_attach_detach_np.o \
195
 
                pthread_equal.o \
196
 
                pthread_getconcurrency.o \
197
 
                pthread_once.o \
198
 
                pthread_self.o \
199
 
                pthread_setconcurrency.o \
200
 
                pthread_rwlock_init.o \
201
 
                pthread_rwlock_destroy.o \
202
 
                pthread_rwlockattr_init.o \
203
 
                pthread_rwlockattr_destroy.o \
204
 
                pthread_rwlockattr_getpshared.o \
205
 
                pthread_rwlockattr_setpshared.o \
206
 
                pthread_rwlock_rdlock.o \
207
 
                pthread_rwlock_wrlock.o \
208
 
                pthread_rwlock_unlock.o \
209
 
                pthread_rwlock_tryrdlock.o \
210
 
                pthread_rwlock_trywrlock.o \
211
 
                pthread_setschedparam.o \
212
 
                pthread_getschedparam.o \
213
 
                pthread_timechange_handler_np.o \
214
 
                ptw32_is_attr.o \
215
 
                ptw32_cond_check_need_init.o \
216
 
                ptw32_MCS_lock.o \
217
 
                ptw32_mutex_check_need_init.o \
218
 
                ptw32_processInitialize.o \
219
 
                ptw32_processTerminate.o \
220
 
                ptw32_threadStart.o \
221
 
                ptw32_threadDestroy.o \
222
 
                ptw32_tkAssocCreate.o \
223
 
                ptw32_tkAssocDestroy.o \
224
 
                ptw32_callUserDestroyRoutines.o \
225
 
                ptw32_timespec.o \
226
 
                ptw32_throw.o \
227
 
                ptw32_InterlockedCompareExchange.o \
228
 
                ptw32_getprocessors.o \
229
 
                ptw32_calloc.o \
230
 
                ptw32_new.o \
231
 
                ptw32_reuse.o \
232
 
                ptw32_semwait.o \
233
 
                ptw32_relmillisecs.o \
234
 
                ptw32_rwlock_check_need_init.o \
235
 
                sched_get_priority_max.o \
236
 
                sched_get_priority_min.o \
237
 
                sched_setscheduler.o \
238
 
                sched_getscheduler.o \
239
 
                sched_yield.o \
240
 
                sem_init.o \
241
 
                sem_destroy.o \
242
 
                sem_trywait.o \
243
 
                sem_timedwait.o \
244
 
                sem_wait.o \
245
 
                sem_post.o \
246
 
                sem_post_multiple.o \
247
 
                sem_getvalue.o \
248
 
                sem_open.o \
249
 
                sem_close.o \
250
 
                sem_unlink.o \
251
 
                signal.o \
252
 
                pthread_kill.o \
253
 
                ptw32_spinlock_check_need_init.o \
254
 
                pthread_spin_init.o \
255
 
                pthread_spin_destroy.o \
256
 
                pthread_spin_lock.o \
257
 
                pthread_spin_unlock.o \
258
 
                pthread_spin_trylock.o \
259
 
                pthread_detach.o \
260
 
                pthread_join.o \
261
 
                pthread_key_create.o \
262
 
                pthread_key_delete.o \
263
 
                pthread_setspecific.o \
264
 
                pthread_getspecific.o \
265
 
                w32_CancelableWait.o \
266
 
                version.o
267
 
 
268
 
INCL    = \
269
 
                config.h \
270
 
                implement.h \
271
 
                semaphore.h \
272
 
                pthread.h \
273
 
                need_errno.h
274
 
 
275
 
ATTR_SRCS       = \
276
 
                pthread_attr_init.c \
277
 
                pthread_attr_destroy.c \
278
 
                pthread_attr_getdetachstate.c \
279
 
                pthread_attr_setdetachstate.c \
280
 
                pthread_attr_getstackaddr.c \
281
 
                pthread_attr_setstackaddr.c \
282
 
                pthread_attr_getstacksize.c \
283
 
                pthread_attr_setstacksize.c \
284
 
                pthread_attr_getscope.c \
285
 
                pthread_attr_setscope.c
286
 
 
287
 
BARRIER_SRCS = \
288
 
                pthread_barrier_init.c \
289
 
                pthread_barrier_destroy.c \
290
 
                pthread_barrier_wait.c \
291
 
                pthread_barrierattr_init.c \
292
 
                pthread_barrierattr_destroy.c \
293
 
                pthread_barrierattr_setpshared.c \
294
 
                pthread_barrierattr_getpshared.c
295
 
 
296
 
CANCEL_SRCS     = \
297
 
                pthread_setcancelstate.c \
298
 
                pthread_setcanceltype.c \
299
 
                pthread_testcancel.c \
300
 
                pthread_cancel.c 
301
 
 
302
 
CONDVAR_SRCS    = \
303
 
                ptw32_cond_check_need_init.c \
304
 
                pthread_condattr_destroy.c \
305
 
                pthread_condattr_getpshared.c \
306
 
                pthread_condattr_init.c \
307
 
                pthread_condattr_setpshared.c \
308
 
                pthread_cond_destroy.c \
309
 
                pthread_cond_init.c \
310
 
                pthread_cond_signal.c \
311
 
                pthread_cond_wait.c
312
 
 
313
 
EXIT_SRCS       = \
314
 
                pthread_exit.c
315
 
 
316
 
MISC_SRCS       = \
317
 
                pthread_equal.c \
318
 
                pthread_getconcurrency.c \
319
 
                pthread_kill.c \
320
 
                pthread_once.c \
321
 
                pthread_self.c \
322
 
                pthread_setconcurrency.c \
323
 
                ptw32_calloc.c \
324
 
                ptw32_MCS_lock.c \
325
 
                ptw32_new.c \
326
 
                ptw32_reuse.c \
327
 
                w32_CancelableWait.c
328
 
 
329
 
MUTEX_SRCS      = \
330
 
                ptw32_mutex_check_need_init.c \
331
 
                pthread_mutex_init.c \
332
 
                pthread_mutex_destroy.c \
333
 
                pthread_mutexattr_init.c \
334
 
                pthread_mutexattr_destroy.c \
335
 
                pthread_mutexattr_getpshared.c \
336
 
                pthread_mutexattr_setpshared.c \
337
 
                pthread_mutexattr_settype.c \
338
 
                pthread_mutexattr_gettype.c \
339
 
                pthread_mutex_lock.c \
340
 
                pthread_mutex_timedlock.c \
341
 
                pthread_mutex_unlock.c \
342
 
                pthread_mutex_trylock.c
343
 
 
344
 
NONPORTABLE_SRCS = \
345
 
                pthread_mutexattr_setkind_np.c \
346
 
                pthread_mutexattr_getkind_np.c \
347
 
                pthread_getw32threadhandle_np.c \
348
 
                pthread_delay_np.c \
349
 
                pthread_num_processors_np.c \
350
 
                pthread_win32_attach_detach_np.c \
351
 
                pthread_timechange_handler_np.c 
352
 
 
353
 
PRIVATE_SRCS    = \
354
 
                ptw32_is_attr.c \
355
 
                ptw32_processInitialize.c \
356
 
                ptw32_processTerminate.c \
357
 
                ptw32_threadStart.c \
358
 
                ptw32_threadDestroy.c \
359
 
                ptw32_tkAssocCreate.c \
360
 
                ptw32_tkAssocDestroy.c \
361
 
                ptw32_callUserDestroyRoutines.c \
362
 
                ptw32_semwait.c \
363
 
                ptw32_relmillisecs.c \
364
 
                ptw32_timespec.c \
365
 
                ptw32_throw.c \
366
 
                ptw32_InterlockedCompareExchange.c \
367
 
                ptw32_getprocessors.c
368
 
 
369
 
RWLOCK_SRCS     = \
370
 
                ptw32_rwlock_check_need_init.c \
371
 
                ptw32_rwlock_cancelwrwait.c \
372
 
                pthread_rwlock_init.c \
373
 
                pthread_rwlock_destroy.c \
374
 
                pthread_rwlockattr_init.c \
375
 
                pthread_rwlockattr_destroy.c \
376
 
                pthread_rwlockattr_getpshared.c \
377
 
                pthread_rwlockattr_setpshared.c \
378
 
                pthread_rwlock_rdlock.c \
379
 
                pthread_rwlock_timedrdlock.c \
380
 
                pthread_rwlock_wrlock.c \
381
 
                pthread_rwlock_timedwrlock.c \
382
 
                pthread_rwlock_unlock.c \
383
 
                pthread_rwlock_tryrdlock.c \
384
 
                pthread_rwlock_trywrlock.c
385
 
 
386
 
SCHED_SRCS      = \
387
 
                pthread_attr_setschedpolicy.c \
388
 
                pthread_attr_getschedpolicy.c \
389
 
                pthread_attr_setschedparam.c \
390
 
                pthread_attr_getschedparam.c \
391
 
                pthread_attr_setinheritsched.c \
392
 
                pthread_attr_getinheritsched.c \
393
 
                pthread_setschedparam.c \
394
 
                pthread_getschedparam.c \
395
 
                sched_get_priority_max.c \
396
 
                sched_get_priority_min.c \
397
 
                sched_setscheduler.c \
398
 
                sched_getscheduler.c \
399
 
                sched_yield.c
400
 
 
401
 
SEMAPHORE_SRCS = \
402
 
                sem_init.c \
403
 
                sem_destroy.c \
404
 
                sem_trywait.c \
405
 
                sem_timedwait.c \
406
 
                sem_wait.c \
407
 
                sem_post.c \
408
 
                sem_post_multiple.c \
409
 
                sem_getvalue.c \
410
 
                sem_open.c \
411
 
                sem_close.c \
412
 
                sem_unlink.c
413
 
 
414
 
SPIN_SRCS       = \
415
 
                ptw32_spinlock_check_need_init.c \
416
 
                pthread_spin_init.c \
417
 
                pthread_spin_destroy.c \
418
 
                pthread_spin_lock.c \
419
 
                pthread_spin_unlock.c \
420
 
                pthread_spin_trylock.c
421
 
 
422
 
SYNC_SRCS       = \
423
 
                pthread_detach.c \
424
 
                pthread_join.c
425
 
 
426
 
TSD_SRCS        = \
427
 
                pthread_key_create.c \
428
 
                pthread_key_delete.c \
429
 
                pthread_setspecific.c \
430
 
                pthread_getspecific.c
431
 
 
432
 
 
433
 
GCE_DLL = pthreadGCE$(DLL_VER).dll
434
 
GCED_DLL= pthreadGCE$(DLL_VERD).dll
435
 
GCE_LIB = libpthreadGCE$(DLL_VER).a
436
 
GCED_LIB= libpthreadGCE$(DLL_VERD).a
437
 
GCE_INLINED_STAMP = pthreadGCE$(DLL_VER).stamp
438
 
GCED_INLINED_STAMP = pthreadGCE$(DLL_VERD).stamp
439
 
 
440
 
GC_DLL  = pthreadGC$(DLL_VER).dll
441
 
GCD_DLL = pthreadGC$(DLL_VERD).dll
442
 
GC_LIB  = libpthreadGC$(DLL_VER).a
443
 
GCD_LIB = libpthreadGC$(DLL_VERD).a
444
 
GC_INLINED_STAMP = pthreadGC$(DLL_VER).stamp
445
 
GCD_INLINED_STAMP = pthreadGC$(DLL_VERD).stamp
446
 
GC_STATIC_STAMP = libpthreadGC$(DLL_VER).stamp
447
 
GCD_STATIC_STAMP = libpthreadGC$(DLL_VERD).stamp
448
 
 
449
 
PTHREAD_DEF     = pthread.def
450
 
 
451
 
help:
452
 
        @ echo "Run one of the following command lines:"
453
 
        @ echo "make clean GC            (to build the GNU C dll with C cleanup code)"
454
 
        @ echo "make clean GCE           (to build the GNU C dll with C++ exception handling)"
455
 
        @ echo "make clean GC-inlined    (to build the GNU C inlined dll with C cleanup code)"
456
 
        @ echo "make clean GCE-inlined   (to build the GNU C inlined dll with C++ exception handling)"
457
 
        @ echo "make clean GC-static     (to build the GNU C inlined static lib with C cleanup code)"
458
 
        @ echo "make clean GC-debug      (to build the GNU C debug dll with C cleanup code)"
459
 
        @ echo "make clean GCE-debug     (to build the GNU C debug dll with C++ exception handling)"
460
 
        @ echo "make clean GC-inlined-debug    (to build the GNU C inlined debug dll with C cleanup code)"
461
 
        @ echo "make clean GCE-inlined-debug   (to build the GNU C inlined debug dll with C++ exception handling)"
462
 
        @ echo "make clean GC-static-debug     (to build the GNU C inlined static debug lib with C cleanup code)"
463
 
 
464
 
all:
465
 
        @ $(MAKE) clean GCE
466
 
        @ $(MAKE) clean GC
467
 
 
468
 
GC:
469
 
                $(MAKE) CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL)
470
 
 
471
 
GC-debug:
472
 
                $(MAKE) CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="$(DOPT)" $(GCD_DLL)
473
 
 
474
 
GCE:
475
 
                $(MAKE) CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL)
476
 
 
477
 
GCE-debug:
478
 
                $(MAKE) CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="$(DOPT)" $(GCED_DLL)
479
 
 
480
 
GC-inlined:
481
 
                $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GC_INLINED_STAMP)
482
 
 
483
 
GC-inlined-debug:
484
 
                $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" DLL_VER=$(DLL_VERD) OPT="$(DOPT)" $(GCD_INLINED_STAMP)
485
 
 
486
 
GCE-inlined:
487
 
                $(MAKE) CC=$(CXX) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GCE_INLINED_STAMP)
488
 
 
489
 
GCE-inlined-debug:
490
 
                $(MAKE) CC=$(CXX) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" DLL_VER=$(DLL_VERD) OPT="$(DOPT)" $(GCED_INLINED_STAMP)
491
 
 
492
 
GC-static:
493
 
                $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GC_STATIC_STAMP)
494
 
 
495
 
GC-static-debug:
496
 
                $(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="$(DOPT)" $(GCD_STATIC_STAMP)
497
 
 
498
 
tests:
499
 
        @ cd tests
500
 
        @ $(MAKE) auto
501
 
 
502
 
%.pre: %.c
503
 
        $(CC) -E -o $@ $(CFLAGS) $^
504
 
 
505
 
%.s: %.c
506
 
        $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@
507
 
 
508
 
%.o: %.rc
509
 
        $(RC) $(RCFLAGS) $(CLEANUP) -o $@ $<
510
 
 
511
 
.SUFFIXES: .dll .rc .c .o
512
 
 
513
 
.c.o:;           $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $<
514
 
 
515
 
 
516
 
$(GC_DLL) $(GCD_DLL): $(DLL_OBJS)
517
 
        $(CC) $(OPT) -shared -o $(GC_DLL) $(DLL_OBJS) $(LFLAGS)
518
 
        $(DLLTOOL) -z pthread.def $(DLL_OBJS)
519
 
        $(DLLTOOL) -k --dllname $@ --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
520
 
 
521
 
$(GCE_DLL): $(DLL_OBJS)
522
 
        $(CC) $(OPT) -mthreads -shared -o $(GCE_DLL) $(DLL_OBJS) $(LFLAGS)
523
 
        $(DLLTOOL) -z pthread.def $(DLL_OBJS)
524
 
        $(DLLTOOL) -k --dllname $@ --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
525
 
 
526
 
$(GC_INLINED_STAMP) $(GCD_INLINED_STAMP): $(DLL_INLINED_OBJS)
527
 
        $(CC) $(OPT) $(XOPT) -shared -o $(GC_DLL) $(DLL_INLINED_OBJS) $(LFLAGS)
528
 
        $(DLLTOOL) -z pthread.def $(DLL_INLINED_OBJS)
529
 
        $(DLLTOOL) -k --dllname $(GC_DLL) --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
530
 
        echo touched > $(GC_INLINED_STAMP)
531
 
 
532
 
$(GCE_INLINED_STAMP) $(GCED_INLINED_STAMP): $(DLL_INLINED_OBJS)
533
 
        $(CC) $(OPT) $(XOPT) -mthreads -shared -o $(GCE_DLL) $(DLL_INLINED_OBJS)  $(LFLAGS)
534
 
        $(DLLTOOL) -z pthread.def $(DLL_INLINED_OBJS)
535
 
        $(DLLTOOL) -k --dllname $(GCE_DLL) --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
536
 
        echo touched > $(GCE_INLINED_STAMP)
537
 
 
538
 
$(GC_STATIC_STAMP) $(GCD_STATIC_STAMP): $(DLL_INLINED_OBJS)
539
 
        $(RM) $(GC_LIB)
540
 
        $(AR) -rv $(GC_LIB) $(DLL_INLINED_OBJS)
541
 
        $(RANLIB) $(GC_LIB)
542
 
        echo touched > $(GC_STATIC_STAMP)
543
 
 
544
 
clean:
545
 
        -$(RM) *~
546
 
        -$(RM) *.i
547
 
        -$(RM) *.o
548
 
        -$(RM) *.obj
549
 
        -$(RM) *.exe
550
 
        -$(RM) $(PTHREAD_DEF)
551
 
 
552
 
realclean: clean
553
 
        -$(RM) $(GC_LIB)
554
 
        -$(RM) $(GCE_LIB)
555
 
        -$(RM) $(GC_DLL)
556
 
        -$(RM) $(GCE_DLL)
557
 
        -$(RM) $(GC_INLINED_STAMP)
558
 
        -$(RM) $(GCE_INLINED_STAMP)
559
 
        -$(RM) $(GC_STATIC_STAMP)
560
 
        -$(RM) $(GCD_LIB)
561
 
        -$(RM) $(GCED_LIB)
562
 
        -$(RM) $(GCD_DLL)
563
 
        -$(RM) $(GCED_DLL)
564
 
        -$(RM) $(GCD_INLINED_STAMP)
565
 
        -$(RM) $(GCED_INLINED_STAMP)
566
 
        -$(RM) $(GCD_STATIC_STAMP)
567
 
 
568
 
attr.o:         attr.c $(ATTR_SRCS) $(INCL)
569
 
barrier.o:      barrier.c $(BARRIER_SRCS) $(INCL)
570
 
cancel.o:       cancel.c $(CANCEL_SRCS) $(INCL)
571
 
condvar.o:      condvar.c $(CONDVAR_SRCS) $(INCL)
572
 
exit.o:         exit.c $(EXIT_SRCS) $(INCL)
573
 
misc.o:         misc.c $(MISC_SRCS) $(INCL)
574
 
mutex.o:        mutex.c $(MUTEX_SRCS) $(INCL)
575
 
nonportable.o:  nonportable.c $(NONPORTABLE_SRCS) $(INCL)
576
 
private.o:      private.c $(PRIVATE_SRCS) $(INCL)
577
 
rwlock.o:       rwlock.c $(RWLOCK_SRCS) $(INCL)
578
 
sched.o:        sched.c $(SCHED_SRCS) $(INCL)
579
 
semaphore.o:    semaphore.c $(SEMAPHORE_SRCS) $(INCL)
580
 
spin.o:         spin.c $(SPIN_SRCS) $(INCL)
581
 
sync.o:         sync.c $(SYNC_SRCS) $(INCL)
582
 
tsd.o:          tsd.c $(TSD_SRCS) $(INCL)
583
 
version.o:      version.rc $(INCL)