You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

136 lines
2.7 KiB

BLOCK_TARGETS := $(LIBDIR)/libblock.la
$(eval $(call SUBDIR,il2c))
BLOCKS := \
add \
and \
bool2float \
bridge_pwm \
command_bool \
command_float \
command_uint32 \
controller_profile \
counter \
deadzone \
debug \
debug_bool \
debug_sint32 \
decoder_uint32_bool \
delay_bool \
ex \
filter_iir \
filter_lp \
friction \
gain \
gain_ratio_abs \
gain_var \
i2t \
inverse_proportional \
limit \
limit_dyn \
limit_2nd \
limit_switch \
limit_var \
log \
matrix_2x2 \
motor_model_dc_v \
multiplexer \
pid \
pid_aw \
quadratic_sign \
quadrature_decoder \
quantize \
random \
rangecheck \
setpoint_generator_1d \
setpoint_generator_3d \
servo_state \
sine \
state_machine \
subtract \
switch \
trajectplayer \
trigger \
value \
value_bool \
value_uint32 \
comparator \
schmitt_trigger \
oneshot
BLOCKS_IL := \
not \
or2 \
or3 \
or4 \
register \
setreset
BLOCKS_NO_C := \
and2 \
and3 \
and4 \
and5 \
ex2 \
value_float
ifdef BUILD_LINUX_JOYSTICK
BLOCKS+= \
joystick
endif
BLOCK_SRCS_IL := $(addsuffix .il,$(addprefix $(DIR)/block_,$(BLOCKS_IL)))
$(BLOCK_SRCS_IL): $(IL2C)
BLOCK_SRCS := $(addsuffix .c,$(addprefix $(DIR)/block_,$(BLOCKS))) \
$(BLOCK_SRCS_IL)
BLOCK_OBJSC := $(BLOCK_SRCS:.c=.lo)
BLOCK_OBJS := $(BLOCK_OBJSC:.il=.il2c.lo)
$(BLOCK_OBJS): CFLAGS += -O3 -Wall
$(LIBDIR)/libblock.la_LDFLAGS += -lm -lcontroller -llog
$(LIBDIR)/libblock.la: libcontroller.la liblog.la
$(LIBDIR)/libblock.la: $(BLOCK_OBJS)
$(LIB_LINK)
CTRL_BLOCKS += $(BLOCKS) $(BLOCKS_IL) $(BLOCKS_NO_C)
CTRL_BLOCK_LIBS += libblock.la
TARGETS += $(BLOCK_TARGETS)
CLEAN += $(BLOCK_TARGETS) $(BLOCK_OBJS) $(BLOCK_OBJS:.lo=.o)
SRCS += $(BLOCK_SRCS)
CTRL_TESTS += \
$(DIR)/block_bridge_pwm.test.output \
$(DIR)/block_command_bool.test.output \
$(DIR)/block_command_float.test.output \
$(DIR)/block_command_uint32.test.output \
$(DIR)/block_deadzone.test.output \
$(DIR)/block_ex.test.output \
$(DIR)/block_gain.test.output \
$(DIR)/block_gain_ratio_abs.test.output \
$(DIR)/block_i2t.test.output \
$(DIR)/block_limit.test.output \
$(DIR)/block_limit_switch.test.output \
$(DIR)/block_limit_var.test.output \
$(DIR)/block_log.test.output \
$(DIR)/block_matrix_2x2.test.output \
$(DIR)/block_motor_model_dc_v.test.output \
$(DIR)/block_not.test.output \
$(DIR)/block_oneshot.test.output \
$(DIR)/block_pid_aw.test.output \
$(DIR)/block_quadratic_sign.test.output \
$(DIR)/block_rangecheck.test.output \
$(DIR)/block_setpoint_generator_1d.test.output \
$(DIR)/block_setpoint_generator_3d.test.output \
$(DIR)/block_servo_state.test.output \
$(DIR)/block_state_machine.test.output \
$(DIR)/block_quadrature_decoder.test.output \
$(DIR)/block_quantize.test.output