| 1 | # Makefile bmon Makefile |
|---|
| 2 | # |
|---|
| 3 | # $Id: GNUmakefile 16 2004-10-29 12:04:07Z tgr $ |
|---|
| 4 | # |
|---|
| 5 | # Copyright (c) 2001-2004 Thomas Graf <tgraf@suug.ch> |
|---|
| 6 | # |
|---|
| 7 | # Permission is hereby granted, free of charge, to any person obtaining a |
|---|
| 8 | # copy of this software and associated documentation files (the "Software"), |
|---|
| 9 | # to deal in the Software without restriction, including without limitation |
|---|
| 10 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, |
|---|
| 11 | # and/or sell copies of the Software, and to permit persons to whom the |
|---|
| 12 | # Software is furnished to do so, subject to the following conditions: |
|---|
| 13 | # |
|---|
| 14 | # The above copyright notice and this permission notice shall be included |
|---|
| 15 | # in all copies or substantial portions of the Software. |
|---|
| 16 | # |
|---|
| 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
|---|
| 18 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|---|
| 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|---|
| 20 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|---|
| 21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|---|
| 22 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|---|
| 23 | # DEALINGS IN THE SOFTWARE. |
|---|
| 24 | |
|---|
| 25 | ifeq ($(shell [ ! -r Makefile.opts ] && echo 1),) |
|---|
| 26 | include Makefile.opts |
|---|
| 27 | endif |
|---|
| 28 | |
|---|
| 29 | SUBDIRS := src |
|---|
| 30 | .PHONY: all clean distclean install $(SUBDIRS) |
|---|
| 31 | |
|---|
| 32 | export |
|---|
| 33 | |
|---|
| 34 | all: Makefile.opts |
|---|
| 35 | @for dir in $(SUBDIRS); do \ |
|---|
| 36 | echo "Entering $$dir" && cd $$dir && $(MAKE) && cd ..; \ |
|---|
| 37 | done |
|---|
| 38 | |
|---|
| 39 | clean: |
|---|
| 40 | @for dir in $(SUBDIRS); do \ |
|---|
| 41 | echo "Entering $$dir" && cd $$dir && $(MAKE) clean && cd ..; \ |
|---|
| 42 | done |
|---|
| 43 | |
|---|
| 44 | distclean: clean |
|---|
| 45 | @rm -rf autom4te.cache config.log config.status Makefile.opts include/bmon/defs.h |
|---|
| 46 | @for dir in $(SUBDIRS); do \ |
|---|
| 47 | echo "Entering $$dir" && cd $$dir && $(MAKE) distclean && cd ..; \ |
|---|
| 48 | done |
|---|
| 49 | |
|---|
| 50 | install: |
|---|
| 51 | ./install-sh -c -s -m 0755 src/bmon $(INSTALLDIR)/usr/sbin/bmon |
|---|
| 52 | make -C libnl install |
|---|
| 53 | |
|---|
| 54 | show: Makefile.opts |
|---|
| 55 | @echo "CC: $(CC)" |
|---|
| 56 | @echo "RM: $(RM)" |
|---|
| 57 | @echo "CFLAGS: $(CFLAGS)" |
|---|
| 58 | @echo "CPPFLAGS: $(CPPFLAGS)" |
|---|
| 59 | @echo "DEPFLAGS: $(DEPFLAGS)" |
|---|
| 60 | @echo "LDFLAGS: $(LDFLAGS)" |
|---|
| 61 | |
|---|
| 62 | -include Makefile.rules |
|---|