ports

morpheus ports
git clone git://git.2f30.org/ports
Log | Files | Refs | LICENSE

iproute2.mk (1060B)


      1 BIN = ip/ip ip/rtmon #tc/tc
      2 LIB = lib/libutil.a
      3 lib_libutil_a_OBJ = `{ls lib/*.c | sed 's/.$/o/'}
      4 ip_ip_OBJ = `{ls ip/*.c | sed 's/.$/o/' | grep -v 'rtmon.o$'}
      5 ip_rtmon_OBJ = ip/rtmon.o
      6 #tc_tc_OBJ = `{ls tc/*.c | sed 's/.$/o/' | grep -v 'em_ipset.o$' | grep -v 'm_ipt.o$' | grep -v 'm_xt_old.o$' | grep -v 'q_atm.o$'} tc/emp_ematch.o
      7 LOCAL_BIN_LDFLAGS = -Llib -lutil
      8 
      9 LOCAL_CFLAGS = -Iinclude -DHAVE_SETNS
     10 
     11 CLEAN_FILES = ip/static-syms.h
     12 
     13 INSTALL_BIN = ip/ip ip/rtmon
     14 INSTALL_MAN8 = man/man8/ip.8 man/man8/rtmon.8
     15 
     16 #DEPS = yacc lex iptables
     17 
     18 <$mkbuild/mk.default
     19 
     20 $BIN: $LIB
     21 
     22 #tc/emp_ematch.c: tc/emp_ematch.y
     23 #	$YACC -L $prereq
     24 #	mv y.tab.c $target
     25 
     26 #tc/static-syms.o: tc/static-syms.h
     27 #tc/static-syms.h: `{ls tc/*.c}
     28 
     29 ip/static-syms.o: ip/static-syms.h
     30 ip/static-syms.h: `{ls ip/*.c}
     31 
     32 %/static-syms.h:Q:
     33 	for s in `grep -B 3 '\<dlsym' $prereq | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do
     34 		sed -n '/'$s'[^ ]* =/{s:.* \([^ ]*'$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $prereq
     35 	done > $target