Splitted out mii-tool as own package
[oss-qm-packages.git] / Makefile
blob1057b2855be4a91e2caafc1412f0eb32e5adb425
2 # Makefile Main Makefile for the net-tools Package
4 # MII-TOOL A tool for controlling MII-type ethernet devices
5 # (transfer modes, etc). Taken from the net-tools package.
7 # Author: Enrico Weigelt, metux IT service <weigelt@metux.de>
9 # URLs: git://git.metux.de/oss-qm-packages.git
10 # Branches/Tags: METUX.mii-tool*
12 #################################################################################
14 # NET-TOOLS A collection of programs that form the base set of the
15 # NET-3 Networking Distribution for the LINUX operating
16 # system.
18 # Version: 2001-02-13
20 # Author: Bernd Eckenfels <net-tools@lina.inka.de>
21 # Copyright 1995-1996 Bernd Eckenfels, Germany
23 # URLs: ftp://ftp.inka.de/pub/comp/Linux/networking/NetTools/
24 # ftp://ftp.linux.org.uk/pub/linux/Networking/PROGRAMS/NetTools/
25 # http://www.inka.de/sites/lina/linux/NetTools/index_en.html
27 # Based on: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
28 # Copyright 1988-1993 MicroWalt Corporation
30 # Modifications:
31 # Extensively modified from 01/21/94 onwards by
32 # Alan Cox <A.Cox@swansea.ac.uk>
33 # Copyright 1993-1994 Swansea University Computer Society
35 # Be careful!
36 # This Makefile doesn't describe complete dependencies for all include files.
37 # If you change include files you might need to do make clean.
39 # {1.20} Bernd Eckenfels: Even more modifications for the new
40 # package layout
41 # {1.21} Bernd Eckenfels: Check if config.in is newer than
42 # config.status
43 # {1.22} Bernd Eckenfels: Include ypdomainname and nisdomainame
45 # 1.3.50-BETA6 private Release
47 #960125 {1.23} Bernd Eckenfels: Peter Tobias' rewrite for
48 # makefile-based installation
49 # 1.3.50-BETA6a private Release
51 #960201 {1.24} Bernd Eckenfels: net-features.h added
53 #960201 1.3.50-BETA6b private Release
55 #960203 1.3.50-BETA6c private Release
57 #960204 1.3.50-BETA6d private Release
59 #960204 {1.25} Bernd Eckenfels: DISTRIBUTION added
61 #960205 1.3.50-BETA6e private Release
63 #960206 {1.26} Bernd Eckenfels: afrt.o removed (cleaner solution)
65 #960215 1.3.50-BETA6f Release
67 #960216 {1.30} Bernd Eckenfels: net-lib support
68 #960322 {1.31} Bernd Eckenfels: moveable netlib, TOPDIR
69 #960424 {1.32} Bernd Eckenfels: included the URLs in the Comment
71 #960514 1.31-alpha release
73 #960518 {1.33} Bernd Eckenfels: -I/usr/src/linux/include comment added
75 # This program is free software; you can redistribute it
76 # and/or modify it under the terms of the GNU General
77 # Public License as published by the Free Software
78 # Foundation; either version 2 of the License, or (at
79 # your option) any later version.
82 PROGS := mii-tool
84 include config.mk
86 # Compiler and Linker Options
87 # You may need to uncomment and edit these if you are using libc5 and IPv6.
88 COPTS = -D_GNU_SOURCE -O2 -Wall -g
89 ifeq ($(origin LOPTS), undefined)
90 LOPTS =
91 endif
93 # -------- end of user definitions --------
95 MAINTAINER = weigelt@metux.de
96 RELEASE = 1.60
98 .EXPORT_ALL_VARIABLES:
100 CFLAGS = $(COPTS) -I. -idirafter ./include/
102 SUBDIRS = man/
104 MDEFINES = COPTS='$(COPTS)' LOPTS='$(LOPTS)' TOPDIR='$(TOPDIR)'
106 %.o: %.c net-features.h version.h $<
107 $(CC) $(CFLAGS) -c $<
109 all: subdirs $(PROGS)
111 version.h:
112 echo "#define RELEASE \"$(RELEASE)\"" >> version.h
114 mii-tool.o:: version.h
116 install: all installbin installdata
118 update: all installbin installdata
120 mostlyclean:
121 rm -f *.o DEADJOE config.new *~ *.orig lib/*.o
123 clean: mostlyclean
124 rm -f $(PROGS)
125 rm -f version.h
126 @for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) ; done
128 clobber: clean
129 rm -f $(PROGS) config.make
130 @for i in $(SUBDIRS); do (cd $$i && $(MAKE) clobber) ; done
132 subdirs:
133 @for i in $(SUBDIRS); do $(MAKE) -C $$i $(MDEFINES) ; done
135 mii-tool: mii-tool.o
136 $(CC) $(LDFLAGS) -o mii-tool mii-tool.o
138 installbin:
139 $(INSTALL) -m 0755 -d $(DESTDIR)$(SBINDIR)
140 $(INSTALL) -m 0755 mii-tool $(DESTDIR)$(SBINDIR)
141 $(STRIP) $(STRIP_ARGS) $(DESTDIR)$(SBINDIR)/mii-tool
143 installdata:
144 $(MAKE) -C man install
146 # End of Makefile.