]> git.pld-linux.org Git - packages/atmelwlandriver.git/blame - atmelwlandriver-makefile.patch
- updated to 3.4.1.0
[packages/atmelwlandriver.git] / atmelwlandriver-makefile.patch
CommitLineData
c1a44808 1diff -urN atmelwlandriver.orig/Makefile.kernelv2.6 atmelwlandriver/Makefile.kernelv2.6
2--- atmelwlandriver.orig/Makefile.kernelv2.6 2004-12-05 14:16:10.000000000 +0100
3+++ atmelwlandriver/Makefile.kernelv2.6 2004-12-05 14:25:12.000000000 +0100
aae79fc2 4@@ -5,15 +5,13 @@
ab43d4dc
PS
5 SCRIPTSDIR=$(TOPDIR)/scripts
6 INC=$(TOPDIR)/src/includes
c1a44808 7 VERSION=3.4.1.0
ab43d4dc
PS
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 15-KERNEL_VERSION:=$(shell uname -r)
9012671a 16-KERNEL_SOURCE:=/lib/modules/$(KERNEL_VERSION)/build
ab43d4dc 17+KERNEL_SOURCE:=/usr/src/linux
aae79fc2
JK
18 PCMCIA_DES = $(DESTDIR)/lib/modules/$(KERNEL_VERSION)/pcmcia
19 PCI_DES = $(DESTDIR)/lib/modules/$(KERNEL_VERSION)/kernel/drivers/net
20 USB_DES = $(DESTDIR)/lib/modules/$(KERNEL_VERSION)/kernel/drivers/usb
c1a44808 21@@ -101,34 +99,15 @@
ab43d4dc
PS
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
c1a44808 57diff -urN atmelwlandriver.orig/src/apps/cmd_line/Makefile atmelwlandriver/src/apps/cmd_line/Makefile
58--- atmelwlandriver.orig/src/apps/cmd_line/Makefile 2004-12-05 14:16:10.000000000 +0100
59+++ atmelwlandriver/src/apps/cmd_line/Makefile 2004-12-05 14:56:25.000000000 +0100
60@@ -1,22 +1,9 @@
965c43c1
PS
61-KERNEL_VERSION_NUMBER=$(shell uname -r | cut -d . -f 2)
62-
63-ifeq '$(KERNEL_VERSION_NUMBER)' '4'
64-include $(TOPDIR)/.config
65-endif
c1a44808 66
965c43c1 67 OBJs=../../../objs
9012671a 68-FLAGS1:=-Wall -DATMEL_WLAN -DATMEL -O2 -g
c1a44808 69+FLAGS1 :=-Wall -DATMEL_WLAN -DATMEL $(OPT)
965c43c1
PS
70 FLAGS2:=-lncurses
71-FLAGS3:=-DLOW_RES
72-CC:=gcc
73
74-ifeq '$(KERNEL_VERSION_NUMBER)' '4'
75-all:
76- $(CC) $(FLAGS1) -I$(INC) -o lvnet $(FLAGS2) cofvnet.c sets.c survey.c
77- @install -m 755 lvnet $(OBJs)/
78-else
39e9fde0 79 INC = ../../includes
965c43c1 80 all:
29ba95bd
PS
81- $(CC) $(FLAGS1) -I$(INC) -o lvnet $(FLAGS2) cofvnet.c sets.c survey.c
82+ $(CC) $(FLAGS1) -I$(INC) -I/usr/include/ncurses -o lvnet $(FLAGS2) cofvnet.c sets.c survey.c
965c43c1
PS
83 @install -m 755 lvnet $(OBJs)/
84-endif
c1a44808 85diff -urN atmelwlandriver.orig/src/apps/fw-upgrade/Makefile atmelwlandriver/src/apps/fw-upgrade/Makefile
86--- atmelwlandriver.orig/src/apps/fw-upgrade/Makefile 2004-12-05 14:16:10.000000000 +0100
87+++ atmelwlandriver/src/apps/fw-upgrade/Makefile 2004-12-05 15:41:43.000000000 +0100
88@@ -3,11 +3,11 @@
89 #########################################
90
91
92-CC:=$(shell wx-config --cxx)
93+CC:=$(shell wxgtk2-2.4-config --cxx)
1b9d59b0 94 CCC:=gcc
c1a44808 95-CFLAGS:=$(shell wx-config --cxxflags)
96-CFLAGS1:=$(shell wx-config --libs)
1b9d59b0 97-CCFLAGS:= -O2 -Wall -Wstrict-prototypes
c1a44808 98+CFLAGS:=$(shell wxgtk2-2.4-config --cxxflags)
99+CFLAGS1:=$(shell wxgtk2-2.4-config --libs)
100+CCFLAGS:= $(OPT)
1b9d59b0
PS
101 OUTDIR:="/usr/local/bin"
102
103
c1a44808 104@@ -34,7 +34,7 @@
105 wxconfig:
106 @config_exists=no;\
107 for path_dir in `echo $(PATH) | tr : ' '`; do\
108- if test -f $$path_dir/wx-config; then\
109+ if test -f $$path_dir/wxgtk2-2.4-config; then\
110 config_exists=yes;\
111 fi\
112 done;\
113diff -urN atmelwlandriver.orig/src/apps/fw-upgrade/Makefile~ atmelwlandriver/src/apps/fw-upgrade/Makefile~
114--- atmelwlandriver.orig/src/apps/fw-upgrade/Makefile~ 1970-01-01 01:00:00.000000000 +0100
115+++ atmelwlandriver/src/apps/fw-upgrade/Makefile~ 2004-12-05 15:03:14.000000000 +0100
116@@ -0,0 +1,75 @@
117+#########################################
118+# Makefile of Fucd #
119+#########################################
120+
121+
122+CC:=$(shell wxgtk2-2.4-config -cxx)
123+CCC:=gcc
124+CFLAGS:=$(shell wxgtk2-2.4-config --cxxflags)
125+CFLAGS1:=$(shell wxgtk2-2.4-config --libs)
126+CCFLAGS:= $(OPT)
127+OUTDIR:="/usr/local/bin"
128+
129+
130+# All object files
131+COBJS:= atmelmain.o dfu.o
132+OBJS:= FucdApp.o FucdLayer.o dfu.o atmel.o
133+
134+usage:
135+ @echo -e "make clean\tRemove object files and executables"
136+ @echo -e "make fucd\tBuild X upgrade utility"
137+ @echo -e "make atmelup\tBuild command line upgrade utility"
138+ @echo -e "make all\tBuild both utilities"
139+
140+all: fucd atmelup
141+
142+fucd: wxconfig $(OBJS: .o=.c)
143+ @echo -e "Building fucd wxWidgets application..."
144+ $(CC) -o fucd $(OBJS) $(CFLAGS1) -lusb
145+
146+atmelup: $(COBJS)
147+ @echo -e "Building atmelup command-line tool..."
148+ $(CCC) $(CCFLAGS) $(COBJS) -lusb -o $@
149+
150+wxconfig:
151+ @config_exists=no;\
152+ for path_dir in `echo $(PATH) | tr : ' '`; do\
153+ if test -f $$path_dir/wxgtk2-2.4-config; then\
154+ config_exists=yes;\
155+ fi\
156+ done;\
157+ if test $$config_exists = 'no'; then\
158+ echo 'It seems that the wxWindows library is not installed.';\
159+ echo 'wx-config, the script providing information about wxWindows';\
160+ echo 'installation, is missing. Please, refer to the README.linux';\
161+ echo 'or visit www.wxwindows.org for further information.';\
162+ echo 'We are sorry about the inconvenience.';\
163+ exit -1;\
164+ fi
165+
166+FucdApp.o: FucdApp.cpp FucdApp.h
167+ $(CC) $(CFLAGS) -c $<
168+
169+FucdLayer.o: FucdLayer.cpp FucdLayer.h
170+ $(CC) $(CFLAGS) -c $<
171+
172+atmel.o: atmel.c
173+ $(CCC) $(CCFLAGS) -c $<
174+
175+dfu.o: dfu.c dfu.h
176+ $(CCC) $(CCFLAGS) -c $<
177+
178+atmelmain.o: atmel.c
179+ $(CCC) $(CCFLAGS) -DCONSOLE_APP -c $< -o $@
180+
181+clean:
182+ @echo -e "Removing all objects and executables..."
183+ @find . -name '*.o' | xargs rm -f *.o
184+ @rm -f fucd atmelup
185+
186+
187+install:
188+ @echo -e "Installing fucd to $(OUTDIR)"
189+ @if [ -e fucd ]; then install -m 755 fucd $(OUTDIR) ; fi
190+ @echo -e "Installing atmelup to $(OUTDIR)"
191+ @if [ -e atmelup ]; then install -m 755 atmelup $(OUTDIR) ; fi
192diff -urN atmelwlandriver.orig/src/Pcmcia_Pci/Makefile atmelwlandriver/src/Pcmcia_Pci/Makefile
193--- atmelwlandriver.orig/src/Pcmcia_Pci/Makefile 2004-12-05 14:16:10.000000000 +0100
194+++ atmelwlandriver/src/Pcmcia_Pci/Makefile 2004-12-05 14:27:35.000000000 +0100
195@@ -5,22 +5,7 @@
196 include .lastbuild
197 endif
198
199-ARCH=$(shell uname -m)
200-VR:=$(shell uname -r)
201-ID:=$(shell id -u)
202-ifneq ($(VR),$(UNAME))
203-this:
204-# @echo -ne "\\033[1;31m"
205- @echo -ne "Running kernel doesn't match with the source"
206-# @echo -ne "\\033[0;39m"
207- @echo
208-endif
209-
210-CC:=gcc
211-CDEBUG:= -DPCMCIA_DEBUG=1
212-DEFS := -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=$(ARCH)
213-CFLAGS_$(CONFIG_MODVERSIONS):= -DMODULE -DMODVERSIONS -include $(KERNEL_SRC)/include/linux/modversions.h
214-CFLAGS := -DLINUX_OS -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -O2 $(DEFS) -I$(KERNEL_SRC)/include -I$(INC) -I$(INC)/pcmcia $(CFLAGS_y)
215+CFLAGS += -I$(INC) -I$(INC)/pcmcia $(CFLAGS_y)
216 PCMCIAADDONFLAGS := -I$(PCMCIA_SRC)/include
217 srcs := card.c command.c common.c fastvnet_cs.c interrupt.c mgmt.c rx.c tx.c vnet.c vnetlinux.c
218 pcisrcs := $(patsubst fastvnet_cs.c, fastvnet_cs.c ,$(srcs))
219diff -urN atmelwlandriver.orig/src/usb/Makefile atmelwlandriver/src/usb/Makefile
220--- atmelwlandriver.orig/src/usb/Makefile 2004-12-05 14:16:10.000000000 +0100
221+++ atmelwlandriver/src/usb/Makefile 2004-12-05 14:29:51.000000000 +0100
222@@ -1,14 +1,9 @@
aae79fc2
JK
223 include .lastbuild
224 include $(TOPDIR)/.config
225-ARCH=$(shell uname -m)
226 MODULE := usbvnet.o
227-CDEBUG := -DUSBDBG
c1a44808 228-DEFS := -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=$(ARCH)
229 #conflicted with gcc's < 2.96: -fno-optimize-sibling-calls
aae79fc2
JK
230 USB_DES := $(MODULES_DES)/kernel/drivers/net
231-CC=gcc
232-CFLAGS_$(CONFIG_MODVERSIONS):= -DMODULE -DMODVERSIONS -include $(KERNEL_SRC)/include/linux/modversions.h
233-CFLAGS :=-D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -O2 $(DEFS) -I$(KERNEL_SRC)/include -I$(INC) -I$(INC)/usb
c1a44808 234+CFLAGS += -I$(KERNEL_SRC)/drivers/usr/core -I$(INC) -I$(INC)/usb
aae79fc2
JK
235
236 $(CFLAGS_y)
237 # Add extra compilation flags if under version 2.5 or higher
This page took 0.07863 seconds and 4 git commands to generate.