-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.lib.cross_linux
executable file
·57 lines (45 loc) · 1.62 KB
/
Makefile.lib.cross_linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
KMODULE_NAME = ssv6x5x
KBUILD_TOP := drivers/net/wireless/ssv6x5x
ifeq ($(MAKELEVEL),0)
KBUILD_TOP := .
endif
include $(KBUILD_TOP)/$(KMODULE_NAME).cfg
include $(KBUILD_TOP)/platform-config.mak
# Generate version strings
# GEN_VER := $(shell cd $(KBUILD_TOP); ./ver_info.pl include/ssv_version.h)
# Generate -wifi.cfg
BKP_CFG := $(shell cp $(KBUILD_TOP)/$(KMODULE_NAME)-wifi.cfg $(KBUILD_TOP)/image/$(KMODULE_NAME)-wifi.cfg)
EXTRA_CFLAGS := -I$(KBUILD_TOP) -I$(KBUILD_TOP)/include
DEF_PARSER_H = $(KBUILD_TOP)/include/ssv_conf_parser.h
$(shell touch $(DEF_PARSER_H))
$(shell env ccflags="$(ccflags-y)" $(KBUILD_TOP)/parser-conf.sh $(DEF_PARSER_H))
obj-$(CONFIG_SSV6XXX) := $(KMODULE_NAME).o
$(KMODULE_NAME)-objs := $(KMODULE_NAME)-generic-wlan.o lib.a
.PHONY: all modules clean
all: modules
modules:
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
strip:
$(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded
#install:
# install -p -m 644 $(MODULE_NAME).ko $(MODDESTDIR)
# /sbin/depmod -a ${KVER}
#
#uninstall:
# rm -f $(MODDESTDIR)/$(MODULE_NAME).ko
# /sbin/depmod -a ${KVER}
clean:
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
rm -fr Module.symvers
rm -fr Module.markers
rm -fr modules.order
rm -fr image/$(KMODULE_NAME)-wifi.cfg
cd ssvdevice/; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hci/; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd smac/; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hwif/; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hwif/sdio/; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd crypto/; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
rm -fr lib.a
rm $(DEF_PARSER_H)