Makefile 17.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
############################################################################
# This file is part of LImA, a Library for Image Acquisition
#
# Copyright (C) : 2009-2011
# European Synchrotron Radiation Facility
# BP 220, Grenoble 38043
# FRANCE
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
22

23 24
include ../config.inc

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

############################
# HELPER MACROS
############################

full-version	= $(shell cat $(1))
minor-version	= $(shell echo $(call full-version,$(1)) | cut -f1-2 -d.)
ifneq ($(LINK_STRICT_VERSION),0)
link-version	= $(call full-version,$(1))
else
link-version	= $(call minor-version,$(1))
endif

lib-base        = liblima$(1).so
lib-full        = $(call lib-base,$(1)).$(call full-version,$(2))
lib-minor       = $(call lib-base,$(1)).$(call minor-version,$(2))
lib-link	= $(call lib-base,$(1)).$(call link-version,$(2))
lib-flags	= -fPIC -Wl,-soname,$(call lib-link,$(1),$(2))

# 1=name, 2=ver-file 3=flags 4=deps, 5=target, 6=objs
compile-lib	= \
	$(CXX) -shared -o $(5) $(3) $(call lib-flags,$(1),$(2)) $(6) $(4)

create-links	= \
	rm -f $(call lib-minor,$(1),$(2)) && \
	rm -f $(call lib-base,$(1),$(2)) && \
	ln -s $(call lib-full,$(1),$(2))  $(call lib-minor,$(1),$(2)) && \
	ln -s $(call lib-minor,$(1),$(2)) $(call lib-base,$(1),$(2))


55 56 57 58
############################
# LIMA - CORE
############################

59
CORE_LDFLAGS	:= -L../third-party/Processlib/build -Wl,-rpath=$(shell pwd)/../third-party/Processlib/build
Sebastien Petitdemange's avatar
Sebastien Petitdemange committed
60
CORE_LDLIBS	:= -lprocesslib -lrt
61

seb's avatar
seb committed
62 63 64 65 66
ifneq ($(COMPILE_CBF_SAVING),0)
CORE_LDFLAGS += -L../third-party/CBFLib/lib
CORE_LDLIBS += -lcbf
endif

67
ifneq ($(COMPILE_FITS_SAVING),0)
68
CORE_LDFLAGS += -L../third-party/cfitsio/lib -L../third-party/CCfits/.libs
69 70 71
CORE_LDLIBS += -lCCfits -lcfitsio
endif

72 73 74 75
ifneq ($(COMPILE_EDFGZ_SAVING),0)
CORE_LDLIBS += -lz
endif

Teresa's avatar
Teresa committed
76 77 78 79
ifneq ($(COMPILE_TIFF_SAVING),0)
CORE_LDLIBS += -ltiff
endif

80 81 82 83 84 85 86
ifneq ($(COMPILE_HDF5_SAVING),0)
PROCESSOR_TYPE := $(shell uname -m)
CORE_LDFLAGS += -L../third-party/hdf5/src/.libs -Wl,-rpath=$(shell pwd)/../third-party/hdf5/src/.libs
CORE_LDFLAGS += -L../third-party/hdf5/c++/src/.libs -Wl,-rpath=$(shell pwd)/../third-party/hdf5/c++/src/.libs
CORE_LDLIBS += -lhdf5_cpp -lhdf5
endif

87 88 89 90
ifneq ($(COMPILE_CONFIG),0)
CORE_LDLIBS += -L../third-party/libconfig/lib/.libs -Wl,-rpath=$(shell pwd)/../third-party/libconfig/lib/.libs  -lconfig++
endif

91 92
ifneq ($(COMPILE_CORE),0)

93
core-name	:= core
ahoms's avatar
ahoms committed
94 95
core-objs	:= ../common/src/Common.o \
		   ../hardware/src/Hw.o \
ahoms's avatar
ahoms committed
96
		   ../control/src/Ct.o
97
core-ver	:= ../common/VERSION
ahoms's avatar
ahoms committed
98 99
core-flags	:= $(CORE_LDFLAGS)
core-deps	:= $(CORE_LDLIBS)
100

101 102 103 104
$(call lib-full,$(core-name),$(core-ver)): $(core-objs)
	$(call compile-lib,$(core-name),$(core-ver),\
			   $(core-flags),$(core-deps),$@,$+)
	$(call create-links,$(core-name),$(core-ver))
ahoms's avatar
ahoms committed
105

106
build_targets	:= $(call lib-full,$(core-name),$(core-ver))
107 108 109

endif

ahoms's avatar
ahoms committed
110 111
LDFLAGS		:= $(CORE_LDFLAGS) -L.
LDLIBS		:= $(CORE_LDLIBS) -llimacore
112 113 114 115 116 117 118 119


############################
# LIMA - SIMULATOR
############################

ifneq ($(COMPILE_SIMULATOR),0)

120
simu-name	:= simulator
ahoms's avatar
ahoms committed
121
simu-objs	:= ../camera/simulator/src/Simu.o
122
simu-ver	:= ../camera/simulator/VERSION
ahoms's avatar
ahoms committed
123 124 125
simu-flags	:= $(LDFLAGS)
simu-deps	:= $(LDLIBS)

126 127 128 129
$(call lib-full,$(simu-name),$(simu-ver)): $(simu-objs)
	$(call compile-lib,$(simu-name),$(simu-ver),\
			   $(simu-flags),$(simu-deps),$@,$+)
	$(call create-links,$(simu-name),$(simu-ver))
ahoms's avatar
ahoms committed
130

131
build_targets	+= $(call lib-full,$(simu-name),$(simu-ver))
132 133

endif
ahoms's avatar
ahoms committed
134

135 136 137 138 139

############################
# LIMA - ESPIA
############################

140 141 142

ifneq ($(COMPILE_ESPIA),0)

143
include ../camera/common/espia/include/espia.inc
ahoms's avatar
ahoms committed
144 145
ESPIA_LDFLAGS	:= $(LDFLAGS) -L$(ESPIA_DRV_LIB)
ESPIA_LDLIBS	:= $(LDLIBS) -lespia
146

147
espia-name	:= espia
ahoms's avatar
ahoms committed
148
espia-objs	:= ../camera/common/espia/src/Espia.o
149
espia-ver	:= ../camera/common/espia/VERSION
ahoms's avatar
ahoms committed
150 151 152
espia-flags	:= $(ESPIA_LDFLAGS)
espia-deps	:= $(ESPIA_LDLIBS)

153 154 155 156
$(call lib-full,$(espia-name),$(espia-ver)): $(espia-objs)
	$(call compile-lib,$(espia-name),$(espia-ver),\
			   $(espia-flags),$(espia-deps),$@,$+)
	$(call create-links,$(espia-name),$(espia-ver))
ahoms's avatar
ahoms committed
157

158
build_targets	+= $(call lib-full,$(espia-name),$(espia-ver))
159

160 161
endif

162 163 164 165 166

############################
# LIMA - FRELON
############################

167
ifneq ($(COMPILE_FRELON),0)
168

ahoms's avatar
ahoms committed
169 170 171
FRELON_LDFLAGS	:= $(ESPIA_LDFLAGS) -L.
FRELON_LDLIBS	:= $(ESPIA_LDLIBS) -llimaespia

172
frelon-name	:= frelon
ahoms's avatar
ahoms committed
173
frelon-objs	:= ../camera/frelon/src/Frelon.o
174
frelon-ver	:= ../camera/frelon/VERSION
ahoms's avatar
ahoms committed
175 176 177
frelon-flags	:= $(FRELON_LDFLAGS)
frelon-deps	:= $(FRELON_LDLIBS)

178 179 180 181
$(call lib-full,$(frelon-name),$(frelon-ver)): $(frelon-objs)
	$(call compile-lib,$(frelon-name),$(frelon-ver),\
			   $(frelon-flags),$(frelon-deps),$@,$+)
	$(call create-links,$(frelon-name),$(frelon-ver))
182

183
build_targets	+= $(call lib-full,$(frelon-name),$(frelon-ver))
184

185 186
endif

187 188 189 190 191

############################
# LIMA - MAXIPIX
############################

192
ifneq ($(COMPILE_MAXIPIX),0)
193

ahoms's avatar
ahoms committed
194 195 196
MAXIPIX_LDFLAGS	:= $(ESPIA_LDFLAGS) -L.
MAXIPIX_LDLIBS	:= $(ESPIA_LDLIBS) -llimaespia

197
maxipix-name	:= maxipix
ahoms's avatar
ahoms committed
198
maxipix-objs	:= ../camera/maxipix/src/Maxipix.o
199
maxipix-ver	:= ../camera/maxipix/VERSION
ahoms's avatar
ahoms committed
200 201 202
maxipix-flags	:= $(MAXIPIX_LDFLAGS)
maxipix-deps	:= $(MAXIPIX_LDLIBS)

203 204 205 206
$(call lib-full,$(maxipix-name),$(maxipix-ver)): $(maxipix-objs)
	$(call compile-lib,$(maxipix-name),$(maxipix-ver),\
			   $(maxipix-flags),$(maxipix-deps),$@,$+)
	$(call create-links,$(maxipix-name),$(maxipix-ver))
207

208
build_targets	+= $(call lib-full,$(maxipix-name),$(maxipix-ver))
209 210 211

endif

212 213 214 215 216 217
############################
# LIMA - BASLER
############################

ifneq ($(COMPILE_BASLER),0)

218 219 220 221 222
ifndef PYLON_ROOT
PYLON_ROOT	:= /opt/pylon
endif

BASLER_LDFLAGS	:= $(LDFLAGS) -L. -L$(PYLON_ROOT)/lib -L$(PYLON_ROOT)/lib64
223
BASLER_LDLIBS	:= $(LDLIBS) -lpylongigesupp
224

225
basler-name	:= basler
226
basler-objs	:= ../camera/basler/src/Basler.o
227
basler-ver	:= ../camera/basler/VERSION
228 229 230
basler-flags	:= $(BASLER_LDFLAGS)
basler-deps	:= $(BASLER_LDLIBS)

231 232 233 234 235 236 237
$(call lib-full,$(basler-name),$(basler-ver)): $(basler-objs)
	$(call compile-lib,$(basler-name),$(basler-ver),\
			   $(basler-flags),$(basler-deps),$@,$+)
	$(call create-links,$(basler-name),$(basler-ver))

build_targets	+= $(call lib-full,$(basler-name),$(basler-ver))

Florent Langlois's avatar
Florent Langlois committed
238 239
endif

Sebastien Petitdemange's avatar
Sebastien Petitdemange committed
240 241 242 243 244 245
############################
# LIMA - UEYE
############################

ifneq ($(COMPILE_UEYE),0)

246 247
UEYE_LDFLAGS	:= $(LDFLAGS)
UEYE_LDLIBS	:= $(LDLIBS) -lueye_api
Sebastien Petitdemange's avatar
Sebastien Petitdemange committed
248

249
ueye-name	:= ueye
Sebastien Petitdemange's avatar
Sebastien Petitdemange committed
250
ueye-objs	:= ../camera/ueye/src/Ueye.o
251
ueye-ver	:= ../camera/ueye/VERSION
Sebastien Petitdemange's avatar
Sebastien Petitdemange committed
252 253 254
ueye-flags	:= $(UEYE_LDFLAGS)
ueye-deps	:= $(UEYE_LDLIBS)

255 256 257 258 259 260 261
$(call lib-full,$(ueye-name),$(ueye-ver)): $(ueye-objs)
	$(call compile-lib,$(ueye-name),$(ueye-ver),\
			   $(ueye-flags),$(ueye-deps),$@,$+)
	$(call create-links,$(ueye-name),$(ueye-ver))

build_targets	+= $(call lib-full,$(ueye-name),$(ueye-ver))

Sebastien Petitdemange's avatar
Sebastien Petitdemange committed
262 263
endif

Florent Langlois's avatar
Florent Langlois committed
264 265 266 267 268 269 270 271 272 273
############################
# LIMA - PROSILICA
############################

ifneq ($(COMPILE_PROSILICA),0)

PROCESSOR_TYPE := $(shell uname -i)
ifeq ($(PROCESSOR_TYPE),i386)
PROSILICA_LDFLAGS	:= -L. -L../camera/prosilica/sdk/bin/x86
else
274 275
PROSILICA_LDFLAGS	:= -L. -L../camera/prosilica/sdk/bin/x64 \
			   -L../camera/prosilica/sdk/bin/x86
Florent Langlois's avatar
Florent Langlois committed
276 277 278
endif
PROSILICA_LDLIBS	:= -lPvAPI

279
prosilica-name	:= prosilica
Florent Langlois's avatar
Florent Langlois committed
280
prosilica-objs	:= ../camera/prosilica/src/Prosilica.o
281
prosilica-ver	:= ../camera/prosilica/VERSION
282 283
prosilica-flags	:= $(LDFLAGS) $(PROSILICA_LDFLAGS)
prosilica-deps	:= $(LDLIBS) $(PROSILICA_LDLIBS)
284

285 286 287 288 289 290 291
$(call lib-full,$(prosilica-name),$(prosilica-ver)): $(prosilica-objs)
	$(call compile-lib,$(prosilica-name),$(prosilica-ver),\
			   $(prosilica-flags),$(prosilica-deps),$@,$+)
	$(call create-links,$(prosilica-name),$(prosilica-ver))

build_targets	+= $(call lib-full,$(prosilica-name),$(prosilica-ver))

292 293
endif

teresa's avatar
teresa committed
294 295 296 297 298 299 300

############################
# LIMA - ROPERSCIENTIFIC
############################

ifneq ($(COMPILE_ROPERSCIENTIFIC),0)

301
ROPERSCIENTIFIC_LDLIBS	:= $(LDLIBS) -lpvcam -lraw1394
teresa's avatar
teresa committed
302

303 304 305 306 307
ropersci-name	:= roperscientific
ropersci-objs	:= ../camera/roperscientific/src/RoperScientific.o
ropersci-ver	:= ../camera/roperscientific/VERSION
ropersci-flags	:= $(LDFLAGS)
ropersci-deps	:= $(ROPERSCIENTIFIC_LDLIBS)
teresa's avatar
teresa committed
308

309 310 311 312
$(call lib-full,$(ropersci-name),$(ropersci-ver)): $(ropersci-objs)
	$(call compile-lib,$(ropersci-name),$(ropersci-ver),\
			   $(ropersci-flags),$(ropersci-deps),$@,$+)
	$(call create-links,$(ropersci-name),$(ropersci-ver))
teresa's avatar
teresa committed
313

314
build_targets	+= $(call lib-full,$(ropersci-name),$(ropersci-ver))
teresa's avatar
teresa committed
315 316 317

endif

318

319 320 321 322 323 324
############################
# LIMA - ADSC
############################

ifneq ($(COMPILE_ADSC),0)

325 326
ADSC_LDFLAGS	:= $(LDFLAGS) -L. -L../camera/adsc/sdk/adsc_sources/lib/linux
ADSC_LDLIBS	:= $(LDLIBS) -lauxlib -ldetcon_th
327 328

adsc-name	:= adsc
329
adsc-objs	:= ../camera/adsc/src/Adsc.o
330
adsc-ver	:= ../camera/adsc/VERSION
331 332 333
adsc-flags	:= $(ADSC_LDFLAGS)
adsc-deps	:= $(ADSC_LDLIBS)

334 335 336 337
$(call lib-full,$(adsc-name),$(adsc-ver)): $(adsc-objs)
	$(call compile-lib,$(adsc-name),$(adsc-ver),\
			   $(adsc-flags),$(adsc-deps),$@,$+)
	$(call create-links,$(adsc-name),$(adsc-ver))
338

339
build_targets	+= $(call lib-full,$(adsc-name),$(adsc-ver))
340 341 342 343

endif


teresa's avatar
teresa committed
344 345 346 347 348 349
############################
# LIMA - MYTHEN
############################

ifneq ($(COMPILE_MYTHEN),0)

350
MYTHEN_LDLIBS	:= $(LDLIBS) -lSlsDetector
351 352

mythen-name	:= mythen
teresa's avatar
teresa committed
353
mythen-objs	:= ../camera/mythen/src/Mythen.o
354
mythen-ver	:= ../camera/mythen/VERSION
teresa's avatar
teresa committed
355 356 357
mythen-flags	:= $(LDFLAGS)
mythen-deps	:= $(MYTHEN_LDLIBS)

358 359 360 361
$(call lib-full,$(mythen-name),$(mythen-ver)): $(mythen-objs)
	$(call compile-lib,$(mythen-name),$(mythen-ver),\
			   $(mythen-flags),$(mythen-deps),$@,$+)
	$(call create-links,$(mythen-name),$(mythen-ver))
362

363
build_targets	+= $(call lib-full,$(mythen-name),$(mythen-ver))
364

365
endif
teresa's avatar
teresa committed
366

367

368 369 370 371 372 373
############################
# LIMA - ANDOR
############################

ifneq ($(COMPILE_ANDOR),0)

374 375
ANDOR_LDFLAGS	:= $(LDFLAGS) -L. -L/usr/local/lib
ANDOR_LDLIBS	:= $(LDLIBS) -landor
376

377
andor-name	:= andor
378
andor-objs	:= ../camera/andor/src/Andor.o
379
andor-ver	:= ../camera/andor/VERSION
380 381 382
andor-flags	:= $(ANDOR_LDFLAGS)
andor-deps	:= $(ANDOR_LDLIBS)

383 384 385 386 387 388 389
$(call lib-full,$(andor-name),$(andor-ver)): $(andor-objs)
	$(call compile-lib,$(andor-name),$(andor-ver),\
			   $(andor-flags),$(andor-deps),$@,$+)
	$(call create-links,$(andor-name),$(andor-ver))

build_targets	+= $(call lib-full,$(andor-name),$(andor-ver))

390 391
endif

392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415
############################
# LIMA - ANDOR3
############################

ifneq ($(COMPILE_ANDOR3),0)

ANDOR3_LDFLAGS	:= $(LDFLAGS) -L. -L/usr/local/lib
ANDOR3_LDLIBS	:= $(LDLIBS) -latcore

andor3-name	:= andor3
andor3-objs	:= ../camera/andor3/src/Andor3.o
andor3-ver	:= ../camera/andor3/VERSION
andor3-flags	:= $(ANDOR3_LDFLAGS)
andor3-deps	:= $(ANDOR3_LDLIBS)

$(call lib-full,$(andor3-name),$(andor3-ver)): $(andor3-objs)
	$(call compile-lib,$(andor3-name),$(andor3-ver),\
			   $(andor3-flags),$(andor3-deps),$@,$+)
	$(call create-links,$(andor3-name),$(andor3-ver))

build_targets	+= $(call lib-full,$(andor3-name),$(andor3-ver))

endif

416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438
############################
# LIMA - MARCCD
############################

ifneq ($(COMPILE_MARCCD),0)

MARCCD_LDFLAGS	:= $(LDFLAGS) -L. -L../third-party/yat/src/.libs
MARCCD_LDLIBS	:= $(LDLIBS) -lyat -lrt

marccd-name	:= marccd
marccd-objs	:= ../camera/marccd/src/Marccd.o
marccd-ver	:= ../camera/marccd/VERSION
marccd-flags	:= $(MARCCD_LDFLAGS)
marccd-deps	:= $(MARCCD_LDLIBS)

$(call lib-full,$(marccd-name),$(marccd-ver)): $(marccd-objs)
	$(call compile-lib,$(marccd-name),$(marccd-ver),\
			   $(marccd-flags),$(marccd-deps),$@,$+)
	$(call create-links,$(marccd-name),$(marccd-ver))

build_targets	+= $(call lib-full,$(marccd-name),$(marccd-ver))

endif
439

440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463

############################
# LIMA - XH
############################

ifneq ($(COMPILE_XH),0)

XH_LDLIBS	:= 

xh-name	:= xh
xh-objs	:= ../camera/xh/src/Xh.o
xh-ver	:= ../camera/xh/VERSION
xh-flags	:= $(LDFLAGS)
xh-deps	:= $(XH_LDLIBS)

$(call lib-full,$(xh-name),$(xh-ver)): $(xh-objs)
	$(call compile-lib,$(xh-name),$(xh-ver),\
			   $(xh-flags),$(xh-deps),$@,$+)
	$(call create-links,$(xh-name),$(xh-ver))

build_targets	+= $(call lib-full,$(xh-name),$(xh-ver))

endif

Geoffrey Mant's avatar
Geoffrey Mant committed
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492
############################
# LIMA - XSPRESS3
############################

ifneq ($(COMPILE_XSPRESS3),0)

PROCESSOR_TYPE := $(shell uname -m)
ifeq ($(PROCESSOR_TYPE),x86_64)
XSPRESS3_LDFLAGS	:= -L../camera/xspress3/sdk/libs/linux.x86_64
else
XSPRESS3_LDFLAGS	:= -L../camera/xspress3/sdk/libs/linux.x86
endif
XSPRESS3_LDLIBS	:= -lxspress3 -limg_mod

xspress3-name	:= xspress3
xspress3-objs	:= ../camera/xspress3/src/Xspress3.o
xspress3-ver	:= ../camera/xspress3/VERSION
xspress3-flags	:= $(XSPRESS3_LDFLAGS) $(LDFLAGS)
xspress3-deps	:= $(XSPRESS3_LDLIBS) $(LDLIBS) 

$(call lib-full,$(xspress3-name),$(xspress3-ver)): $(xspress3-objs)
	$(call compile-lib,$(xspress3-name),$(xspress3-ver),\
			   $(xspress3-flags),$(xspress3-deps),$@,$+)
	$(call create-links,$(xspress3-name),$(xspress3-ver))

build_targets	+= $(call lib-full,$(xspress3-name),$(xspress3-ver))

endif

Geoffrey Mant's avatar
Geoffrey Mant committed
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524
############################
# LIMA - ULTRA
############################

ifneq ($(COMPILE_ULTRA),0)

PROCESSOR_TYPE := $(shell uname -m)
#ifeq ($(PROCESSOR_TYPE),x86_64)
#ULTRA_LDFLAGS	:= -L../camera/ultra/sdk/libs/linux.x86_64
#ULTRA_LDFLAGS	:= 
#else
#ULTRA_LDFLAGS	:= -L../camera/ultra/sdk/libs/linux.x86_64
ULTRA_LDFLAGS	:= 
#endif
#ULTRA_LDLIBS	:= -lultra -limg_mod
ULTRA_LDLIBS	:= 

ultra-name	:= ultra
ultra-objs	:= ../camera/ultra/src/Ultra.o
ultra-ver	:= ../camera/ultra/VERSION
ultra-flags	:= $(ULTRA_LDFLAGS) $(LDFLAGS)
ultra-deps	:= $(ULTRA_LDLIBS) $(LDLIBS) 

$(call lib-full,$(ultra-name),$(ultra-ver)): $(ultra-objs)
	$(call compile-lib,$(ultra-name),$(ultra-ver),\
			   $(ultra-flags),$(ultra-deps),$@,$+)
	$(call create-links,$(ultra-name),$(ultra-ver))

build_targets	+= $(call lib-full,$(ultra-name),$(ultra-ver))

endif

525 526 527 528 529 530
############################
# LIMA - XPAD
############################

ifneq ($(COMPILE_XPAD),0)

531
XPAD_LDLIBS	:= $(LDLIBS) -L/home/xpix_user/PCI_VALIDATED/trunk/sw/xpci_lib \
532 533 534
		   -lxpci_lib -L../third-party/yat/lib/i386/static -lyat

xpad-name	:= xpad
535
xpad-objs	:= ../camera/xpad/src/Xpad.o
536
xpad-ver	:= ../camera/xpad/VERSION
537 538 539
xpad-flags	:= $(LDFLAGS)
xpad-deps	:= $(XPAD_LDLIBS)

540 541 542 543
$(call lib-full,$(xpad-name),$(xpad-ver)): $(xpad-objs)
	$(call compile-lib,$(xpad-name),$(xpad-ver),\
			   $(xpad-flags),$(xpad-deps),$@,$+)
	$(call create-links,$(xpad-name),$(xpad-ver))
544

545
build_targets	+= $(call lib-full,$(xpad-name),$(xpad-ver))
546 547 548

endif

549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571
############################
# LIMA - PILATUS
############################

ifneq ($(COMPILE_PILATUS),0)

PILATUS_LDLIBS	:= 

pilatus-name	:= pilatus
pilatus-objs	:= ../camera/pilatus/src/Pilatus.o
pilatus-ver	:= ../camera/pilatus/VERSION
pilatus-flags	:= $(LDFLAGS)
pilatus-deps	:= $(PILATUS_LDLIBS)

$(call lib-full,$(pilatus-name),$(pilatus-ver)): $(pilatus-objs)
	$(call compile-lib,$(pilatus-name),$(pilatus-ver),\
			   $(pilatus-flags),$(pilatus-deps),$@,$+)
	$(call create-links,$(pilatus-name),$(pilatus-ver))

build_targets	+= $(call lib-full,$(pilatus-name),$(pilatus-ver))

endif

Andreas Persson's avatar
Andreas Persson committed
572 573 574 575 576
############################
# LIMA - POINTGREY
############################
ifneq ($(COMPILE_POINTGREY),0)

577
POINTGREY_LDFLAGS	:= $(LDFLAGS) -L../camera/pointgrey/sdk/lib
Andreas Persson's avatar
Andreas Persson committed
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594
POINTGREY_LDLIBS	:= $(LDLIBS) -lflycapture

pointgrey-name	:= pointgrey
pointgrey-objs	:= ../camera/pointgrey/src/PointGrey.o
pointgrey-ver	:= ../camera/pointgrey/VERSION
pointgrey-flags	:= $(POINTGREY_LDFLAGS)
pointgrey-deps	:= $(POINTGREY_LDLIBS)

$(call lib-full,$(pointgrey-name),$(pointgrey-ver)): $(pointgrey-objs)
	$(call compile-lib,$(pointgrey-name),$(pointgrey-ver),\
			   $(pointgrey-flags),$(pointgrey-deps),$@,$+)
	$(call create-links,$(pointgrey-name),$(pointgrey-ver))

build_targets	+= $(call lib-full,$(pointgrey-name),$(pointgrey-ver))

endif

Sebastien Petitdemange's avatar
Sebastien Petitdemange committed
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617
############################
# LIMA - IMXPAD
############################
ifneq ($(COMPILE_IMXPAD),0)

IMXPAD_LDFLAGS	:= $(LDFLAGS)
IMXPAD_LDLIBS	:= $(LDLIBS)

imxpad-name	:= imxpad
imxpad-objs	:= ../camera/imxpad/src/imXpad.o
imxpad-ver	:= ../camera/imxpad/VERSION
imxpad-flags	:= $(IMXPAD_LDFLAGS)
imxpad-deps	:= $(IMXPAD_LDLIBS)

$(call lib-full,$(imxpad-name),$(imxpad-ver)): $(imxpad-objs)
	$(call compile-lib,$(imxpad-name),$(imxpad-ver),\
			   $(imxpad-flags),$(imxpad-deps),$@,$+)
	$(call create-links,$(imxpad-name),$(imxpad-ver))

build_targets	+= $(call lib-full,$(imxpad-name),$(imxpad-ver))

endif

618 619 620 621 622
############################
# LIMA - RAYONIXHS
############################
ifneq ($(COMPILE_RAYONIXHS),0)

623 624
#RAYONIXHS_LDFLAGS	:= $(LDFLAGS) -L../camera/rayonixhs/sdk/lib64
RAYONIXHS_LDFLAGS	:= $(LDFLAGS) -L/opt/rayonix/lib64
625 626 627 628 629 630 631 632 633 634 635 636 637 638 639
RAYONIXHS_LDLIBS	:= $(LDLIBS) -lcraydl

rayonixhs-name	:= rayonixhs
rayonixhs-objs	:= ../camera/rayonixhs/src/RayonixHs.o
rayonixhs-ver	:= ../camera/rayonixhs/VERSION
rayonixhs-flags	:= $(RAYONIXHS_LDFLAGS)
rayonixhs-deps	:= $(RAYONIXHS_LDLIBS)

$(call lib-full,$(rayonixhs-name),$(rayonixhs-ver)): $(rayonixhs-objs)
	$(call compile-lib,$(rayonixhs-name),$(rayonixhs-ver),\
			   $(rayonixhs-flags),$(rayonixhs-deps),$@,$+)
	$(call create-links,$(rayonixhs-name),$(rayonixhs-ver))

build_targets	+= $(call lib-full,$(rayonixhs-name),$(rayonixhs-ver))

Sebastien Petitdemange's avatar
Sebastien Petitdemange committed
640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661
endif
############################
# LIMA - AVIEX
############################
ifneq ($(COMPILE_AVIEX),0)

AVIEX_LDFLAGS	:= $(LDFLAGS) -L../camera/aviex/sdk/linux/lib
AVIEX_LDLIBS	:= $(LDLIBS) -lMx

aviex-name	:= aviex
aviex-objs	:= ../camera/aviex/src/Aviex.o
aviex-ver	:= ../camera/aviex/VERSION
aviex-flags	:= $(AVIEX_LDFLAGS)
aviex-deps	:= $(AVIEX_LDLIBS)

$(call lib-full,$(aviex-name),$(aviex-ver)): $(aviex-objs)
	$(call compile-lib,$(aviex-name),$(aviex-ver),\
			   $(aviex-flags),$(aviex-deps),$@,$+)
	$(call create-links,$(aviex-name),$(aviex-ver))

build_targets	+= $(call lib-full,$(aviex-name),$(aviex-ver))

662 663
endif

664
src:		$(build_targets)
665 666 667 668

test:
	@true

kirov's avatar
kirov committed
669
clean:
ahoms's avatar
ahoms committed
670
	rm -f *.o liblima*.so*