Makefile 1.91 KB
Newer Older
1
2
3

IL2C=il2c/il2c

4
CFLAGS= -O3 -Wall  -I../log/ -I../shell/ -I.. -I../../common/include
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
BLOCKSRCS= \
	block_add.c \
	block_and2.c \
	block_bridge_pwm.c \
	block_counter.c \
	block_debug.c \
	block_decoder_uint32_bool.c \
	block_filter_iir.c \
	block_filter_lp.c \
	block_friction.c \
	block_gain.c \
	block_gain_var.c \
	block_limit.c \
	block_limit_dyn.c \
	block_limit_2nd.c \
	block_limit_var.c \
	block_matrix_2x2.c \
	block_multiplexer.c \
	block_not.c \
	block_or2.c \
	block_or3.c \
	block_or4.c \
	block_pid.c \
	block_pid_aw.c \
29
	block_quadrature_decoder.c \
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
	block_quantize.c \
	block_random.c \
	block_register.c \
	block_setpoint_generator.c \
	block_setreset.c \
	block_servo_state.c \
	block_sine.c \
	block_subtract.c \
	block_switch.c \
	block_trajectplayer.c \
	block_trigger.c \
	block_value.c \
	block_value_bool.c \
	block_value_uint32.c

45
46
47
48
49
50
51
OS= $(shell uname -s)
ifneq ($(OS), FreeBSD)
BLOCKSRCS+= \
	block_joystick.c
endif


52
53
CONTROLLERSRCS= \
	controller_block.c \
54
	controller_block_param.c \
55
	controller_block_trace.c \
56
57
58
59
60
	controller_setpoint_command.c \
	controller_trace.c \
	controller_sample.c \
	controller_dumpdot.c \
	controller_load.c \
61
	controller_load_variable.c \
62
63
64
65
66
67
	controller_load_parser.tab.c \
	controller_load_parser.yy.c


SRCS= $(CONTROLLERSRCS) $(BLOCKSRCS)

Jeroen Vreeken's avatar
Jeroen Vreeken committed
68
BLOCKS=$(BLOCKSRCS:.c=.lo)
69

Jeroen Vreeken's avatar
Jeroen Vreeken committed
70
CONTROLLER= $(CONTROLLERSRCS:.c=.lo)
71
72


Jeroen Vreeken's avatar
Jeroen Vreeken committed
73
all: il2cdir libcontroller.la_install
74
75


Jeroen Vreeken's avatar
Jeroen Vreeken committed
76
controller_load_parser.tab.lo: controller_load_parser.yy.c
77

Jeroen Vreeken's avatar
Jeroen Vreeken committed
78
controller_load.lo: controller_load_parser.tab.h controller_load_parser.yy.h
79
80
81
82
83
84
85

il2cdir:
	@echo " SUBDIR: $@"
	@$(MAKE) -C il2c

.PHONY: il2cdir

Jeroen Vreeken's avatar
Jeroen Vreeken committed
86
87
88
89
90
91
libcontroller.la_LDFLAGS=-rpath ${CURDIR}/../lib -lshell
libcontroller.la: $(BLOCKS) $(CONTROLLER)

libcontroller.la_install: libcontroller.la
	@echo "CP $^ to libdir"
	@${LIBTOOL} --quiet --mode=install install libcontroller.la ${CURDIR}/../lib
92
93

clean:
Jeroen Vreeken's avatar
Jeroen Vreeken committed
94
	rm -rf *.o *.a *.yy.* *.tab.* *.d *.lo *.la libs
95
96
97
	@$(MAKE) -C il2c clean

include ../build.mk