root/lm-sensors/branches/lm-sensors-3.0.0/prog/dump/Module.mk @ 5035

Revision 5035, 2.5 KB (checked in by jwrdegoede, 6 years ago)

Fix building on PPC machines

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#  Module.mk - Makefile for a Linux module for reading sensor data.
2#  Copyright (c) 1998, 1999  Frodo Looijaard <frodol@dds.nl>
3#
4#  This program is free software; you can redistribute it and/or modify
5#  it under the terms of the GNU General Public License as published by
6#  the Free Software Foundation; either version 2 of the License, or
7#  (at your option) any later version.
8#
9#  This program is distributed in the hope that it will be useful,
10#  but WITHOUT ANY WARRANTY; without even the implied warranty of
11#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12#  GNU General Public License for more details.
13#
14#  You should have received a copy of the GNU General Public License
15#  along with this program; if not, write to the Free Software
16#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18# Note that MODULE_DIR (the directory in which this file resides) is a
19# 'simply expanded variable'. That means that its value is substituted
20# verbatim in the rules, until it is redefined.
21MODULE_DIR := prog/dump
22PROGDUMPDIR := $(MODULE_DIR)
23
24PROGDUMPMAN8DIR := $(MANDIR)/man8
25PROGDUMPMAN8FILES := $(MODULE_DIR)/isadump.8 $(MODULE_DIR)/isaset.8
26
27# Regrettably, even 'simply expanded variables' will not put their currently
28# defined value verbatim into the command-list of rules...
29PROGDUMPTARGETS := $(MODULE_DIR)/isadump $(MODULE_DIR)/isaset
30PROGDUMPSOURCES := $(MODULE_DIR)/util.c $(MODULE_DIR)/isadump.c \
31                   $(MODULE_DIR)/isaset.c $(MODULE_DIR)/superio.c
32PROGDUMPBININSTALL := $(MODULE_DIR)/isadump $(MODULE_DIR)/isaset
33
34# Include all dependency files. We use '.rd' to indicate this will create
35# executables.
36INCLUDEFILES += $(PROGDUMPSOURCES:.c=.rd)
37
38REMOVEDUMPBIN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(SBINDIR)/%,$(PROGDUMPBININSTALL))
39REMOVEDUMPMAN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(PROGDUMPMAN8DIR)/%,$(PROGDUMPMAN8FILES))
40
41all-prog-dump: $(PROGDUMPTARGETS)
42user :: all-prog-dump
43
44$(MODULE_DIR)/isadump: $(MODULE_DIR)/isadump.ro $(MODULE_DIR)/superio.ro $(MODULE_DIR)/util.ro
45        $(CC) $(EXLDFLAGS) -o $@ $^
46
47$(MODULE_DIR)/isaset: $(MODULE_DIR)/isaset.ro $(MODULE_DIR)/util.ro
48        $(CC) $(EXLDFLAGS) -o $@ $^
49
50install-prog-dump: all-prog-dump
51        $(MKDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(PROGDUMPMAN8DIR)
52        $(INSTALL) -m 755 $(PROGDUMPBININSTALL) $(DESTDIR)$(SBINDIR)
53        $(INSTALL) -m 644 $(PROGDUMPMAN8FILES) $(DESTDIR)$(PROGDUMPMAN8DIR)
54user_install :: install-prog-dump
55
56user_uninstall::
57        $(RM) $(REMOVEDUMPBIN)
58        $(RM) $(REMOVEDUMPMAN)
59
60clean-prog-dump:
61        $(RM) $(PROGDUMPDIR)/*.rd $(PROGDUMPDIR)/*.ro $(PROGDUMPTARGETS)
62clean :: clean-prog-dump
Note: See TracBrowser for help on using the browser.