build.mk 1007 Bytes
Newer Older
1
2
3

COMMAND_TARGETS += $(LIBDIR)/libcommand.la

4
COMMAND_TARGETS += $(DIR)/command_list $(DIR)/command_send
5
6
7
8
9
10


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


11
$(ARCHOBJS): CFLAGS += -Wall -O3 -fPIC
Jeroen Vreeken's avatar
Jeroen Vreeken committed
12
$(LIBDIR)/libcommand.la: libutils.la liblog.la
13
$(LIBDIR)/libcommand.la_LDFLAGS += -lutils -lm -llog
14
15
16
17
18
19
$(LIBDIR)/libcommand.la: $(ARCHOBJS)
	$(LIB_LINK)

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

Jeroen Vreeken's avatar
Jeroen Vreeken committed
20
$(DIR)/command_list: libcommand.la
21
$(DIR)/command_list_LDFLAGS += -lcommand
22
23
$(DIR)/command_list: $(COMMAND_LIST_OBJS)

24
25
26
27
28
29
30
31
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)

SRCS += $(ARCHSRCS) $(COMMAND_LIST_SRCS) $(COMMAND_SEND_SRCS)
32
TARGETS += $(COMMAND_TARGETS)
33
34
35
36
CLEAN += $(COMMAND_TARGETS) $(ARCHOBJS) \
	$(COMMAND_LIST_OBJS) \
	$(COMMAND_SEND_OBJS) \
	$(LIBDIR)/libcommand.a