Makefile 2.09 KB
Newer Older
1

2 3
include ../config.inc

4 5 6 7 8 9 10
############################
# LIMA - CORE
############################

CORE_LDFLAGS = -fPIC -L../third-party/Processlib/build
CORE_LDLIBS = -lprocesslib

seb's avatar
seb committed
11 12 13 14 15 16
ifneq ($(COMPILE_CBF_SAVING),0)
ct-objs += CtSaving_Cbf.o
CORE_LDFLAGS += -L../third-party/CBFLib/lib
CORE_LDLIBS += -lcbf
endif

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
ifneq ($(COMPILE_CORE),0)

core-objs := ../common/src/Common.o \
	     ../hardware/src/Hw.o \
	     ../control/src/Ct.o 

liblimacore.so:		$(core-objs)
	$(CXX) -shared -o $@ $(CORE_LDFLAGS) $+ $(CORE_LDLIBS)

build_targets += liblimacore.so

endif

LDFLAGS = $(CORE_LDFLAGS) -L.
LDLIBS = $(CORE_LDLIBS) -llimacore


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

ifneq ($(COMPILE_SIMULATOR),0)

simu-objs = ../camera/simulator/src/Simu.o

liblimasimulator.so:	$(simu-objs)
	$(CXX) -shared -o $@ $(LDFLAGS) $+ $(LDLIBS)

build_targets += liblimasimulator.so

endif
	    

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

54
include ../camera/common/espia/include/espia.inc
55 56 57 58 59 60 61 62 63 64 65 66
ESPIA_LDFLAGS = $(LDFLAGS) -L$(ESPIA_DRV_LIB)
ESPIA_LDLIBS = $(LDLIBS) -lespia

ifneq ($(COMPILE_ESPIA),0)

espia-objs = ../camera/common/espia/src/Espia.o

liblimaespia.so:	$(espia-objs)
	$(CXX) -shared -o $@ $(ESPIA_LDFLAGS) $+ $(ESPIA_LDLIBS)

build_targets += liblimaespia.so

67 68
endif

69 70 71 72 73

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

74
ifneq ($(COMPILE_FRELON),0)
75 76 77 78 79 80 81 82 83 84 85

frelon-objs = ../camera/frelon/src/Frelon.o

FRELON_LDFLAGS = $(ESPIA_LDFLAGS) -L.
FRELON_LDLIBS = $(ESPIA_LDLIBS) -llimaespia

liblimafrelon.so:	$(frelon-objs)
	$(CXX) -shared -o $@ $(FRELON_LDFLAGS) $+ $(FRELON_LDLIBS)

build_targets += liblimafrelon.so

86 87
endif

88 89 90 91 92

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

93
ifneq ($(COMPILE_MAXIPIX),0)
94

95 96 97 98
maxipix-objs += ../camera/maxipix/src/Maxipix.o

MAXIPIX_LDFLAGS = $(ESPIA_LDFLAGS) -L.
MAXIPIX_LDLIBS = $(ESPIA_LDLIBS) -llimaespia
99

100 101 102 103 104 105 106 107
liblimamaxipix.so:	$(maxipix-objs)
	$(CXX) -shared -o $@ $(MAXIPIX_LDFLAGS) $+ $(MAXIPIX_LDLIBS)

build_targets += liblimamaxipix.so

endif

src:		$(build_targets)
108 109 110 111

test:
	@true

kirov's avatar
kirov committed
112
clean:
113
	rm -f *.o liblima*.so