ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/Linux/NetDriver/Makefile
Revision: 1.10
Committed: 2010-04-08T03:58:26Z (14 years, 7 months ago) by asvitkine
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +4 -2 lines
Log Message:
[Howard Spoelstra and Joel Mauras]
Patches to update Linux NetDriver to work with newer kernel versions.

File Contents

# Content
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 KERNEL_DRIVER = $(KERNEL_DIR)/kernel/drivers
11 obj-m = sheep_net.o
12
13 sheep_net.ko: sheep_net.c
14 $(MAKE) -C $(KERNEL_SOURCE) M=$$PWD modules
15
16 clean:
17 $(MAKE) -C $(KERNEL_SOURCE) M=$$PWD clean
18
19 else
20 # Kernel 2.4
21
22 ## System specific configuration
23 CPPFLAGS = -I. -I$(KERNEL_SOURCE)/include
24 CFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES
25 ASFLAGS =
26 LDFLAGS =
27 LIBS =
28
29 ## Files
30 KERNEL_DRIVER = $(KERNEL_DIR)
31 OBJS = sheep_net.o
32
33 ## Rules
34 sheep_net.o: sheep_net.c
35 $(CC) -c $(CPPFLAGS) $(CFLAGS) sheep_net.c
36
37 clean:
38 -rm $(OBJS)
39
40 dep depend:
41 makedepend $(CPPFLAGS) -Y *.c
42
43 endif
44
45 dev:
46 mknod /dev/sheep_net c 10 198
47
48 install: sheep_net.$(MP)
49 install -d $(KERNEL_DRIVER)/misc
50 install -m 644 sheep_net.$(MP) $(KERNEL_DRIVER)/misc
51 depmod -a
52
53 # DO NOT DELETE