| 1 | # |
| 2 | # Makefile for wlags49_h2_cs.ko and wlags49_h25_cs.ko |
| 3 | # |
| 4 | # Default build for Hermes-II base cards (possibly identified with |
| 5 | # "manfid: 0x0156, 0x0003" in "pccardctl ident" output), comment |
| 6 | # -DHERMES25 below |
| 7 | # |
| 8 | # If you want to build for Hermes-II.5 base cards (possibly identified with |
| 9 | # "manfid: 0x0156, 0x0004" in "pccardctl ident" output), uncomment |
| 10 | # -DHERMES25 below |
| 11 | # |
| 12 | # If you want to build AP support (untested), comment out -DSTA_ONLY |
| 13 | |
| 14 | INSTALLDIR := /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless |
| 15 | EXTRA_CFLAGS += -I$(KERNELDIR)/include |
| 16 | EXTRA_CFLAGS += -I$(src) \ |
| 17 | -DBUS_PCMCIA \ |
| 18 | -DUSE_WPA \ |
| 19 | -DUSE_WEXT \ |
| 20 | -DSTA_ONLY \ |
| 21 | -DWVLAN_49 \ |
| 22 | # -DHERMES25 \ |
| 23 | # -DDBG \ |
| 24 | # -DDBG_LVL=5 \ |
| 25 | # -DUSE_UIL \ |
| 26 | # -DUSE_PROFILE \ |
| 27 | |
| 28 | ifeq ($(findstring HERMES25,$(EXTRA_CFLAGS)),) |
| 29 | WLNAME := wlags49_h2_cs |
| 30 | $(WLNAME)-y := sta_h2.o |
| 31 | ifeq ($(findstring STA_ONLY,$(EXTRA_CFLAGS)),) |
| 32 | $(WLNAME)-y += ap_h2.o |
| 33 | endif |
| 34 | else |
| 35 | WLNAME=wlags49_h25_cs |
| 36 | $(WLNAME)-y := sta_h25.o |
| 37 | ifeq ($(findstring STA_ONLY,$(EXTRA_CFLAGS)),) |
| 38 | $(WLNAME)-y += ap_h25.o |
| 39 | endif |
| 40 | endif |
| 41 | |
| 42 | # If KERNELRELEASE is defined, we've been invoked from the |
| 43 | # kernel build system and can use its language. |
| 44 | ifneq ($(KERNELRELEASE),) |
| 45 | |
| 46 | obj-m += $(WLNAME).o |
| 47 | |
| 48 | $(WLNAME)-y += wl_profile.o \ |
| 49 | wl_wext.o \ |
| 50 | wl_priv.o \ |
| 51 | wl_main.o \ |
| 52 | wl_enc.o \ |
| 53 | wl_util.o \ |
| 54 | wl_netdev.o \ |
| 55 | wl_cs.o \ |
| 56 | mmd.o \ |
| 57 | hcf.o \ |
| 58 | dhf.o |
| 59 | |
| 60 | $(WLNAME)-$(CONFIG_SYSFS) += wl_sysfs.o |
| 61 | |
| 62 | # Otherwise we were called directly from the command |
| 63 | # line; invoke the kernel build system. |
| 64 | else |
| 65 | KERNELDIR ?= /lib/modules/$(shell uname -r)/build |
| 66 | PWD := $(shell pwd) |
| 67 | |
| 68 | default: |
| 69 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules |
| 70 | endif |
| 71 | |
| 72 | clean: |
| 73 | rm -fr *.o *.ko *.mod.c *.mod.o .*.*.cmd Module.symvers \ |
| 74 | Module.markers modules.order .tmp_versions |
| 75 | |
| 76 | install: default |
| 77 | -rmmod $(WLNAME) |
| 78 | install -d $(INSTALLDIR) |
| 79 | install -m 0644 -o root -g root $(WLNAME).ko $(INSTALLDIR) |
| 80 | /sbin/depmod -aq |
| 81 | |