ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/Linux/NetDriver/Makefile
(Generate patch)

Comparing BasiliskII/src/Unix/Linux/NetDriver/Makefile (file contents):
Revision 1.8 by cebix, 2003-11-28T15:49:16Z vs.
Revision 1.9 by gbeauche, 2004-12-19T15:55:31Z

# Line 1 | Line 1
1   # Linux makefile for sheep_net driver
2 + KERNEL_DIR      = /lib/modules/$(shell uname -r)
3 + KERNEL_SOURCE   = $(KERNEL_DIR)/build
4 + LV              := $(shell test -f $(KERNEL_SOURCE)/Rules.make && echo 24 || echo 26)
5 + MP              := $(shell test -f $(KERNEL_SOURCE)/Rules.make && echo "o" || echo "ko")
6 +
7 + ifeq ($(LV),26)
8 + # Kernel 2.6
9 +
10 + obj-m = sheep_net.o
11 +
12 + sheep_net.ko: sheep_net.c
13 +        $(MAKE) -C $(KERNEL_SOURCE) M=$$PWD modules
14 +
15 + clean:
16 +        $(MAKE) -C $(KERNEL_SOURCE) M=$$PWD clean
17 +
18 + else
19 + # Kernel 2.4
20  
21   ## System specific configuration
22 < CC = cc
5 < CPPFLAGS = -I. -I/usr/src/linux/include
22 > CPPFLAGS = -I. -I$(KERNEL_SOURCE)/include
23   CFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES
24   ASFLAGS =
25   LDFLAGS =
26   LIBS =
10 KERNDIR = /lib/modules/$(shell uname -r)
27  
28   ## Files
29   OBJS = sheep_net.o
# Line 16 | Line 32 | OBJS = sheep_net.o
32   sheep_net.o: sheep_net.c
33          $(CC) -c $(CPPFLAGS) $(CFLAGS) sheep_net.c
34  
19 dev:
20        mknod /dev/sheep_net c 10 198
21
22 install: sheep_net.o
23        install -d $(KERNDIR)/misc
24        install -m 644 sheep_net.o $(KERNDIR)/misc
25        depmod -a
26
35   clean:
36          -rm $(OBJS)
37  
38   dep depend:
39          makedepend $(CPPFLAGS) -Y *.c
40  
41 + endif
42 +
43 + dev:
44 +        mknod /dev/sheep_net c 10 198
45 +
46 + install: sheep_net.$(MP)
47 +        install -d $(KERNEL_DIR)/misc
48 +        install -m 644 sheep_net.$(MP) $(KERNEL_DIR)/misc
49 +        depmod -a
50 +
51   # DO NOT DELETE

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines