Initial import package libnl: Convenience library for kernel netlink sockets
[external/libnl.git] / src / Makefile
1 #
2 # src/Makefile
3 #
4 #       This library is free software; you can redistribute it and/or
5 #       modify it under the terms of the GNU Lesser General Public
6 #       License as published by the Free Software Foundation version 2.1
7 #       of the License.
8 #
9 # Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
10 #
11
12 ifeq ($(shell [ ! -r ../Makefile.opts ] && echo 1),)
13     include ../Makefile.opts
14 endif
15
16 LDFLAGS += -L../lib -lnl utils.o
17 CIN     := $(wildcard nl-*.c) $(wildcard genl-*.c) $(wildcard nf-*.c)
18 TOOLS   := $(CIN:%.c=%)
19
20 all: $(TOOLS)
21
22 $(TOOLS): utils.o
23
24 nl-%: nl-%.c
25         @echo "  LD $@"; \
26         $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
27
28 genl-%: genl-%.c
29         @echo "  LD $@"; \
30         $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
31
32 nf-%: nf-%.c
33         @echo "  LD $@"; \
34         $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
35
36 clean:
37         @echo "  CLEAN src"; \
38         rm -f $(TOOLS) utils.o
39
40 distclean: clean
41
42 install:
43         @true
44
45 include ../Makefile.rules