Build system cleanups. I hope it still works on 2.4. :)
This commit is contained in:
parent
b505920508
commit
ad17de2827
1
CHANGES
1
CHANGES
|
@ -41,6 +41,7 @@
|
|||
* Intersil Corporation as part of PRISM(R) chipset product development.
|
||||
*
|
||||
* --------------------------------------------------------------------
|
||||
- Cleanups in the Makefiles and build system
|
||||
- Fix a typo in the shared.prism2 script (Chris Rankin)
|
||||
- Clean up build warmings with gcc 3.3 (and possibly older too)
|
||||
- Fix a nice race condition on device registration.
|
||||
|
|
|
@ -412,7 +412,7 @@ fi
|
|||
|
||||
MODDIR=/lib/modules/$SRC_RELEASE
|
||||
ask_str " Module install directory" MODDIR
|
||||
TARGET_MODDIR=$TARGET_ROOT_ON_HOST$MODDIR
|
||||
TARGET_MODDIR=$TARGET_ROOT_ON_HOST$MODDIR/linux-wlan-ng
|
||||
write_str TARGET_MODDIR
|
||||
$ECHO ""
|
||||
|
||||
|
@ -531,6 +531,8 @@ $ECHO ""
|
|||
FIRMWARE_DIR="/etc/wlan/"
|
||||
write_str FIRMWARE_DIR
|
||||
|
||||
WLAN_SRC=`pwd`/src/
|
||||
write_str WLAN_SRC
|
||||
|
||||
mv $CONFIG config.out
|
||||
|
||||
|
|
|
@ -55,10 +55,10 @@ ALL_DIRS+=`cat *.addon`
|
|||
endif
|
||||
|
||||
all:
|
||||
set -e; for d in $(ALL_DIRS); do $(MAKE) -C $$d ; done
|
||||
set -e; for d in $(ALL_DIRS); do $(MAKE) WLAN_SRC=$(WLAN_SRC) -C $$d ; done
|
||||
|
||||
clean:
|
||||
set -e; for d in $(DIRS); do $(MAKE) -C $$d clean ; done
|
||||
set -e; for d in $(DIRS); do $(MAKE) WLAN_SRC=$(WLAN_SRC) -C $$d clean ; done
|
||||
rm -f core core.* *.o .*.o *.s *.a .depend tmp_make *~ tags
|
||||
set -e; for i in *_obj; do if [ -d $$i ]; then rm -fr $$i; fi; done
|
||||
rm -rf .tmp_versions
|
||||
|
|
|
@ -42,23 +42,15 @@
|
|||
#
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
include $(WLAN_SRC)../../config.mk
|
||||
include $(WLAN_SRC)/../config.mk
|
||||
|
||||
ifeq ($(WLAN_DEBUG), y)
|
||||
WLAN_INCLUDE_DEBUG=-DWLAN_INCLUDE_DEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NETLINK), y)
|
||||
WLAN_CS_CONFIG_SNIFF=-DCONFIG_NETLINK=1
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PACKET), y)
|
||||
WLAN_CS_CONFIG_SNIFF+=-DCONFIG_PACKET=1
|
||||
endif
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
EXTRA_CFLAGS += -I$(WLAN_SRC)/../include $(WLAN_INCLUDE_DEBUG) $(WLAN_CS_CONFIG_SNIFF)
|
||||
EXTRA_CFLAGS += -I$(WLAN_SRC)/include $(WLAN_INCLUDE_DEBUG)
|
||||
|
||||
ifeq ($(KERN_25), y)
|
||||
|
||||
|
@ -82,30 +74,28 @@ PWD := $(shell pwd)
|
|||
default:
|
||||
|
||||
ifeq ($(KERN_25), y)
|
||||
if test ! -d $(PWD)/../.tmp_versions; then \
|
||||
if test ! -d $(WLAN_SRC)/.tmp_versions; then \
|
||||
if test -d $(LINUX_SRC)/.tmp_versions; then \
|
||||
cp -rf $(LINUX_SRC)/.tmp_versions $(PWD)/../ ; \
|
||||
fi ; \
|
||||
fi
|
||||
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(PWD) WLAN_SRC=$(PWD)/ \
|
||||
MODVERDIR=$(PWD)/../.tmp_versions modules
|
||||
else # kbuild 2.4
|
||||
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(PWD) WLAN_SRC=$(PWD)/ \
|
||||
modules
|
||||
endif # kbuild switch
|
||||
|
||||
endif # KERNELRELEASE
|
||||
if test ! -e $(PWD)/Module.symvers ; then \
|
||||
cp $(LINUX_SRC)/Module.symvers $(PWD)/../ ; \
|
||||
fi
|
||||
$(MAKE) -C $(LINUX_SRC) M=$(PWD) WLAN_SRC=$(WLAN_SRC) MODVERDIR=$(WLAN_SRC)/.tmp_versions modules
|
||||
else
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(PWD) WLAN_SRC=$(WLAN_SRC) dep modules
|
||||
endif # KERN_25
|
||||
|
||||
clean:
|
||||
rm -f *.o *.ko .*.cmd *.mod.c *.flags .*.flags
|
||||
|
||||
install:
|
||||
mkdir -p $(TARGET_MODDIR)/linux-wlan-ng/net
|
||||
mkdir -p $(TARGET_MODDIR)
|
||||
ifeq ($(KERN_25), y)
|
||||
cp p80211.ko $(TARGET_MODDIR)/linux-wlan-ng
|
||||
cp *.ko $(TARGET_MODDIR)
|
||||
else
|
||||
cp p80211.o $(TARGET_MODDIR)/linux-wlan-ng
|
||||
cp p80211.o $(TARGET_MODDIR)
|
||||
endif
|
||||
|
||||
endif # KERNRELEASE
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
include $(WLAN_SRC)../../../config.mk
|
||||
include $(WLAN_SRC)/../config.mk
|
||||
|
||||
ifeq ($(WLAN_DEBUG), y)
|
||||
WLAN_INCLUDE_DEBUG=-DWLAN_INCLUDE_DEBUG
|
||||
|
@ -68,7 +68,7 @@ endif
|
|||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
EXTRA_CFLAGS += -I$(WLAN_SRC)/../../include -I$(WLAN_SRC)/../include $(WLAN_INCLUDE_DEBUG)
|
||||
EXTRA_CFLAGS += -I$(WLAN_SRC)/include -I$(WLAN_SRC)/prism2/include $(WLAN_INCLUDE_DEBUG)
|
||||
|
||||
ifeq ($(KERN_25), y)
|
||||
|
||||
|
@ -84,11 +84,11 @@ PWD := $(shell pwd)
|
|||
|
||||
default:
|
||||
ifeq ($(KERN_25), y)
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(PWD) WLAN_SRC=$(PWD)/ \
|
||||
MODVERDIR=$(PWD)/../.tmp_versions modules
|
||||
$(MAKE) -C $(LINUX_SRC) M=$(PWD) WLAN_SRC=$(WLAN_SRC) \
|
||||
MODVERDIR=$(WLAN_SRC)/.tmp_versions modules
|
||||
else # kbuild 2.4
|
||||
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(PWD) WLAN_SRC=$(PWD)/ \
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(PWD) WLAN_SRC=$(PWD) \
|
||||
modules
|
||||
|
||||
endif # kbuild switch
|
||||
|
@ -100,8 +100,8 @@ clean:
|
|||
|
||||
install:
|
||||
ifeq ($(KERN_25), y)
|
||||
cp $(obj-m:.o=.ko) $(TARGET_MODDIR)/linux-wlan-ng
|
||||
cp $(obj-m:.o=.ko) $(TARGET_MODDIR)
|
||||
else
|
||||
cp $(obj-m) $(TARGET_MODDIR)/linux-wlan-ng
|
||||
cp $(obj-m) $(TARGET_MODDIR)
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue