Subversion Repositories shark

Rev

Rev 632 | Rev 659 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
#
2
# this file contains the library dependencies
3
#
4
 
45 pj 5
OSLIB_LIB=$(OSLIB)/lib
2 pj 6
 
45 pj 7
LINK_STARTUP = $(OSLIB_LIB)/x0.o
2 pj 8
 
9
LINK_LIB =
10
LIB_DEP =
11
 
107 pj 12
 
13
# Dependencies
14
# -------------------------------------------------------
15
 
16
# these are the libraries the use wants to use
17
USELIB = $(SHARKOPT)
18
 
19
ifeq ($(findstring __PNG__,$(SHARKOPT)) , __PNG__)
20
USELIB += __ZLIB__
21
endif
22
 
638 giacomo 23
INCL += -I$(BASE)/drivers/linuxc26/include
24
 
588 giacomo 25
# PCI
431 giacomo 26
# ----------------------------------------------------------------
588 giacomo 27
ifeq ($(findstring __PCI__,$(USELIB)) , __PCI__)
431 giacomo 28
 
638 giacomo 29
INCL += -I$(BASE)/drivers/pci/include
431 giacomo 30
 
588 giacomo 31
ifeq ($(LIB_PATH)/libpci.a,$(wildcard $(LIB_PATH)/libpci.a))
32
LINK_LIB += -lpci
33
LIB_DEP += $(LIB_PATH)/libpci.a
431 giacomo 34
endif
35
 
632 giacomo 36
endif
37
 
638 giacomo 38
# NETWORK
39
# ----------------------------------------------------------------
40
ifeq ($(findstring __NET__,$(USELIB)) , __NET__)
41
 
42
INCL += -I$(BASE)/drivers/net/include
43
 
44
ifeq ($(LIB_PATH)/libnet.a,$(wildcard $(LIB_PATH)/libnet.a))
45
LINK_LIB += -lnet
46
LIB_DEP += $(LIB_PATH)/libnet.a
581 mauro 47
endif
48
 
638 giacomo 49
endif
50
 
431 giacomo 51
# tracer
52
ifeq ($(LIB_PATH)/libtracer.a,$(wildcard $(LIB_PATH)/libtracer.a))
53
LINK_LIB += -ltracer
54
LIB_DEP += $(LIB_PATH)/libtracer.a
55
endif
56
 
2 pj 57
# hgd
58
ifeq ($(LIB_PATH)/libhgd.a,$(wildcard $(LIB_PATH)/libhgd.a))
59
LINK_LIB += -lhgd
60
LIB_DEP += $(LIB_PATH)/libhgd.a
61
endif
62
 
63
# grx
110 giacomo 64
# ----------------------------------------------------------------
65
ifeq ($(findstring __GRX__,$(USELIB)) , __GRX__)
66
 
67
INCL += -I$(BASE)/drivers/grx/include
68
 
2 pj 69
ifeq ($(LIB_PATH)/libgrx.a,$(wildcard $(LIB_PATH)/libgrx.a))
70
LINK_LIB += -lgrx
71
LIB_DEP += $(LIB_PATH)/libgrx.a
72
endif
110 giacomo 73
 
48 pj 74
endif
2 pj 75
 
471 giacomo 76
# Frame Buffer
77
# ----------------------------------------------------------------
78
ifeq ($(findstring __FB__,$(USELIB)) , __FB__)
79
 
638 giacomo 80
INCL += -I$(BASE)/drivers/fb/include
471 giacomo 81
 
82
ifeq ($(LIB_PATH)/libfb.a,$(wildcard $(LIB_PATH)/libfb.a))
83
LINK_LIB += -lfb
84
LIB_DEP += $(LIB_PATH)/libfb.a
85
endif
86
 
87
endif
110 giacomo 88
 
107 pj 89
# oldchar
90
# ----------------------------------------------------------------
91
ifeq ($(findstring __OLDCHAR__,$(USELIB)) , __OLDCHAR__)
92
 
93
INCL += -I$(BASE)/drivers/oldchar/include
94
 
95
ifeq ($(LIB_PATH)/liboldch.a,$(wildcard $(LIB_PATH)/liboldch.a))
96
LINK_LIB += -loldch
97
LIB_DEP += $(LIB_PATH)/liboldch.a
2 pj 98
endif
99
 
107 pj 100
endif
101
 
2 pj 102
# hsnd
103
ifeq ($(LIB_PATH)/libhsnd.a,$(wildcard $(LIB_PATH)/libhsnd.a))
104
LINK_LIB += -lhsnd
105
LIB_DEP += $(LIB_PATH)/libhsnd.a
106
endif
107
 
108
# mem
109
ifeq ($(LIB_PATH)/libmem.a,$(wildcard $(LIB_PATH)/libmem.a))
110
LINK_LIB += -lmem
111
LIB_DEP += $(LIB_PATH)/libmem.a
112
endif
113
 
114
# gkern
115
ifeq ($(LIB_PATH)/libgkern.a,$(wildcard $(LIB_PATH)/libgkern.a))
116
LINK_LIB += -lgkern
117
LIB_DEP += $(LIB_PATH)/libgkern.a
118
endif
119
 
120
# mod
121
ifeq ($(LIB_PATH)/libmod.a,$(wildcard $(LIB_PATH)/libmod.a))
122
LINK_LIB += -lmod
123
LIB_DEP += $(LIB_PATH)/libmod.a
124
endif
125
 
126
# kl
45 pj 127
ifeq ($(OSLIB_LIB)/libkl.a,$(wildcard $(OSLIB_LIB)/libkl.a))
2 pj 128
LINK_LIB += -lkl
45 pj 129
LIB_DEP += $(OSLIB_LIB)/libkl.a
2 pj 130
endif
131
 
132
# hx
45 pj 133
ifeq ($(OSLIB_LIB)/libhx.a,$(wildcard $(OSLIB_LIB)/libhx.a))
2 pj 134
LINK_LIB += -lhx
45 pj 135
LIB_DEP += $(OSLIB_LIB)/libhx.a
2 pj 136
endif
137
 
138
# hc
45 pj 139
ifeq ($(OSLIB_LIB)/libhc.a,$(wildcard $(OSLIB_LIB)/libhc.a))
2 pj 140
LINK_LIB += -lhc
45 pj 141
LIB_DEP += $(OSLIB_LIB)/libhc.a
2 pj 142
endif
143
 
144
# hm
45 pj 145
ifeq ($(OSLIB_LIB)/libhm.a,$(wildcard $(OSLIB_LIB)/libhm.a))
2 pj 146
LINK_LIB += -lhm
45 pj 147
LIB_DEP += $(OSLIB_LIB)/libhm.a
2 pj 148
endif
149
 
45 pj 150
# cons
151
ifeq ($(LIB_PATH)/libcons.a,$(wildcard $(LIB_PATH)/libcons.a))
556 giacomo 152
 
153
INCL += -I$(BASE)/drivers/cons/include
154
 
45 pj 155
LINK_LIB += -lcons
156
LIB_DEP += $(LIB_PATH)/libcons.a
157
endif
158
 
2 pj 159
# blk
160
ifeq ($(LIB_PATH)/libblk.a,$(wildcard $(LIB_PATH)/libblk.a))
161
LINK_LIB += -lblk
162
LIB_DEP += $(LIB_PATH)/libblk.a
163
endif
164
 
165
# fs
166
ifeq ($(LIB_PATH)/libfs.a,$(wildcard $(LIB_PATH)/libfs.a))
167
LINK_LIB += -lfs
168
LIB_DEP += $(LIB_PATH)/libfs.a
169
endif
170
 
171
# c
172
ifeq ($(LIB_PATH)/libc.a,$(wildcard $(LIB_PATH)/libc.a))
173
LINK_LIB += -lc
174
LIB_DEP += $(LIB_PATH)/libc.a
175
endif
176
 
632 giacomo 177
# Linux Comp 2.6
496 giacomo 178
# ----------------------------------------------------------------
179
ifeq ($(findstring __LINUXC26__,$(USELIB)) , __LINUXC26__)
180
 
181
# Linux Emulation Layer 2.6
182
ifeq ($(LIB_PATH)/libcomp26.a,$(wildcard $(LIB_PATH)/libcomp26.a))
183
LINK_LIB += -lcomp26
184
LIB_DEP += $(LIB_PATH)/libcomp26.a
185
endif
186
 
2 pj 187
endif
496 giacomo 188
# ----------------------------------------------------------------
439 giacomo 189
 
2 pj 190
# mpeg
191
ifeq ($(LIB_PATH)/libmpeg.a,$(wildcard $(LIB_PATH)/libmpeg.a))
192
LINK_LIB += -lmpeg
193
LIB_DEP += $(LIB_PATH)/libmpeg.a
194
endif
195
 
196
# mp3
197
ifeq ($(LIB_PATH)/libmp3.a,$(wildcard $(LIB_PATH)/libmp3.a))
198
LINK_LIB += -lmp3
199
LIB_DEP += $(LIB_PATH)/libmp3.a
200
endif
201
 
202
# 6025e
107 pj 203
# ----------------------------------------------------------------
204
ifeq ($(findstring __6025E__,$(USELIB)) , __6025E__)
205
 
206
INCL += -I$(BASE)/drivers/pci6025e/include
207
 
2 pj 208
ifeq ($(LIB_PATH)/lib6025e.a,$(wildcard $(LIB_PATH)/lib6025e.a))
209
LINK_LIB += -l6025e
210
LIB_DEP += $(LIB_PATH)/lib6025e.a
211
endif
212
 
107 pj 213
endif
214
 
23 pj 215
# Parport
107 pj 216
# ----------------------------------------------------------------
217
ifeq ($(findstring __PPORT__,$(USELIB)) , __PPORT__)
218
 
219
INCL += -I$(BASE)/drivers/parport/include
220
 
23 pj 221
ifeq ($(LIB_PATH)/libpport.a,$(wildcard $(LIB_PATH)/libpport.a))
222
LINK_LIB += -lpport
223
LIB_DEP += $(LIB_PATH)/libpport.a
224
endif
2 pj 225
 
107 pj 226
endif
227
 
228
# PCLAB
229
# ----------------------------------------------------------------
230
ifeq ($(findstring __PCLAB__,$(USELIB)) , __PCLAB__)
231
 
232
INCL += -I$(BASE)/drivers/pcl812/include
233
 
234
ifeq ($(LIB_PATH)/libpclab.a,$(wildcard $(LIB_PATH)/libpclab.a))
235
LINK_LIB += -lpclab
236
LIB_DEP += $(LIB_PATH)/libpclab.a
237
endif
238
 
239
endif
240
 
241
 
242
# Ports
243
 
244
# FFT
245
# ----------------------------------------------------------------
246
ifeq ($(findstring __FFT__,$(USELIB)) , __FFT__)
247
 
248
INCL += -I$(BASE)/ports/fftw/include
249
 
250
#FFTR
251
ifeq ($(LIB_PATH)/libfftr.a,$(wildcard $(LIB_PATH)/libfftr.a))
252
LINK_LIB += -lfftr
253
LIB_DEP += $(LIB_PATH)/libfftr.a
254
endif
255
# FFTC
256
ifeq ($(LIB_PATH)/libfftc.a,$(wildcard $(LIB_PATH)/libfftc.a))
257
LINK_LIB += -lfftc
258
LIB_DEP += $(LIB_PATH)/libfftc.a
259
endif
260
endif
261
 
48 pj 262
# OSMESA
107 pj 263
# ----------------------------------------------------------------
264
ifeq ($(findstring __OSMESA__,$(USELIB)) , __OSMESA__)
265
 
266
INCL += -I$(BASE)/ports/mesa/include
267
 
48 pj 268
ifeq ($(LIB_PATH)/libosmesa.a,$(wildcard $(LIB_PATH)/libosmesa.a))
269
LINK_LIB += -losmesa
270
LIB_DEP += $(LIB_PATH)/libosmesa.a
271
endif
2 pj 272
 
48 pj 273
# GLUT
274
ifeq ($(LIB_PATH)/libglut.a,$(wildcard $(LIB_PATH)/libglut.a))
275
LINK_LIB += -lglut
276
LIB_DEP += $(LIB_PATH)/libglut.a
277
endif
2 pj 278
 
48 pj 279
# GLU
280
ifeq ($(LIB_PATH)/libglu.a,$(wildcard $(LIB_PATH)/libglu.a))
281
LINK_LIB += -lglu
282
LIB_DEP += $(LIB_PATH)/libglu.a
283
endif
2 pj 284
 
48 pj 285
endif
286
 
98 giacomo 287
# PNG
107 pj 288
# ----------------------------------------------------------------
289
ifeq ($(findstring __PNG__,$(USELIB)) , __PNG__)
290
 
291
INCL += -I$(BASE)/ports/png/include
292
 
293
# PNG
98 giacomo 294
ifeq ($(LIB_PATH)/libpng.a,$(wildcard $(LIB_PATH)/libpng.a))
295
LINK_LIB += -lpng
296
LIB_DEP += $(LIB_PATH)/libpng.a
297
endif
298
 
107 pj 299
endif
300
 
301
# ZLIB
302
# ----------------------------------------------------------------
303
ifeq ($(findstring __ZLIB__,$(USELIB)) , __ZLIB__)
304
 
305
INCL += -I$(BASE)/ports/zlib/include
306
 
307
# PNG
308
ifeq ($(LIB_PATH)/libzlib.a,$(wildcard $(LIB_PATH)/libzlib.a))
309
LINK_LIB += -lzlib
310
LIB_DEP += $(LIB_PATH)/libzlib.a
311
endif
312
 
313
endif
142 trimarchi 314
 
315
# DIDMA
316
# ----------------------------------------------------------------
317
ifeq ($(findstring __DIDMA__, $(USELIB)), __DIDMA__)
318
 
319
INCL += -I$(BASE)/ports/didma/include
320
 
321
# DIDMA
322
ifeq ($(LIB_PATH)/libdidma.a,$(wildcard $(LIB_PATH)/libdidma.a))
323
LINK_LIB += -ldidma
324
LINK_DEP += $(LIB_PATH)/libdidma.a
325
endif
326
 
327
endif
328
 
223 giacomo 329
# FIRST
330
# ----------------------------------------------------------------
331
ifeq ($(findstring __FIRST__, $(USELIB)), __FIRST__)
332
 
333
INCL += -I$(BASE)/ports/first/include
334
 
335
ifeq ($(LIB_PATH)/libfirst.a,$(wildcard $(LIB_PATH)/libfirst.a))
336
LINK_LIB += -lfirst
337
LINK_DEP += $(LIB_PATH)/libfirst.a
338
endif
339
 
340
endif
341
 
171 giacomo 342
# BTTV
343
# ----------------------------------------------------------------
344
ifeq ($(findstring __BTTV__, $(USELIB)), __BTTV__)
345
 
638 giacomo 346
INCL += -I$(BASE)/drivers/bttv/include
171 giacomo 347
 
348
# BTTV
349
ifeq ($(LIB_PATH)/libbttv.a,$(wildcard $(LIB_PATH)/libbttv.a))
350
LINK_LIB += -lbttv
351
LINK_DEP += $(LIB_PATH)/libbttv.a
352
endif
353
 
354
endif
355
 
461 giacomo 356
# I2C
357
# ----------------------------------------------------------------
358
ifeq ($(findstring __I2C__, $(USELIB)), __I2C__)
359
 
638 giacomo 360
INCL += -I$(BASE)/drivers/i2c/include
461 giacomo 361
 
362
ifeq ($(LIB_PATH)/libi2c.a,$(wildcard $(LIB_PATH)/libi2c.a))
363
LINK_LIB += -li2c
364
LINK_DEP += $(LIB_PATH)/libi2c.a
365
endif
366
 
367
endif
368
 
369
# CM7326
370
# ----------------------------------------------------------------
371
ifeq ($(findstring __CM7326__, $(USELIB)), __CM7326__)
372
 
463 giacomo 373
INCL += -I$(BASE)/drivers/cm7326/include
461 giacomo 374
 
375
ifeq ($(LIB_PATH)/libcm7326.a,$(wildcard $(LIB_PATH)/libcm7326.a))
376
LINK_LIB += -lcm7326
377
LINK_DEP += $(LIB_PATH)/libcm7326.a
378
endif
379
 
380
endif
381
 
259 giacomo 382
# TFTP
383
# ----------------------------------------------------------------
384
ifeq ($(findstring __TFTP__, $(USELIB)), __TFTP__)
171 giacomo 385
 
262 giacomo 386
INCL += -I$(BASE)/ports/tftp/include
259 giacomo 387
 
388
# TFTP
389
ifeq ($(LIB_PATH)/libtftp.a,$(wildcard $(LIB_PATH)/libtftp.a))
390
LINK_LIB += -ltftp
391
LINK_DEP += $(LIB_PATH)/libtftp.a
392
endif
393
 
394
endif
395
 
284 giacomo 396
# SERVO
397
# ----------------------------------------------------------------
398
ifeq ($(findstring __SERVO__, $(USELIB)), __SERVO__)
259 giacomo 399
 
284 giacomo 400
INCL += -I$(BASE)/ports/servo/include
401
 
402
# SERVO
403
ifeq ($(LIB_PATH)/libservo.a,$(wildcard $(LIB_PATH)/libservo.a))
404
LINK_LIB += -lservo
405
LINK_DEP += $(LIB_PATH)/libservo.a
406
endif
407
 
408
endif
360 giacomo 409
 
496 giacomo 410
# INPUT
411
# ----------------------------------------------------------------
412
ifeq ($(findstring __INPUT__, $(USELIB)), __INPUT__)
413
 
414
INCL += -I$(BASE)/drivers/input/include
415
 
416
# JOY
417
ifeq ($(LIB_PATH)/libinput.a,$(wildcard $(LIB_PATH)/libinput.a))
418
LINK_LIB += -linput
419
LINK_DEP += $(LIB_PATH)/libinput.a
420
endif
421
 
422
endif
581 mauro 423
 
424
# CPU
425
# ----------------------------------------------------------------
426
ifeq ($(findstring __CPU__, $(USELIB)), __CPU__)
427
 
428
INCL += -I$(BASE)/drivers/cpu/include
429
 
430
# CPU
431
ifeq ($(LIB_PATH)/libcpu.a,$(wildcard $(LIB_PATH)/libcpu.a))
432
LINK_LIB += -lcpu
433
LINK_DEP += $(LIB_PATH)/libcpu.a
434
endif
435
 
436
endif