Commit d3ea2e81 authored by osdl.net!shemminger's avatar osdl.net!shemminger

Build atm and netem as shared libraries

(Logical change 1.47)
parent 60a2c2e6
......@@ -17,16 +17,6 @@ TCMODULES += q_dsmark.o
TCMODULES += q_gred.o
TCMODULES += f_tcindex.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_htb.o
TCMODULES += q_hpfq.o
......@@ -39,10 +29,22 @@ TCLIB += tc_red.o
TCLIB += tc_cbq.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
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)
......@@ -50,9 +52,14 @@ libtc.a: $(TCLIB)
$(AR) rcs $@ $(TCLIB)
install: all
mkdir -p $(DESTDIR)/usr/lib/tc
install -m 0755 -s tc $(DESTDIR)$(SBINDIR)
for i in $(TCSO); do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; done
clean:
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment