diff options
author | Thomas Graf <tgr@lsx.localdomain> | 2009-09-02 23:41:03 +0200 |
---|---|---|
committer | Thomas Graf <tgr@lsx.localdomain> | 2009-09-02 23:41:03 +0200 |
commit | f946cfaa3a45e4c5752e3930e8383196aae85399 (patch) | |
tree | 2d5c064f62ce353a4bb387bf244508c3bcd66e53 /src | |
parent | 2ead49f0d5873628156e50dfed7da14619a4172d (diff) | |
parent | a73e5f92c378e96458ae88a3dc07514ee5856987 (diff) | |
download | libnl-f946cfaa3a45e4c5752e3930e8383196aae85399.tar.gz |
Merge branch 'master' of git://dev.medozas.de/libnl
Conflicts:
lib/Makefile
src/Makefile
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 66 | ||||
-rw-r--r-- | src/Makefile.am | 86 |
2 files changed, 86 insertions, 66 deletions
diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index fb6ae9c1..00000000 --- a/src/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# src/Makefile -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation version 2.1 -# of the License. -# -# Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch> -# - -ifeq ($(shell [ ! -r ../Makefile.opts ] && echo 1),) - include ../Makefile.opts -endif - -LDFLAGS += -L../lib -lnl -CIN := $(wildcard nl-*.c) $(wildcard genl-*.c) $(wildcard nf-*.c) -TOOLS := $(CIN:%.c=%) - -CLS := $(wildcard cls/*.c) -CLS_OBJ := $(CLS:%.c=%.o) - -all: $(TOOLS) - -$(TOOLS): utils.o -nl-route-add nl-route-delete nl-route-list: route-utils.o rtnl-utils.o -nl-route-get: rtnl-utils.o -nl-addr-add nl-addr-delete nl-addr-list: addr-utils.o rtnl-utils.o -nl-link-list nl-link-set nl-link-stats: link-utils.o rtnl-utils.o -nl-link-ifindex2name nl-link-name2ifindex: rtnl-utils.o -nl-neigh-add nl-neigh-delete nl-neigh-list: neigh-utils.o rtnl-utils.o -nl-qdisc-delete nl-qdisc-list: qdisc-utils.o rtnl-utils.o -nl-rule-list: rule-utils.o rtnl-utils.o -nl-neightbl-list: rtnl-utils.o -nl-monitor: rtnl-utils.o -nl-tctree-list: rtnl-utils.o -nl-cls-add nl-cls-delete nl-cls-list: rtnl-utils.o cls/utils.o $(CLS_OBJ) - -genl-ctrl-list: ctrl-utils.o - -nf-ct-list: ct-utils.o -nf-log: log-utils.o rtnl-utils.o -nf-queue: queue-utils.o rtnl-utils.o - -nl-%: nl-%.o - @echo " LD $@"; \ - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -lnl-route - -genl-%: genl-%.o - @echo " LD $@"; \ - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -lnl-genl - -nf-%: nf-%.o - @echo " LD $@"; \ - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -lnl-nf -lnl-route - -clean: - @echo " CLEAN src"; \ - rm -f $(TOOLS) *.o - -distclean: clean - -install: - @true - -include ../Makefile.rules diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 00000000..96dc52b5 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,86 @@ +# -*- Makefile -*- + +AM_CFLAGS = -Wall -I${top_srcdir}/include +AM_LDFLAGS = -L${top_builddir}/lib + +noinst_PROGRAMS = \ + genl-ctrl-list \ + nf-ct-list nf-log nf-queue \ + nl-addr-add nl-addr-delete nl-addr-list \ + nl-link-list nl-link-set nl-link-stats \ + nl-link-ifindex2name nl-link-name2ifindex \ + nl-neigh-add nl-neigh-delete nl-neigh-list \ + nl-qdisc-delete nl-qdisc-list \ + nl-rule-list \ + nl-neightbl-list \ + nl-monitor \ + nl-tctree-list \ + nl-route-add nl-route-delete nl-route-get nl-route-list + +rtnl_utils_c = rtnl-utils.c utils.c + +genl_ctrl_list_SOURCES = genl-ctrl-list.c ctrl-utils.c utils.c +genl_ctrl_list_LDADD = -lnl-genl + +nf_ct_list_SOURCES = nf-ct-list.c ct-utils.c utils.c +nf_ct_list_LDADD = -lnl-nf +nf_log_SOURCES = nf-log.c log-utils.c ${rtnl_utils_c} +nf_log_LDADD = -lnl-nf +nf_queue_SOURCES = nf-queue.c queue-utils.c ${rtnl_utils_c} +nf_queue_LDADD = -lnl-nf + +addr_c = addr-utils.c ${rtnl_utils_c} +nl_addr_add_SOURCES = nl-addr-add.c ${addr_c} +nl_addr_add_LDADD = -lnl-route +nl_addr_delete_SOURCES = nl-addr-delete.c ${addr_c} +nl_addr_delete_LDADD = -lnl-route +nl_addr_list_SOURCES = nl-addr-list.c ${addr_c} +nl_addr_list_LDADD = -lnl-route + +link_c = link-utils.c ${rtnl_utils_c} +nl_link_list_SOURCES = nl-link-list.c ${link_c} +nl_link_list_LDADD = -lnl-route +nl_link_set_SOURCES = nl-link-set.c ${link_c} +nl_link_set_LDADD = -lnl-route +nl_link_stats_SOURCES = nl-link-stats.c ${link_c} +nl_link_stats_LDADD = -lnl-route +nl_link_ifindex2name_SOURCES = nl-link-ifindex2name.c ${rtnl_utils_c} +nl_link_ifindex2name_LDADD = -lnl-route +nl_link_name2ifindex_SOURCES = nl-link-name2ifindex.c ${rtnl_utils_c} +nl_link_name2ifindex_LDADD = -lnl-route + +nl_monitor_SOURCES = nl-monitor.c ${rtnl_utils_c} +nl_monitor_LDADD = -lnl-route + +neigh_c = neigh-utils.c ${rtnl_utils_c} +nl_neigh_add_SOURCES = nl-neigh-add.c ${neigh_c} +nl_neigh_add_LDADD = -lnl-route +nl_neigh_delete_SOURCES = nl-neigh-delete.c ${neigh_c} +nl_neigh_delete_LDADD = -lnl-route +nl_neigh_list_SOURCES = nl-neigh-list.c ${neigh_c} +nl_neigh_list_LDADD = -lnl-route + +nl_neightbl_list_SOURCES = nl-neightbl-list.c ${rtnl_utils_c} +nl_neightbl_list_LDADD = -lnl-route + +qdisc_c = qdisc-utils.c ${rtnl_utils_c} +nl_qdisc_delete_SOURCES = nl-qdisc-delete.c ${qdisc_c} +nl_qdisc_delete_LDADD = -lnl-route +nl_qdisc_list_SOURCES = nl-qdisc-list.c ${qdisc_c} +nl_qdisc_list_LDADD = -lnl-route + +route_c = route-utils.c ${rtnl_utils_c} +nl_route_add_SOURCES = nl-route-add.c ${route_c} +nl_route_add_LDADD = -lnl-route +nl_route_delete_SOURCES = nl-route-delete.c ${route_c} +nl_route_delete_LDADD = -lnl-route +nl_route_get_SOURCES = nl-route-get.c ${route_c} +nl_route_get_LDADD = -lnl-route +nl_route_list_SOURCES = nl-route-list.c ${route_c} +nl_route_list_LDADD = -lnl-route + +nl_rule_list_SOURCES = nl-rule-list.c rule-utils.c ${rtnl_utils_c} +nl_rule_list_LDADD = -lnl-route + +nl_tctree_list_SOURCES = nl-tctree-list.c ${rtnl_utils_c} +nl_tctree_list_LDADD = -lnl-route |