Added CONFIG_MODVERSIONS magic

The i2c modules now compile and insert without any problem. If I only had
a VIA mainboard...


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@6 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard committed 1998-11-03 02:05:49 +00:00
1 parent f90c552823
commit 9cb654d2b4
2 files changed
+13 -3

No files matched your search

+12 -2
View File
@@ -1,7 +1,13 @@
# Uncomment the second line on SMP systems if the magic invocation fails.
# Uncomment the third line on SMP systems if the magic invocation fails.
SMP := $(shell if grep -q '^SMP[[:space:]]*=' /usr/src/linux/Makefile; then echo 1; else echo 0; fi)
#SMP := 0
#SMP := 1
SMP := $(shell if grep -q '^SMP[[:space:]]*=' /usr/src/linux/Makefile; then echo 1; else echo 0; fi)
# Uncomment the second or third line if the magic invocation fails.
# We need to know whether CONFIG_MODVERSIONS is defined.
MODVER := $(shell if cat /usr/include/linux/config.h /usr/include/linux/autoconf.h 2>/dev/null | grep -q '^[[:space:]]*\#define[[:space:]]*CONFIG_MODVERSIONS[[:space:]]*1'; then echo 1; else echo 0; fi)
#MODVER := 0
#MODVER := 1
# Uncomment the second line if you do not want to compile the included
# i2c modules. WARNING! If the i2c module version does not match the
@@ -60,6 +66,10 @@ CFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
-Wcast-align -Wwrite-strings -Wnested-externs -Winline
endif
ifeq ($(MODVER),1)
CFLAGS += -DMODVERSIONS -include /usr/include/linux/modversions.h
endif
.PHONY: all clean install version package
# Make all the default rule
+1 -1
View File
@@ -14,7 +14,7 @@ all :: $(TARGETS)
install :: $(TARGETS)
$(MKDIR) $(MODDIR)
install -o root -g root -m 644 $(MODDIR) $(TARGETS)
install -o root -g root -m 644 $(TARGETS) $(MODDIR)
clean ::
$(RM) $(TARGETS) $(TARGETS:.o=.d)