Subversion Repositories shark

Rev

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