BLOCK_TARGETS := $(LIBDIR)/libblock.la $(eval $(call SUBDIR,il2c)) BLOCKS := \ add \ bridge_pwm \ command_bool \ command_float \ counter \ debug \ decoder_uint32_bool \ filter_iir \ filter_lp \ friction \ gain \ gain_var \ inverse_proportional \ limit \ limit_dyn \ limit_2nd \ limit_var \ matrix_2x2 \ multiplexer \ pand \ pid \ pid_aw \ 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 := \ and2 \ not \ or2 \ or3 \ or4 \ register \ setreset ifneq ($(OS), FreeBSD) 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) 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.ctrl \ $(DIR)/block_command_bool.test.ctrl \ $(DIR)/block_command_float.test.ctrl \ $(DIR)/block_gain.test.ctrl \ $(DIR)/block_limit.test.ctrl \ $(DIR)/block_limit_var.test.ctrl \ $(DIR)/block_matrix_2x2.test.ctrl \ $(DIR)/block_not.test.ctrl \ $(DIR)/block_oneshot.test.ctrl \ $(DIR)/block_pid_aw.test.ctrl \ $(DIR)/block_rangecheck.test.ctrl \ $(DIR)/block_setpoint_generator_1d.test.ctrl \ $(DIR)/block_setpoint_generator_3d.test.ctrl \ $(DIR)/block_servo_state.test.ctrl \ $(DIR)/block_state_machine.test.ctrl \ $(DIR)/block_quantize.test.ctrl