2004-08-14 07:54:55 +08:00
|
|
|
TCOBJ= tc.o tc_qdisc.o tc_class.o tc_filter.o tc_util.o \
|
2005-06-24 01:21:46 +08:00
|
|
|
m_police.o m_estimator.o m_action.o m_ematch.o \
|
|
|
|
emp_ematch.yacc.o emp_ematch.lex.o
|
2004-04-16 04:56:59 +08:00
|
|
|
|
2004-06-26 05:14:22 +08:00
|
|
|
include ../Config
|
|
|
|
|
2004-04-16 04:56:59 +08:00
|
|
|
TCMODULES :=
|
|
|
|
TCMODULES += q_fifo.o
|
|
|
|
TCMODULES += q_sfq.o
|
|
|
|
TCMODULES += q_red.o
|
|
|
|
TCMODULES += q_prio.o
|
|
|
|
TCMODULES += q_tbf.o
|
|
|
|
TCMODULES += q_cbq.o
|
|
|
|
TCMODULES += f_rsvp.o
|
|
|
|
TCMODULES += f_u32.o
|
|
|
|
TCMODULES += f_route.o
|
|
|
|
TCMODULES += f_fw.o
|
2005-06-24 01:21:46 +08:00
|
|
|
TCMODULES += f_basic.o
|
2004-06-10 05:31:01 +08:00
|
|
|
TCMODULES += q_dsmark.o
|
|
|
|
TCMODULES += q_gred.o
|
|
|
|
TCMODULES += f_tcindex.o
|
|
|
|
TCMODULES += q_ingress.o
|
2004-08-10 00:35:28 +08:00
|
|
|
TCMODULES += q_hfsc.o
|
|
|
|
TCMODULES += q_htb.o
|
2004-08-31 05:20:10 +08:00
|
|
|
TCMODULES += m_gact.o
|
2004-12-09 04:13:56 +08:00
|
|
|
TCMODULES += m_mirred.o
|
2005-01-18 07:26:23 +08:00
|
|
|
TCMODULES += m_ipt.o
|
2005-01-18 07:32:51 +08:00
|
|
|
TCMODULES += m_pedit.o
|
|
|
|
TCMODULES += p_ip.o
|
|
|
|
TCMODULES += p_icmp.o
|
|
|
|
TCMODULES += p_tcp.o
|
|
|
|
TCMODULES += p_udp.o
|
2005-06-24 01:21:46 +08:00
|
|
|
TCMODULES += em_nbyte.o
|
|
|
|
TCMODULES += em_cmp.o
|
|
|
|
TCMODULES += em_u32.o
|
|
|
|
TCMODULES += em_meta.o
|
2005-01-18 07:32:51 +08:00
|
|
|
|
2004-04-16 04:56:59 +08:00
|
|
|
TCOBJ += $(TCMODULES)
|
|
|
|
|
|
|
|
TCLIB := tc_core.o
|
|
|
|
TCLIB += tc_red.o
|
|
|
|
TCLIB += tc_cbq.o
|
|
|
|
TCLIB += tc_estimator.o
|
|
|
|
|
2004-08-31 05:20:10 +08:00
|
|
|
CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PROB
|
|
|
|
|
2004-07-03 01:47:53 +08:00
|
|
|
TCSO :=
|
2004-08-10 01:12:23 +08:00
|
|
|
TCSO += q_netem.so
|
2004-07-03 01:47:53 +08:00
|
|
|
ifeq ($(TC_CONFIG_ATM),y)
|
|
|
|
TCSO += q_atm.so
|
|
|
|
endif
|
|
|
|
|
2004-04-16 04:56:59 +08:00
|
|
|
LDLIBS += -L. -ltc -lm -ldl
|
2004-08-31 05:07:09 +08:00
|
|
|
|
2004-04-16 04:56:59 +08:00
|
|
|
LDFLAGS += -Wl,-export-dynamic
|
|
|
|
|
2005-06-24 04:16:43 +08:00
|
|
|
YACC := bison
|
|
|
|
LEX := flex
|
|
|
|
|
2004-07-03 01:47:53 +08:00
|
|
|
%.so: %.c
|
|
|
|
$(CC) $(CFLAGS) -shared -fpic $< -o $@
|
|
|
|
|
2004-04-16 04:56:59 +08:00
|
|
|
|
2005-02-10 06:05:41 +08:00
|
|
|
all: libtc.a tc $(TCSO)
|
2005-02-08 02:01:21 +08:00
|
|
|
|
|
|
|
tc: $(TCOBJ) $(LIBNETLINK) $(LIBUTIL) $(TCLIB)
|
2004-08-31 05:07:09 +08:00
|
|
|
|
2004-04-16 04:56:59 +08:00
|
|
|
libtc.a: $(TCLIB)
|
|
|
|
$(AR) rcs $@ $(TCLIB)
|
|
|
|
|
|
|
|
install: all
|
2004-07-03 01:47:53 +08:00
|
|
|
mkdir -p $(DESTDIR)/usr/lib/tc
|
2004-04-16 04:56:59 +08:00
|
|
|
install -m 0755 -s tc $(DESTDIR)$(SBINDIR)
|
2004-08-31 04:54:46 +08:00
|
|
|
for i in $(TCSO); \
|
2004-08-24 04:21:21 +08:00
|
|
|
do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; \
|
|
|
|
done
|
2004-04-16 04:56:59 +08:00
|
|
|
|
|
|
|
clean:
|
2005-06-24 01:23:53 +08:00
|
|
|
rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.yacc.h; \
|
|
|
|
rm -f emp_ematch.yacc.output
|
2004-04-16 04:56:59 +08:00
|
|
|
|
2004-07-03 01:47:53 +08:00
|
|
|
q_atm.so: q_atm.c
|
|
|
|
$(CC) $(CFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
|
|
|
|
|
2005-06-24 01:21:46 +08:00
|
|
|
%.yacc.c: %.y
|
|
|
|
$(YACC) $(YACCFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
%.lex.c: %.l
|
2005-07-06 06:11:37 +08:00
|
|
|
$(LEX) $(LEXFLAGS) -o$@ $<
|