root/lm-sensors/trunk/kernel/busses/Module.mk @ 876

Revision 876, 2.7 KB (checked in by mds, 13 years ago)

(mds) add i2c-ali1535 driver from RocketLogix?.

  • 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 := kernel/busses
22KERNELBUSSESDIR := $(MODULE_DIR)
23
24# Regrettably, even 'simply expanded variables' will not put their currently
25# defined value verbatim into the command-list of rules...
26KERNELBUSSESTARGETS := $(MODULE_DIR)/i2c-i801.o \
27                       $(MODULE_DIR)/i2c-viapro.o \
28                       $(MODULE_DIR)/i2c-voodoo3.o \
29                       $(MODULE_DIR)/i2c-amd756.o \
30                       $(MODULE_DIR)/i2c-i810.o \
31                       $(MODULE_DIR)/i2c-ali1535.o \
32                       $(MODULE_DIR)/i2c-sis5595.o
33ifneq ($(shell if grep -q '^CONFIG_I2C_ALI15X3=y' $(LINUX)/.config; then echo 1; fi),1)
34KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-ali15x3.o
35endif
36ifneq ($(shell if grep -q '^CONFIG_I2C_HYDRA=y' $(LINUX)/.config; then echo 1; fi),1)
37KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-hydra.o
38endif
39ifneq ($(shell if grep -q '^CONFIG_I2C_ISA=y' $(LINUX)/.config; then echo 1; fi),1)
40KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-isa.o
41endif
42ifneq ($(shell if grep -q '^CONFIG_I2C_PIIX4=y' $(LINUX)/.config; then echo 1; fi),1)
43KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-piix4.o
44endif
45ifneq ($(shell if grep -q '^CONFIG_I2C_VIA=y' $(LINUX)/.config; then echo 1; fi),1)
46KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-via.o
47endif
48
49# Include all dependency files
50INCLUDEFILES += $(KERNELBUSSESTARGETS:.o=.d)
51
52all-kernel-busses: $(KERNELBUSSESTARGETS)
53all :: all-kernel-busses
54
55install-kernel-busses: all-kernel-busses
56        if [ -n "$(KERNELBUSSESTARGETS)" ] ; then \
57          $(MKDIR) $(DESTDIR)$(MODDIR) ; \
58          $(INSTALL) -o root -g root -m 644 $(KERNELBUSSESTARGETS) $(DESTDIR)$(MODDIR) ; \
59        fi
60
61install :: install-kernel-busses
62
63clean-kernel-busses:
64        $(RM) $(KERNELBUSSESDIR)/*.o $(KERNELBUSSESDIR)/*.d
65clean :: clean-kernel-busses
Note: See TracBrowser for help on using the browser.