allow coexistance of N build and AC build.
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / drivers / net / dpsta / Makefile
blobf04f67187f8457167fcf69350162212ead887feb
2 # Makefile for the Dualband Proxy STA
4 # Copyright (C) 2011, Broadcom Corporation. All Rights Reserved.
5 #
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
9 #
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13 # SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 # $Id: Makefile 310909 2012-01-26 19:46:52Z $
21 obj-${CONFIG_DPSTA} := dpsta.o
23 DPSTASRC := ../../../../../router/dpsta
24 DPSTAOBJ := $(DPSTASRC)/dpsta_linux.o
25 SYMOBJ := $(DPSTASRC)/dpsta_linux.o
27 # Search for sources under src/router/dpsta
28 ifneq (,$(wildcard $(src)/$(DPSTASRC)/*.c))
29 EXTRA_CFLAGS += -I$(src)/$(DPSTASRC)/../../router/dpsta
30 dpsta-objs := $(DPSTAOBJ) dpsta_ksyms.o
31 else
32 dpsta-objs := $(DPSTASRC)/linux/dpsta.o
33 endif
35 ifeq (,${KERNELRELEASE})
36 # Normal makefile
37 KERNELDIR := ../../../../../linux/linux-2.6
39 .PHONY: all clean
40 all clean :
41 +$(MAKE) -C $(KERNELDIR) M=`pwd` $@
42 endif
44 PHONY += $(src)/dpsta_ksyms.c
46 quiet_cmd_ksyms = CALL $<
47 cmd_ksyms = $(CONFIG_SHELL) -e $< $(src)/$(SYMOBJ) > $@
49 $(src)/dpsta_ksyms.c: $(src)/dpsta_ksyms.sh $(src)/$(SYMOBJ) FORCE
50 $(call cmd,ksyms)
52 clean-files += $(src)/$(DPSTASRC)/*.o $(src)/$(DPSTASRC)/.*.o.cmd