mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-12-10 18:13:24 +00:00
Build atm and netem as shared libraries
(Logical change 1.47)
This commit is contained in:
parent
60a2c2e6fb
commit
d3ea2e8193
31
tc/Makefile
31
tc/Makefile
@ -17,16 +17,6 @@ TCMODULES += q_dsmark.o
|
|||||||
TCMODULES += q_gred.o
|
TCMODULES += q_gred.o
|
||||||
TCMODULES += f_tcindex.o
|
TCMODULES += f_tcindex.o
|
||||||
TCMODULES += q_ingress.o
|
TCMODULES += q_ingress.o
|
||||||
|
|
||||||
ifeq ($(TC_CONFIG_ATM),y)
|
|
||||||
TCMODULES += q_atm.o
|
|
||||||
LDLIBS += -latm
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(TC_CONFIG_NETEM),y)
|
|
||||||
TCMODULES += q_netem.o
|
|
||||||
endif
|
|
||||||
|
|
||||||
TCMODULES += q_csz.o
|
TCMODULES += q_csz.o
|
||||||
TCMODULES += q_htb.o
|
TCMODULES += q_htb.o
|
||||||
TCMODULES += q_hpfq.o
|
TCMODULES += q_hpfq.o
|
||||||
@ -39,10 +29,22 @@ TCLIB += tc_red.o
|
|||||||
TCLIB += tc_cbq.o
|
TCLIB += tc_cbq.o
|
||||||
TCLIB += tc_estimator.o
|
TCLIB += tc_estimator.o
|
||||||
|
|
||||||
|
TCSO :=
|
||||||
|
ifeq ($(TC_CONFIG_ATM),y)
|
||||||
|
TCSO += q_atm.so
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(TC_CONFIG_NETEM),y)
|
||||||
|
TCSO += q_netem.so
|
||||||
|
endif
|
||||||
|
|
||||||
LDLIBS += -L. -ltc -lm -ldl
|
LDLIBS += -L. -ltc -lm -ldl
|
||||||
LDFLAGS += -Wl,-export-dynamic
|
LDFLAGS += -Wl,-export-dynamic
|
||||||
|
|
||||||
all: libtc.a tc
|
%.so: %.c
|
||||||
|
$(CC) $(CFLAGS) -shared -fpic $< -o $@
|
||||||
|
|
||||||
|
all: libtc.a tc $(TCSO)
|
||||||
|
|
||||||
tc: $(TCOBJ) $(LIBNETLINK) $(LIBUTIL) $(TCLIB)
|
tc: $(TCOBJ) $(LIBNETLINK) $(LIBUTIL) $(TCLIB)
|
||||||
|
|
||||||
@ -50,9 +52,14 @@ libtc.a: $(TCLIB)
|
|||||||
$(AR) rcs $@ $(TCLIB)
|
$(AR) rcs $@ $(TCLIB)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
|
mkdir -p $(DESTDIR)/usr/lib/tc
|
||||||
install -m 0755 -s tc $(DESTDIR)$(SBINDIR)
|
install -m 0755 -s tc $(DESTDIR)$(SBINDIR)
|
||||||
|
for i in $(TCSO); do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; done
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(TCOBJ) $(TCLIB) libtc.a tc
|
rm -f $(TCOBJ) $(TCLIB) libtc.a tc
|
||||||
|
|
||||||
|
q_atm.so: q_atm.c
|
||||||
|
$(CC) $(CFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user