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.4 by cebix, 2001-03-28T14:18:54Z 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
23 < CPPFLAGS = -I. -I/usr/src/linux/include
6 < CFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE -DLINUX
22 > CPPFLAGS = -I. -I$(KERNEL_SOURCE)/include
23 > CFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES
24   ASFLAGS =
25   LDFLAGS =
26   LIBS =
# Line 15 | Line 32 | OBJS = sheep_net.o
32   sheep_net.o: sheep_net.c
33          $(CC) -c $(CPPFLAGS) $(CFLAGS) sheep_net.c
34  
18 dev:
19        mknod /dev/sheep_net c 10 198
20
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