This commit was generated by cvs2svn to compensate for changes in r786,
[libnl.git] / Makefile
1 #
2 # 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 SUBDIRS := lib include doc src
17 .PHONY: all clean distclean install gendoc $(SUBDIRS)
18
19 all: Makefile.opts
20         @for dir in $(SUBDIRS); do \
21                 echo "Entering $$dir" && cd $$dir && $(MAKE) && cd ..; \
22         done
23
24 clean: Makefile.opts
25         rm -f cscope.*
26         @for dir in $(SUBDIRS); do \
27                 echo "Entering $$dir" && cd $$dir && $(MAKE) clean && cd ..; \
28         done
29
30 distclean: clean
31         @$(RM) -rf Makefile.opts autom4te.cache config.log config.status
32         @for dir in $(SUBDIRS); do \
33                 echo "Entering $$dir" && cd $$dir && $(MAKE) distclean && cd ..; \
34         done
35
36 install: Makefile.opts
37         @for dir in $(SUBDIRS); do \
38                 echo "Entering $$dir" && cd $$dir && $(MAKE) install && cd ..; \
39         done
40         mkdir -p $(DESTDIR)$(libdir)/pkgconfig/
41         install -m 0644 libnl-1.pc $(DESTDIR)$(libdir)/pkgconfig/
42
43 gendoc:
44         $(MAKE) -C doc gendoc
45
46 show: Makefile.opts
47         @echo "CC:          $(CC)"
48         @echo "RM:          $(RM)"
49         @echo "CFLAGS:      $(CFLAGS)"
50         @echo "DEPFLAGS:    $(DEPFLAGS)"
51         @echo "LDFLAGS:     $(LDFLAGS)"
52         @echo "DESTDIR:     $(DESTDIR)"
53         @echo "prefix:      $(prefix)"
54         @echo "libdir:      $(libdir)"
55         @echo "includedir:  $(includedir)"
56
57 cscope:
58         cscope -b -q -R -Iinclude -slib -ssrc
59
60
61 $(SUBDIRS):
62         cd $@ && $(MAKE)
63
64 -include Makefile.rules