build.mk 856 Bytes
Newer Older
Jeroen Vreeken's avatar
Jeroen Vreeken committed
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
LIBDIR:=$(DIR)/lib

$(eval $(call SUBDIR,controller))
$(eval $(call SUBDIR,shell))
$(eval $(call SUBDIR,block))
$(eval $(call SUBDIR,ec))
$(eval $(call SUBDIR,dt_azimuth))
$(eval $(call SUBDIR,dt_elevation))
$(eval $(call SUBDIR,test))


DT_CTRL_TARGETS += $(DIR)/dt_ctrl

DT_CTRL_SRCS := $(DIR)/dt_ctrl.c
DT_CTRL_OBJS := $(DT_CTRL_SRCS:.c=.o)
BLOCKS := `$(DIR)/controller/block_list.sh $(DIR)/lib/*.a`

$(DIR)/dt_ctrl: \
	libcontroller.la \
	libblock.la \
	libethercat.la \
	liblog.la \
	libshell.la \
	libdt_azimuth.la \
	libdt_elevation.la
$(DIR)/dt_ctrl: CFLAGS += -Wall -O3
$(DIR)/dt_ctrl: LDFLAGS += \
	-Wl,-E \
	-lcontroller \
	-lblock \
	-lethercat \
	-llog \
	-lshell \
	-ldt_azimuth \
	-ldt_elevation \
	$(BLOCKS)
$(DIR)/dt_ctrl: $(DT_CTRL_OBJS)


SRCS += $(DT_CTRL_SRCS)
TARGETS += $(DT_CTRL_TARGETS)
CLEAN += $(DT_CTRL_TARGETS) $(DT_CTRL_OBJS)