]> git.pld-linux.org Git - packages/atmelwlandriver.git/blame - atmelwlandriver-makefile.patch
- minor fixes in lvnet's makefile.
[packages/atmelwlandriver.git] / atmelwlandriver-makefile.patch
CommitLineData
ab43d4dc
PS
1diff -uNr atmelwlandriver.orig/Makefile.kernelv2.6 atmelwlandriver/Makefile.kernelv2.6
2--- atmelwlandriver.orig/Makefile.kernelv2.6 2004-06-05 06:11:18.000000000 +0200
3+++ atmelwlandriver/Makefile.kernelv2.6 2004-07-19 10:45:29.000000000 +0200
4@@ -4,15 +4,13 @@
5 SCRIPTSDIR=$(TOPDIR)/scripts
6 INC=$(TOPDIR)/src/includes
7 VERSION=3.3.5.6
8-MINOR_NUMBER=$(shell uname -r | cut -d . -f 3 | cut -d - -f 1)
9 ID:=$(shell id -u)
10 tmpDIR:=/tmp/atm$(shell date +%S.%s)
11 tmpDES:=$(tmpDIR)/atmelwlandriver
12 LVNET = $(shell pwd)/src/apps/cmd_line
13 WINTER = $(shell pwd)/src/apps/winter
a486aa77 14
ab43d4dc
PS
15-KERNEL_VERSION:=$(shell uname -r)
16-KERNEL_SOURCE:=/usr/src/linux-$(KERNEL_VERSION)
17+KERNEL_SOURCE:=/usr/src/linux
18 PCMCIA_DES = /lib/modules/$(KERNEL_VERSION)/pcmcia
19 PCI_DES = /lib/modules/$(KERNEL_VERSION)/kernel/drivers/net
20 USB_DES = /lib/modules/$(KERNEL_VERSION)/kernel/drivers/usb
21@@ -99,34 +97,15 @@
22 $(all_targets): %:
23 @echo Building $@
24 @if [ ! -d $(OBJDIR)/$@ ]; then echo Bootstraping target $@; mkdir $(OBJDIR)/$@; fi
25- @if [ ! -d $(OBJDIR)/$@/debug ]; then \
26- mkdir $(OBJDIR)/$@/debug; \
27- for f in $(srcs); do (cd $(OBJDIR)/$@/debug; ln -s $(SUBDIRS)/$$f .); done \
28- fi
29 @if [ ! -d $(OBJDIR)/$@/release ]; then \
30 mkdir $(OBJDIR)/$@/release; \
31 for f in $(srcs); do (cd $(OBJDIR)/$@/release; ln -s $(SUBDIRS)/$$f .); done \
32 fi
33- @echo -e "\tDebug"
34- @if [ "$(buildonly)" == debug ] || [ "$(buildonly)" == "" ]; then \
35- echo obj-m=$@.o > $(OBJDIR)/$@/debug/Makefile; \
36- echo all: >> $(OBJDIR)/$@/debug/Makefile; \
37- if [ "$(MINOR_NUMBER)" -gt "5" ]; then \
38- echo -e $(debug_submake_new) >> $(OBJDIR)/$@/debug/Makefile; \
39- else \
40- echo -e $(debug_submake_old) >> $(OBJDIR)/$@/debug/Makefile; \
41- fi;\
42- (cd $(OBJDIR)/$@/debug; make) ; \
43- fi
44 @echo -e "\tRelease"
45 @if [ "$(buildonly)" == release ] || [ "$(buildonly)" == "" ]; then \
46 echo obj-m=$@.o > $(OBJDIR)/$@/release/Makefile; \
47 echo all: >> $(OBJDIR)/$@/release/Makefile; \
48- if [ "$(MINOR_NUMBER)" -gt "5" ]; then \
49- echo -e $(release_submake_new) >> $(OBJDIR)/$@/release/Makefile; \
50- else \
51- echo -e $(release_submake_old) >> $(OBJDIR)/$@/release/Makefile; \
52- fi;\
53+ echo -e $(release_submake_new) >> $(OBJDIR)/$@/release/Makefile; \
54 (cd $(OBJDIR)/$@/release; make) ; \
55 fi
a486aa77 56
ab43d4dc
PS
57diff -uNr atmelwlandriver.orig/src/Pcmcia_Pci/Makefile atmelwlandriver/src/Pcmcia_Pci/Makefile
58--- atmelwlandriver.orig/src/Pcmcia_Pci/Makefile 2004-06-05 06:11:18.000000000 +0200
59+++ atmelwlandriver/src/Pcmcia_Pci/Makefile 2004-07-19 10:54:28.066481184 +0200
60@@ -5,28 +5,15 @@
61 include .lastbuild
a486aa77 62 endif
a486aa77 63
ab43d4dc
PS
64-VR:=$(shell uname -r)
65-ID:=$(shell id -u)
a486aa77 66-ifneq ($(VR),$(UNAME))
67-this:
ab43d4dc 68-# @echo -ne "\\033[1;31m"
a486aa77 69- @echo -ne "Running kernel doesn't match with the source"
ab43d4dc 70-# @echo -ne "\\033[0;39m"
a486aa77 71- @echo
72-endif
ab43d4dc 73-
a486aa77 74 # Add extra compilation flags if under version 2.5 or higher
75 NEWKERNFLAGS := -D__KERNEL__ -nostdinc -iwithprefix include -DMODULE -DKBUILD_BASENAME=fastvnet_cs
ab43d4dc
PS
76-MODOFLAGS := -I$(KERNEL_SRC)/include -D__KERNEL__ -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -DMODULE
77 KMODNAMEFLAG := -DKBUILD_MODNAME=
78
79
80-CC:=gcc
81 CDEBUG:= -DPCMCIA_DEBUG=1
82-DEFS := -pipe -O2 -fomit-frame-pointer -fno-strict-aliasing
a486aa77 83
84 CFLAGS_$(CONFIG_MODVERSIONS):= -DMODULE -DMODVERSIONS -include $(KERNEL_SRC)/include/linux/modversions.h
85-CFLAGS := -DLINUX_OS -D__KERNEL__ $(DEFS) -I$(KERNEL_SRC)/include -I$(INC) -I$(INC)/pcmcia $(CFLAGS_y)
a486aa77 86+CFLAGS := $(KCFLAGS) -I$(INC) -I$(INC)/pcmcia $(CFLAGS_y)
87 PCMCIAADDONFLAGS := -I$(PCMCIA_SRC)/include
88 srcs := card.c command.c fastvnet_cs.c interrupt.c mgmt.c rx.c tx.c vnet.c vnetlinux.c
89 pcisrcs := $(patsubst fastvnet_cs.c, fastvnet_cs.c ,$(srcs))
ab43d4dc
PS
90@@ -75,7 +62,7 @@
91 ld -r -o $(OBJDIR)/$(MODULE).o fastvnet_cs.o $(DEBUGORNO) $(objs)
92 nm $(OBJDIR)/$(MODULE).o |sort -u >$(OBJDIR)/$(patsubst %.o,%.map,$(MODULE).o);
93 ifeq '$(NEW_KERN)' 'y'
94- $(CC) $(MODOFLAGS) -c -o $(OBJDIR)/$(MAGICMOD).o $(MAGICMOD).c
95+ $(CC) $(KCFLAGS) -c -o $(OBJDIR)/$(MAGICMOD).o $(MAGICMOD).c
96 ld -r -o $(OBJDIR)/$(MODULE).ko $(OBJDIR)/$(MODULE).o $(OBJDIR)/$(MAGICMOD).o
97 endif
98
99diff -uNr atmelwlandriver.orig/src/usb/Makefile atmelwlandriver/src/usb/Makefile
100--- atmelwlandriver.orig/src/usb/Makefile 2004-06-05 06:11:18.000000000 +0200
101+++ atmelwlandriver/src/usb/Makefile 2004-07-19 10:54:28.067481032 +0200
102@@ -3,28 +3,16 @@
103
104 MODULE := usbvnet.o
105 CDEBUG := -DUSBDBG
106-DEFS := -fno-strict-aliasing -fomit-frame-pointer -pipe
a486aa77 107 USB_DES := $(MODULES_DES)/kernel/drivers/net
ab43d4dc 108-CC=gcc
a486aa77 109 CFLAGS_$(CONFIG_MODVERSIONS):= -DMODULE -DMODVERSIONS -include $(KERNEL_SRC)/include/linux/modversions.h
ab43d4dc
PS
110-ifeq '$(NEW_KERN)' 'y'
111-CFLAGS :=-D__KERNEL__ -O2 $(DEFS) -I$(KERNEL_SRC)/drivers/usb/core -I$(KERNEL_SRC)/include -I$(INC) -I$(INC)/usb -Wall $(CFLAGS_y)
112-else
a486aa77 113-CFLAGS :=-D__KERNEL__ -O2 $(DEFS) -I$(KERNEL_SRC)/include -I$(INC) -I$(INC)/usb -Wall $(CFLAGS_y)
ab43d4dc
PS
114-endif
115+CFLAGS :=$(KCFLAGS) -I$(KERNEL_SRC)/drivers/usb/core -I$(INC) -I$(INC)/usb $(CFLAGS_y)
116 # Add extra compilation flags if under version 2.5 or higher
117 NEWKERNFLAGS := -nostdinc -iwithprefix include -DMODULE -DKBUILD_BASENAME=vnetusba
118-MODOFLAGS := -I$(KERNEL_SRC)/include -D__KERNEL__ -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -Iinclude/asm-i386/mach-default -DMODULE
119 KMODNAMEFLAG := -DKBUILD_MODNAME=
120 MAGICMOD:= magic.mod
121
122-ifeq '$(NEW_KERN)' 'y'
123 RESET_DEVICE:= reset_device.c
124 MAGIC_MOD:= magic.mod.c
125-else
126-RESET_DEVICE:=
127-MAGIC_MOD:=
128-endif
a486aa77 129
130 fws:=$(wildcard external*.h) $(wildcard internal*.h)
131
ab43d4dc
PS
132@@ -52,7 +40,7 @@
133
134 final:$(objs) vnetusba.o
135 ifeq '$(NEW_KERN)' 'y'
136- $(CC) $(MODOFLAGS) -c -o $(OBJDIR)/$(MAGICMOD).o $(MAGICMOD).c
137+ $(CC) $(KCFLAGS) -c -o $(OBJDIR)/$(MAGICMOD).o $(MAGICMOD).c
138 ld -m elf_i386 -r -o $(OBJDIR)/$(MODULE).ko vnetusba.o $(objs) $(OBJDIR)/$(MAGICMOD).o
139 @nm $(OBJDIR)/$(MODULE).ko |sort >../$(patsubst %.ko,%.map, $(MODULE).ko);
140 else
965c43c1
PS
141diff -uNr atmelwlandriver.orig/src/apps/cmd_line/Makefile atmelwlandriver/src/apps/cmd_line/Makefile
142--- atmelwlandriver.orig/src/apps/cmd_line/Makefile 2004-06-05 06:11:18.000000000 +0200
143+++ atmelwlandriver/src/apps/cmd_line/Makefile 2004-07-19 11:11:02.173353968 +0200
144@@ -1,22 +1,8 @@
145-KERNEL_VERSION_NUMBER=$(shell uname -r | cut -d . -f 2)
146-
147-ifeq '$(KERNEL_VERSION_NUMBER)' '4'
148-include $(TOPDIR)/.config
149-endif
150-
151 OBJs=../../../objs
152-FLAGS1:=-DATMEL_WLAN -DATMEL -O2 -g
153+FLAGS1:=-DATMEL_WLAN -DATMEL $(OPT)
154 FLAGS2:=-lncurses
155-FLAGS3:=-DLOW_RES
156-CC:=gcc
157
158-ifeq '$(KERNEL_VERSION_NUMBER)' '4'
159-all:
160- $(CC) $(FLAGS1) -I$(INC) -o lvnet $(FLAGS2) cofvnet.c sets.c survey.c
161- @install -m 755 lvnet $(OBJs)/
162-else
163 INC = ../../includes
164 all:
165 $(CC) $(FLAGS1) -I$(INC) -o lvnet $(FLAGS2) cofvnet.c sets.c survey.c
166 @install -m 755 lvnet $(OBJs)/
167-endif
This page took 0.154053 seconds and 4 git commands to generate.