root/i2c/trunk/kernel/Makefile @ 3527

Revision 3527, 1.2 KB (checked in by mds, 12 years ago)

Copy sensors.c and sensors.h from the lm_sensors package and

name them i2c-proc.c and i2c-proc.h.
Add DEVICEID's from sensors.h to i2c-id.h.
Add #defines from i2c-isa.h in lm_sensors to i2c.h.
Update mkpatch for i2c-proc.[ch].

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#################################################
2# config
3KERNEL_LOCATION=/usr/src/linux
4CURRENT=$(shell uname -r)
5I2CINCLUDES := i2c.h i2c-dev.h i2c-algo-bit.h i2c-algo-pcf.h \
6               i2c-elektor.h i2c-pcf8584.h i2c-id.h i2c-proc.h
7I2CKERNELDIR := /usr/include/linux
8I2CMODDIR := /lib/modules/$(CURRENT)/misc
9
10#################################################
11# some magic for using linux kernel settings
12# when compiling module(s)
13
14MOD_SUB_DIRS =
15MX_OBJS       = i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o i2c-proc.o
16
17M_OBJS      = i2c-dev.o i2c-philips-par.o i2c-elv.o i2c-velleman.o i2c-elektor.o
18EXTRA_CFLAGS = -Wno-unused
19
20
21here:
22        DIR=`pwd`; (cd $(KERNEL_LOCATION); make SUBDIRS=$$DIR modules)
23
24install:
25        su -c "cp -v $(M_OBJS) $(MX_OBJS) $(I2CMODDIR)"
26        su -c "cp -v $(I2CINCLUDES) $(I2CKERNELDIR)"
27
28clean:
29        -rm -f $(M_OBJS) $(MX_OBJS) .*.o.flags *~ $(M_OBJS:.o=.d) \
30               $(MX_OBJS:.o=.d)
31
32up:
33        insmod i2c-core.o i2c_debug=0
34        insmod algo-bit.o bit_test=i2c_debug=1
35        insmod bit-lp.o base=0x278
36        insmod i2c-dev.o
37        insmod i2c-proc.o
38
39down:
40        -rmmod i2c-proc.o
41        -rmmod i2c-dev
42        -rmmod bit-lp
43        -rmmod algo-bit
44        -rmmod i2c-core
45
46include $(KERNEL_LOCATION)/Rules.make
Note: See TracBrowser for help on using the browser.