From 38028e5b415106c1d86e59ecb66a009fd87d66f2 Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 13 Mar 2000 21:33:26 +0000 Subject: [PATCH] Fixed some more bugs in the architecture detection and handling in the Configure script and the makefiles. --- Configure | 4 ++-- config.in | 1 + src/mkmeta/Makefile | 10 ++++++++-- src/nwepgen/Makefile | 11 +++++++++-- src/prism2/download/Makefile | 16 +++++++++++----- src/wlanctl/Makefile | 10 ++++++++-- src/wland/Makefile | 11 +++++++++-- 7 files changed, 48 insertions(+), 15 deletions(-) diff --git a/Configure b/Configure index b17cff2..27b990f 100755 --- a/Configure +++ b/Configure @@ -258,8 +258,8 @@ echo "" #======================================================================= # Make sure our target architecture is the same as our build architecture. -TARGET_ARCH=$BUILD_ARCH -ask_str "Target Architecture?(only change if cross-compiling)" TARGET_ARCH +WLAN_TARGET_ARCH=$BUILD_ARCH +ask_str "Target Architecture?(only change if cross-compiling)" WLAN_TARGET_ARCH #======================================================================= diff --git a/config.in b/config.in index a81ba2d..c14e5b3 100644 --- a/config.in +++ b/config.in @@ -8,3 +8,4 @@ RC_DIR=/etc/rc.d PCMCIA_DIR=/etc/pcmcia SYSV_INIT=y INSTALL_DEPMOD=y +WLAN_TARGET_ARCH=y diff --git a/src/mkmeta/Makefile b/src/mkmeta/Makefile index 6c1b582..3f3b1f5 100644 --- a/src/mkmeta/Makefile +++ b/src/mkmeta/Makefile @@ -58,13 +58,19 @@ ifndef CFLAGS CFLAGS = -g -O2 -Wall -Wstrict-prototypes -Winline -pipe endif -# Preprocessor Options -ifeq ($(PPC), n) +# Preprocessor Options (we have some arch/distro dependencies) +ifeq ($(WLAN_TARGET_ARCH), i386) CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -D__I386__ else +ifeq ($(WLAN_TARGET_ARCH), ppc) CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -D__WLAN_PPC__ +else +# this will probably generate an error. New arch's need to be added explicitly +CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ + -D__LINUX_WLAN__ +endif endif # Source and obj and target definitions diff --git a/src/nwepgen/Makefile b/src/nwepgen/Makefile index 2feef21..380386d 100644 --- a/src/nwepgen/Makefile +++ b/src/nwepgen/Makefile @@ -47,14 +47,21 @@ ifndef CFLAGS CFLAGS = -O2 -Wall -Wstrict-prototypes -Winline -pipe endif -# Preprocessor Options -ifeq ($(PPC), n) +# Preprocessor Options (we have some arch/distro dependencies) +ifeq ($(WLAN_TARGET_ARCH), i386) CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -D__I386__ else +ifeq ($(WLAN_TARGET_ARCH), ppc) CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -D__WLAN_PPC__ +else +# this will probably generate an error. New arch's need to be added explicitly +CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ + -D__LINUX_WLAN__ endif +endif + nwepgen: nwepgen.o cc -o nwepgen nwepgen.o diff --git a/src/prism2/download/Makefile b/src/prism2/download/Makefile index 074f850..5a8c1bf 100644 --- a/src/prism2/download/Makefile +++ b/src/prism2/download/Makefile @@ -47,13 +47,19 @@ ifndef CFLAGS CFLAGS = -g -O2 -Wall -Wstrict-prototypes -Winline -pipe endif -# Preprocessor Options -ifeq ($(PPC), n) -CPPFLAGS = -I../../include -I../include \ +# Preprocessor Options (we have some arch/distro dependencies) +ifeq ($(WLAN_TARGET_ARCH), i386) +CPPFLAGS= -I../../include -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -D__I386__ -else -CPPFLAGS = -I../../include -I../include \ +else +ifeq ($(WLAN_TARGET_ARCH), ppc) +CPPFLAGS= -I../../include -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -D__WLAN_PPC__ +else +# this will probably generate an error. New arch's need to be added explicitly +CPPFLAGS= -I../../include -I$(LINUX_SRC)/include \ + -D__LINUX_WLAN__ +endif endif SRCS = prism2dl.c diff --git a/src/wlanctl/Makefile b/src/wlanctl/Makefile index 76f3ea8..8498b71 100644 --- a/src/wlanctl/Makefile +++ b/src/wlanctl/Makefile @@ -50,13 +50,19 @@ ifndef CFLAGS CFLAGS = -O2 -Wall -Wstrict-prototypes -Winline -pipe endif -# Preprocessor Options -ifeq ($(PPC), n) +# Preprocessor Options (we have some arch/distro dependencies) +ifeq ($(WLAN_TARGET_ARCH), i386) CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -D__I386__ else +ifeq ($(WLAN_TARGET_ARCH), ppc) CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -D__WLAN_PPC__ +else +# this will probably generate an error. New arch's need to be added explicitly +CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ + -D__LINUX_WLAN__ +endif endif diff --git a/src/wland/Makefile b/src/wland/Makefile index 49a2f3c..d3fe31c 100644 --- a/src/wland/Makefile +++ b/src/wland/Makefile @@ -50,14 +50,21 @@ ifndef CFLAGS CFLAGS = -O2 -Wall -Wstrict-prototypes -Winline -pipe endif -# Preprocessor Options -ifeq ($(PPC), n) +# Preprocessor Options (we have some arch/distro dependencies) +ifeq ($(WLAN_TARGET_ARCH), i386) CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -D__I386__ else +ifeq ($(WLAN_TARGET_ARCH), ppc) CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -D__WLAN_PPC__ +else +# this will probably generate an error. New arch's need to be added explicitly +CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ + -D__LINUX_WLAN__ endif +endif + SRCS = wland.c \ ../shared/p80211types.c \