makefile
来自「Linux的无线局域网方案是一个Linux设备驱动程序和子系统 一揽子方案的用」· 代码 · 共 296 行
TXT
296 行
# src/prism2/driver/Makefile## Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.# --------------------------------------------------------------------## linux-wlan## The contents of this file are subject to the Mozilla Public# License Version 1.1 (the "License"); you may not use this file# except in compliance with the License. You may obtain a copy of# the License at http://www.mozilla.org/MPL/## Software distributed under the License is distributed on an "AS# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or# implied. See the License for the specific language governing# rights and limitations under the License.## Alternatively, the contents of this file may be used under the# terms of the GNU Public License version 2 (the "GPL"), in which# case the provisions of the GPL are applicable instead of the# above. If you wish to allow the use of your version of this file# only under the terms of the GPL and not to allow others to use# your version of this file under the MPL, indicate your decision# by deleting the provisions above and replace them with the notice# and other provisions required by the GPL. If you do not delete# the provisions above, a recipient may use your version of this# file under either the MPL or the GPL.## --------------------------------------------------------------------## Inquiries regarding the linux-wlan Open Source project can be# made directly to:## AbsoluteValue Systems Inc.# info@linux-wlan.com# http://www.linux-wlan.com## --------------------------------------------------------------------## Portions of the development of this software were funded by # Intersil Corporation as part of PRISM(R) chipset product development.## --------------------------------------------------------------------include ../../../config.mkifeq ($(CROSS_COMPILE_ENABLED), y)AS =$(CROSS_AS)LD =$(CROSS_LD)CC =$(CROSS_CC)CPP =$(CROSS_CPP)AR =$(CROSS_AR)NM =$(CROSS_NM)STRIP =$(CROSS_STRIP)OBJCOPY =$(CROSS_OBJCOPY)OBJDUMP =$(CROSS_OBJDUMP)RANLIB =$(CROSS_RANLIB)MAKE =makeelseAS =$(HOST_AS)LD =$(HOST_LD)CC =$(HOST_CC)CPP =$(HOST_CPP)AR =$(HOST_AR)NM =$(HOST_NM)STRIP =$(HOST_STRIP)OBJCOPY =$(HOST_OBJCOPY)OBJDUMP =$(HOST_OBJDUMP)RANLIB =$(HOST_RANLIB)MAKE =makeendif# -E outputs preprocessed, just noted here because I forget # Build options (just comment out the ones you don't want)ifeq ($(WLAN_DEBUG), y)WLAN_INCLUDE_DEBUG="-DWLAN_INCLUDE_DEBUG"endififeq ($(CONFIG_NETLINK), y)WLAN_CS_CONFIG_SNIFF="-DCONFIG_NETLINK=1 "endififeq ($(CONFIG_PACKET), y)WLAN_CS_CONFIG_SNIFF+="-DCONFIG_PACKET=1 "endif# Source and obj and target definitionsCS_OBJ_DIR=obj_csPLX_OBJ_DIR=obj_plxPCI_OBJ_DIR=obj_pciUSB_OBJ_DIR=obj_usbSRC=prism2sta.c prism2mgmt.c prism2mib.c hfa384x.c CS_MODULE=prism2_cs.oPLX_MODULE=prism2_plx.oPCI_MODULE=prism2_pci.oUSB_MODULE=prism2_usb.oCS_OBJ= $(CS_OBJ_DIR)/prism2wext.o \ $(CS_OBJ_DIR)/prism2sta.o \ $(CS_OBJ_DIR)/prism2mgmt.o \ $(CS_OBJ_DIR)/prism2mib.o \ $(CS_OBJ_DIR)/hfa384x.oPLX_OBJ= $(PLX_OBJ_DIR)/prism2wext.o \ $(PLX_OBJ_DIR)/prism2sta.o \ $(PLX_OBJ_DIR)/prism2mgmt.o \ $(PLX_OBJ_DIR)/prism2mib.o \ $(PLX_OBJ_DIR)/hfa384x.oPCI_OBJ= $(PCI_OBJ_DIR)/prism2wext.o \ $(PCI_OBJ_DIR)/prism2sta.o \ $(PCI_OBJ_DIR)/prism2mgmt.o \ $(PCI_OBJ_DIR)/prism2mib.o \ $(PCI_OBJ_DIR)/hfa384x.oUSB_OBJ= $(USB_OBJ_DIR)/prism2wext.o \ $(USB_OBJ_DIR)/prism2sta.o \ $(USB_OBJ_DIR)/prism2mgmt.o \ $(USB_OBJ_DIR)/prism2mib.o \ $(USB_OBJ_DIR)/hfa384x_usb.o# List of modules to buildMODULES=ifeq ($(PRISM2_PCMCIA), y)MODULES+=$(CS_MODULE)endififeq ($(PRISM2_PLX), y)MODULES+=$(PLX_MODULE)endififeq ($(PRISM2_PCI), y)MODULES+=$(PCI_MODULE)endififeq ($(PRISM2_USB), y)MODULES+=$(USB_MODULE)endif# Implicit rules to handle the separate obj dirs$(CS_OBJ_DIR)/%.o : %.c $(CC) -c $(CFLAGS) $(CPPFLAGS) $(CS_SYSINC) \ -DWLAN_HOSTIF=WLAN_PCMCIA $< -o $@$(PLX_OBJ_DIR)/%.o : %.c $(CC) -c $(CFLAGS) $(CPPFLAGS) $(SYSINC) \ -DWLAN_HOSTIF=WLAN_PLX $< -o $@$(PCI_OBJ_DIR)/%.o : %.c $(CC) -c $(CFLAGS) $(CPPFLAGS) $(SYSINC) \ -DWLAN_HOSTIF=WLAN_PCI $< -o $@$(USB_OBJ_DIR)/%.o : %.c $(CC) -c $(CFLAGS) $(CPPFLAGS) $(SYSINC) \ -DWLAN_HOSTIF=WLAN_USB $< -o $@# Compiler Optionsifndef CFLAGSCFLAGS = -O2 -Wall -Wstrict-prototypes -fomit-frame-pointer -pipeifeq ($(WLAN_TARGET_ARCH), alpha)CFLAGS := $(CFLAGS) -mno-fp-regs -ffixed-8endifendif# Preprocessor OptionsCPPFLAGS=-D__LINUX_WLAN__ -D__KERNEL__ -DMODULE=1 $(WLAN_INCLUDE_DEBUG) \ -I../include -I../../include# Use the following if building for pcmciaifeq ($(WLAN_KERN_PCMCIA), y)CS_SYSINC=-I$(LINUX_SRC)/include -I$(PCMCIA_SRC)/include/static \ -I$(PCMCIA_SRC)/includeelseCS_SYSINC=$(WLAN_CS_CONFIG_SNIFF) -I$(PCMCIA_SRC)/include \ -I$(LINUX_SRC)/include endif # WLAN_KERN_PCMCIA# Use just SYSINC for all non-pcmciaSYSINC= -I$(LINUX_SRC)/include # Dependency Source ListDEP_SRC=$(SRC)# Rulesall : .depend dirs $(MODULES)dirs : mkdir -p $(CS_OBJ_DIR) mkdir -p $(PLX_OBJ_DIR) mkdir -p $(PCI_OBJ_DIR) mkdir -p $(USB_OBJ_DIR)$(CS_MODULE) : $(CS_OBJ) $(LD) -r -o $@ $(CS_OBJ) chmod -x $@$(PLX_MODULE) : $(PLX_OBJ) $(LD) -r -o $@ $(PLX_OBJ) chmod -x $@$(PCI_MODULE) : $(PCI_OBJ) $(LD) -r -o $@ $(PCI_OBJ) chmod -x $@$(USB_MODULE) : $(USB_OBJ) $(LD) -r -o $@ $(USB_OBJ) chmod -x $@install : $(MODULES)ifeq ($(PRISM2_PCMCIA), y) mkdir -p $(TARGET_MODDIR)/pcmcia cp -f $(CS_MODULE) $(TARGET_MODDIR)/pcmcia endififeq ($(PRISM2_PCI), y) mkdir -p $(TARGET_MODDIR)/net cp -f $(PCI_MODULE) $(TARGET_MODDIR)/net endififeq ($(PRISM2_PLX), y) mkdir -p $(TARGET_MODDIR)/net cp -f $(PLX_MODULE) $(TARGET_MODDIR)/net endififeq ($(PRISM2_USB), y) mkdir -p $(TARGET_MODDIR)/usb cp -f $(USB_MODULE) $(TARGET_MODDIR)/usb endifclean: rm -f .depend* rm -f core core.* *.o .*.o *.s *.a .depend tmp_make *~ tags rm -fr $(CS_OBJ_DIR) rm -fr $(PLX_OBJ_DIR) rm -fr $(PCI_OBJ_DIR) rm -fr $(USB_OBJ_DIR) rm -fr $(MODULES)# This probably isn't the best way to handle the dependencies, but it works.DEPLIST=ifeq ($(PRISM2_PCMCIA), y)DEPLIST+=.depend.csendififeq ($(PRISM2_PLX), y)DEPLIST+=.depend.plxendififeq ($(PRISM2_PCI), y)DEPLIST+=.depend.pciendififeq ($(PRISM2_USB), y)DEPLIST+=.depend.usbendifdep .depend: $(DEPLIST) cat $(DEPLIST) > .depend.depend.plx: $(DEP_SRC) ../../../config.mk rm -f $@ for i in $(DEP_SRC); do \ (/bin/echo -n $(PLX_OBJ_DIR)/ ; \ $(CPP) -DWLAN_HOSTIF=WLAN_PLX -M $(CPPFLAGS) $(SYSINC) $$i ) \ >> $@ ; \ done.depend.pci: $(DEP_SRC) ../../../config.mk rm -f $@ for i in $(DEP_SRC); do \ (/bin/echo -n $(PCI_OBJ_DIR)/ ; \ $(CPP) -DWLAN_HOSTIF=WLAN_PCI -M $(CPPFLAGS) $(SYSINC) $$i ) \ >> $@ ; \ done.depend.cs: $(DEP_SRC) ../../../config.mk rm -f $@ for i in $(DEP_SRC); do \ (/bin/echo -n $(CS_OBJ_DIR)/ ; \ $(CPP) -DWLAN_HOSTIF=WLAN_PCMCIA -M $(CPPFLAGS) \ $(CS_SYSINC) $$i ) \ >> $@ ; \ done.depend.usb: $(DEP_SRC) ../../../config.mk rm -f $@ for i in $(DEP_SRC); do \ (/bin/echo -n $(USB_OBJ_DIR)/ ; \ $(CPP) -DWLAN_HOSTIF=WLAN_USB -M $(CPPFLAGS) $(SYSINC) $$i ) \ >> $@ ; \ done## Include a dependency file (if one exists)#ifneq ($(MAKECMDGOALS), clean)ifeq (.depend,$(wildcard .depend))include .dependendifendif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?