build.mk 1.57 KB
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

BLOCK_TARGETS += $(LIBDIR)/libblock.la

$(eval $(call SUBDIR,il2c))


BLOCK_SRCS = \
	$(DIR)/block_add.c \
	$(DIR)/block_and2.il \
	$(DIR)/block_bridge_pwm.c \
	$(DIR)/block_counter.c \
	$(DIR)/block_debug.c \
	$(DIR)/block_decoder_uint32_bool.c \
	$(DIR)/block_filter_iir.c \
	$(DIR)/block_filter_lp.c \
	$(DIR)/block_friction.c \
	$(DIR)/block_gain.c \
	$(DIR)/block_gain_var.c \
19
	$(DIR)/block_inverse_proportional.c \
Jeroen Vreeken's avatar
Jeroen Vreeken committed
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
	$(DIR)/block_limit.c \
	$(DIR)/block_limit_dyn.c \
	$(DIR)/block_limit_2nd.c \
	$(DIR)/block_limit_var.c \
	$(DIR)/block_matrix_2x2.c \
	$(DIR)/block_multiplexer.c \
	$(DIR)/block_not.il \
	$(DIR)/block_or2.il \
	$(DIR)/block_or3.il \
	$(DIR)/block_or4.il \
	$(DIR)/block_pid.c \
	$(DIR)/block_pid_aw.c \
	$(DIR)/block_quadrature_decoder.c \
	$(DIR)/block_quantize.c \
	$(DIR)/block_random.c \
	$(DIR)/block_rangecheck.c \
	$(DIR)/block_register.il \
	$(DIR)/block_setpoint_generator.c \
	$(DIR)/block_setreset.il \
	$(DIR)/block_servo_state.c \
	$(DIR)/block_sine.c \
Jeroen Vreeken's avatar
Jeroen Vreeken committed
41
	$(DIR)/block_state_machine.c \
Jeroen Vreeken's avatar
Jeroen Vreeken committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
	$(DIR)/block_subtract.c \
	$(DIR)/block_switch.c \
	$(DIR)/block_trajectplayer.c \
	$(DIR)/block_trigger.c \
	$(DIR)/block_value.c \
	$(DIR)/block_value_bool.c \
	$(DIR)/block_value_uint32.c

OS= $(shell uname -s)
ifneq ($(OS), FreeBSD)
BLOCK_SRCS+= \
	$(DIR)/block_joystick.c
endif

BLOCK_OBJSC := $(BLOCK_SRCS:.c=.lo)
BLOCK_OBJS := $(BLOCK_OBJSC:.il=.il2c.lo)


Jeroen Vreeken's avatar
Jeroen Vreeken committed
60
$(BLOCK_OBJS): CFLAGS += -O0 -g -Wall
61
$(LIBDIR)/libblock.la_LDFLAGS += -lm
Jeroen Vreeken's avatar
Jeroen Vreeken committed
62
63
64
65
66
67
68
$(LIBDIR)/libblock.la: $(BLOCK_OBJS)
	$(LIB_LINK)


TARGETS += $(BLOCK_TARGETS)
CLEAN += $(BLOCK_TARGETS) $(BLOCK_OBJS)
SRCS += $(BLOCK_SRCS)