VERSION = 0.15rc2 EXTRAVERSION = # The default kernel is the one you are running, but you may want to set # it to another configured Linux source tree KERNEL_SRC = $(shell readlink -f /lib/modules/`uname -r`/build) # Output directory that you used when building Linux kernel, if any. # Note: this driver will be compiled to the current directory regardless. O = $(KERNEL_SRC) # You don't need to change anything below this line in most cases CONF_DIR = /etc/pcmcia ORINOCODIR = $(shell pwd) KERNEL_VERSION = $(shell sed -ne 's/"//g;s/^\#define UTS_RELEASE //p' \ $(O)/include/linux/version.h) MODULE_DIR_TOP = /lib/modules/$(KERNEL_VERSION) MODULE_DIR_PCMCIA = $(MODULE_DIR_TOP)/pcmcia MODULE_DIR_WIRELESS = $(MODULE_DIR_TOP)/kernel/drivers/net/wireless DOT_CONFIG = $(wildcard $(O)/.config) ifeq (,$(DOT_CONFIG)) $(error The kernel source is not configured) endif include $(DOT_CONFIG) ifndef CONFIG_NET_RADIO $(error Wireless extensions are not enabled) endif MODULES = hermes.o orinoco.o ifdef CONFIG_PPC_PMAC MODULES += airport.o endif ifdef CONFIG_PCI MODULES += orinoco_nortel.o orinoco_pci.o orinoco_plx.o orinoco_tmd.o endif ifdef CONFIG_PCMCIA MODULES += orinoco_cs.o ifdef CONFIG_FW_LOADER MODULES += spectrum_cs.o endif endif SRCS = airport.c hermes.c orinoco.c orinoco_cs.c orinoco_nortel.c \ orinoco_pci.c orinoco_plx.c orinoco_tmd.c HDRS = hermes.h hermes_rid.h ieee802_11.h kcompat.h orinoco.h CONF = hermes.conf TAR = tar DEPMOD = /sbin/depmod CVSTAG = orinoco_$(shell echo $(VERSION) | sed 's/\./_/g') DISTFILES = $(SRCS) $(HDRS) $(CONF) Makefile README.orinoco TOPDISTFILES = README.orinoco $(CONF) DISTNAME = orinoco-$(VERSION) DISTDIR = ../dist PUSH_WWW = push-www.sh all: modules installconf: ifdef CONFIG_PCMCIA mkdir -p $(CONF_DIR) install -m 644 -o 0 -g 0 $(CONF) $(CONF_DIR)/$(CONF) endif TAGS: rm -f TAGS find $(KERNEL_SRC)/ -name '*.[ch]' | xargs etags --append etags --append $(SRCS) $(HDRS) clean: rm -f core *.o *~ .#* a.out *.d rm -f *.s *.i rm -f *.ko *.mod.c *.mod .*.cmd rm -f $(MODVERDIR)/*.mod rmdir $(MODVERDIR) || true .PHONY: TAGS all clean dist installconf modules newrelease push releasecheck: all clean ./releasecheck.sh $(VERSION) $(EXTRAVERSION) newrelease: dist releasecheck cvs tag -c $(CVSTAG) mkdir $(DISTDIR)/$(DISTNAME) cp $(DISTFILES) $(DISTDIR)/$(DISTNAME) cd $(DISTDIR); $(TAR) cvfz $(DISTNAME).tar.gz $(DISTNAME) ChangeLog: CVS/Entries rcs2log -c "" > ChangeLog dist: rsync -av -C --exclude=*.d --exclude=*.ko --exclude=*.cmd --exclude=*.mod.c --exclude=*.mod --delete-excluded ./ $(DISTDIR)/testing/ cp $(TOPDISTFILES) $(DISTDIR) push: dist $(PUSH_WWW) obj-m := $(MODULES) modules: $(MAKE) -C $(KERNEL_SRC) M=$(ORINOCODIR) modules install: all installconf mkdir -p $(MODULE_DIR_WIRELESS) install -m 644 -o 0 -g 0 $(MODULES:%.o=%.ko) $(MODULE_DIR_WIRELESS) $(DEPMOD) -ae