-
Notifications
You must be signed in to change notification settings - Fork 7
/
libpthread.gmk
148 lines (137 loc) · 4.86 KB
/
libpthread.gmk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#
# $Id: libpthread.gmk,v 1.1 2023-04-23 10:09:48 clib4devs Exp $
#
ifndef SPE
OUT_STATIC := $(BUILD_DIR)/obj/libpthread
OUT_SHARED := $(BUILD_DIR)/obj.shared/libpthread
else
OUT_STATIC := $(BUILD_DIR)/obj/soft-float/libpthread
OUT_SHARED := $(BUILD_DIR)/obj.shared/soft-float/libpthread
endif
ifeq ($(SHARED),yes)
LIBS += $(OUTPUT_LIB)/libpthread.so
endif
ifeq ($(STATIC),yes)
LIBS += $(OUTPUT_LIB)/libpthread.a
endif
PTHREAD_LIB := \
pthread/common.o \
pthread/pthread.o \
pthread/pthread_attr_destroy.o \
pthread/pthread_attr_getdetachstate.o \
pthread/pthread_attr_getguardsize.o \
pthread/pthread_attr_getinheritsched.o \
pthread/pthread_attr_getscope.o \
pthread/pthread_attr_getschedparam.o \
pthread/pthread_attr_getschedpolicy.o \
pthread/pthread_attr_getstack.o \
pthread/pthread_attr_getstacksize.o \
pthread/pthread_attr_init.o \
pthread/pthread_attr_setdetachstate.o \
pthread/pthread_attr_setguardsize.o \
pthread/pthread_attr_setinheritsched.o \
pthread/pthread_attr_setscope.o \
pthread/pthread_attr_setschedparam.o \
pthread/pthread_attr_setschedpolicy.o \
pthread/pthread_attr_setstack.o \
pthread/pthread_attr_setstacksize.o \
pthread/pthread_barrierattr_init.o \
pthread/pthread_barrierattr_destroy.o \
pthread/pthread_barrierattr_getpshared.o \
pthread/pthread_barrierattr_setpshared.o \
pthread/pthread_barrier_destroy.o \
pthread/pthread_barrier_init.o \
pthread/pthread_barrier_wait.o \
pthread/pthread_cancel.o \
pthread/pthread_cleanup_pop.o \
pthread/pthread_cleanup_push.o \
pthread/pthread_concur.o \
pthread/pthread_cond_broadcast.o \
pthread/pthread_cond_destroy.o \
pthread/pthread_cond_init.o \
pthread/pthread_cond_signal.o \
pthread/pthread_cond_timedwait.o \
pthread/pthread_cond_timedwait_relative_np.o \
pthread/pthread_cond_wait.o \
pthread/pthread_condattr_destroy.o \
pthread/pthread_condattr_init.o \
pthread/pthread_condattr_getpshared.o \
pthread/pthread_condattr_setpshared.o \
pthread/pthread_create.o \
pthread/pthread_detach.o \
pthread/pthread_equal.o \
pthread/pthread_exit.o \
pthread/pthread_getattr_np.o \
pthread/pthread_getconcurrency.o \
pthread/pthread_getname_np.o \
pthread/pthread_getschedparam.o \
pthread/pthread_getspecific.o \
pthread/pthread_join.o \
pthread/pthread_key_create.o \
pthread/pthread_key_delete.o \
pthread/pthread_kill.o \
pthread/pthread_mutex_destroy.o \
pthread/pthread_mutex_init.o \
pthread/pthread_mutex_lock.o \
pthread/pthread_mutex_timedlock.o \
pthread/pthread_mutex_trylock.o \
pthread/pthread_mutex_unlock.o \
pthread/pthread_mutexattr_destroy.o \
pthread/pthread_mutexattr_getpshared.o \
pthread/pthread_mutexattr_gettype.o \
pthread/pthread_mutexattr_init.o \
pthread/pthread_mutexattr_setpshared.o \
pthread/pthread_mutexattr_settype.o \
pthread/pthread_num_processors_np.o \
pthread/pthread_once.o \
pthread/pthread_rwlockattr_getpshared.o \
pthread/pthread_rwlockattr_setpshared.o \
pthread/pthread_rwlock_destroy.o \
pthread/pthread_rwlock_init.o \
pthread/pthread_rwlock_rdlock.o \
pthread/pthread_rwlock_timedrdlock.o \
pthread/pthread_rwlock_timedwrlock.o \
pthread/pthread_rwlock_tryrdlock.o \
pthread/pthread_rwlock_trywrlock.o \
pthread/pthread_rwlock_unlock.o \
pthread/pthread_rwlock_wrlock.o \
pthread/pthread_rwlockattr_destroy.o \
pthread/pthread_rwlockattr_init.o \
pthread/pthread_self.o \
pthread/pthread_setconcurrency.o \
pthread/pthread_setcancelstate.o \
pthread/pthread_setcanceltype.o \
pthread/pthread_setname_np.o \
pthread/pthread_setschedparam.o \
pthread/pthread_setschedprio.o \
pthread/pthread_setspecific.o \
pthread/pthread_spin_destroy.o \
pthread/pthread_spin_init.o \
pthread/pthread_spin_lock.o \
pthread/pthread_spin_trylock.o \
pthread/pthread_spin_unlock.o \
pthread/pthread_testcancel.o \
pthread/sched_get_priority_max.o \
pthread/sched_get_priority_min.o \
pthread/sched_yield.o \
pthread/semaphore.o
SOURCES_SHARED = $(addprefix $(OUT_SHARED)/, $(PTHREAD_LIB))
SOURCES_STATIC = $(addprefix $(OUT_STATIC)/, $(PTHREAD_LIB))
# Dependencies to rebuild if the library version changes
$(OUT_STATIC)/%.o : CFLAGS += $(LARGEDATA)
$(OUT_SHARED)/%.o : CFLAGS += $(PIC) $(LARGEDATA)
ifdef SPE
$(OUT_STATIC)/%.o : $(LIB_DIR)/%.c
$(VERBOSE)$(COMPILE_SPE)
$(OUT_SHARED)/%.o : $(LIB_DIR)/%.c
$(VERBOSE)$(COMPILE_SHARED_SPE)
else
$(OUT_STATIC)/%.o : $(LIB_DIR)/%.c
$(VERBOSE)$(COMPILE)
$(OUT_SHARED)/%.o : $(LIB_DIR)/%.c
$(VERBOSE)$(COMPILE_SHARED)
endif
$(OUTPUT_LIB)/libpthread.a : $(SOURCES_STATIC)
$(VERBOSE)$(MAKELIB)
$(OUTPUT_LIB)/libpthread.so : $(OUTPUT_LIB)/libc.so $(SOURCES_SHARED)
$(VERBOSE)$(MAKESHARED)