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.
 
 
 
 
 
 

48 lines
1.3 KiB

COMMAND_TARGETS += $(LIBDIR)/libcommand.la
COMMAND_TARGETS += $(DIR)/command_list $(DIR)/command_send
ifneq ($(OS), FreeBSD)
COMMAND_TARGETS += $(DIR)/command_joystick
endif
ARCHSRCS := $(DIR)/command.c $(DIR)/command_tcp.c
ARCHOBJS := $(ARCHSRCS:.c=.lo)
$(ARCHOBJS): CFLAGS += -Wall -O3 -fPIC
$(LIBDIR)/libcommand.la: libutils.la liblog.la
$(LIBDIR)/libcommand.la_LDFLAGS += -lutils -lm -llog
$(LIBDIR)/libcommand.la: $(ARCHOBJS)
$(LIB_LINK)
COMMAND_LIST_SRCS := $(DIR)/command_list.c
COMMAND_LIST_OBJS := $(COMMAND_LIST_SRCS:.c=.o)
$(DIR)/command_list: libcommand.la
$(DIR)/command_list_LDFLAGS += -lcommand
$(DIR)/command_list: $(COMMAND_LIST_OBJS)
COMMAND_SEND_SRCS := $(DIR)/command_send.c
COMMAND_SEND_OBJS := $(COMMAND_SEND_SRCS:.c=.o)
$(DIR)/command_send: libcommand.la
$(DIR)/command_send_LDFLAGS += -lcommand
$(DIR)/command_send: $(COMMAND_SEND_OBJS)
COMMAND_JOYSTICK_SRCS := $(DIR)/command_joystick.c
COMMAND_JOYSTICK_OBJS := $(COMMAND_JOYSTICK_SRCS:.c=.o)
$(DIR)/command_joystick: libcommand.la
$(DIR)/command_joystick_LDFLAGS += -lcommand
$(DIR)/command_joystick: $(COMMAND_JOYSTICK_OBJS)
SRCS += $(ARCHSRCS) $(COMMAND_LIST_SRCS) $(COMMAND_SEND_SRCS) $(COMMAND_JOYSTICK_SRCS)
TARGETS += $(COMMAND_TARGETS)
CLEAN += $(COMMAND_TARGETS) $(ARCHOBJS) \
$(COMMAND_LIST_OBJS) \
$(COMMAND_SEND_OBJS) \
$(COMMAND_JOYSTICK_OBJS) \
$(LIBDIR)/libcommand.a