]> bbs.cooldavid.org Git - net-next-2.6.git/blame - drivers/staging/wlags49_h25/Makefile
Staging: wlags49_h25: Makefile: cleaned up Makefile cflag lines
[net-next-2.6.git] / drivers / staging / wlags49_h25 / Makefile
CommitLineData
68c0bdff
HG
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
14INSTALLDIR := /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless
9c36d724
TD
15ccflags-y := -I$(KERNELDIR)/include
16ccflags-y += -I$(src) \
68c0bdff
HG
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
9c36d724 28ifeq ($(findstring HERMES25,$(ccflags-y)),)
68c0bdff
HG
29WLNAME := wlags49_h2_cs
30$(WLNAME)-y := sta_h2.o
9c36d724 31ifeq ($(findstring STA_ONLY,$(ccflags-y)),)
68c0bdff
HG
32$(WLNAME)-y += ap_h2.o
33endif
34else
35WLNAME=wlags49_h25_cs
36$(WLNAME)-y := sta_h25.o
9c36d724 37ifeq ($(findstring STA_ONLY,$(ccflags-y)),)
68c0bdff
HG
38$(WLNAME)-y += ap_h25.o
39endif
40endif
41
42# If KERNELRELEASE is defined, we've been invoked from the
43# kernel build system and can use its language.
44ifneq ($(KERNELRELEASE),)
45
46obj-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.
64else
65 KERNELDIR ?= /lib/modules/$(shell uname -r)/build
66 PWD := $(shell pwd)
67
68default:
69 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
70endif
71
72clean:
73 rm -fr *.o *.ko *.mod.c *.mod.o .*.*.cmd Module.symvers \
74 Module.markers modules.order .tmp_versions
75
76install: default
77 -rmmod $(WLNAME)
78 install -d $(INSTALLDIR)
79 install -m 0644 -o root -g root $(WLNAME).ko $(INSTALLDIR)
80 /sbin/depmod -aq
81