build.mk 766 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

COMMAND_TARGETS += $(LIBDIR)/libcommand.la

COMMAND_TARGETS += $(DIR)/command_list


ARCHSRCS := $(DIR)/command.c $(DIR)/command_tcp.c
ARCHOBJS := $(ARCHSRCS:.c=.lo)


$(LIBDIR)/libcommand.la: $(LIBDIR)/libutils.la $(LIBDIR)/liblog.la
$(LIBDIR)/libcommand.la: CFLAGS += -Wall -O3 -fPIC
$(LIBDIR)/libcommand.la: LDFLAGS += -lutils -lm -llog -rpath $(ABSLIBDIR)
$(LIBDIR)/libcommand.la: $(ARCHOBJS)
	$(LIB_LINK)

COMMAND_LIST_SRCS := $(DIR)/command_list.c
COMMAND_LIST_OBJS := $(COMMAND_LIST_SRCS:.c=.o)

$(DIR)/command_list: $(LIBDIR)/libcommand.la
$(DIR)/command_list: LDFLAGS += -lcommand
$(DIR)/command_list: $(COMMAND_LIST_OBJS)

SRCS += $(ARCHSRCS) $(COMMAND_LIST_SRCS)
TARGETS += $(COMMAND_TARGETS)
CLEAN += $(COMMAND_TARGETS) $(ARCHOBJS) $(COMMAND_LIST_OBJS)