-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile.4.util
76 lines (57 loc) · 1.71 KB
/
Makefile.4.util
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
include $(RT28xx_DIR)/os/linux/config.mk
#ifdef CONFIG_STA_SUPPORT
ifeq ($(RT28xx_MODE), STA)
MOD_NAME = rtutil$(MODULE)sta
endif
#endif // CONFIG_STA_SUPPORT //
OBJ := $(MOD_NAME).o
#ifdef CONFIG_STA_SUPPORT
RT28XX_STA_OBJ := \
../../common/rt_os_util.o\
../../os/linux/rt_linux_symb.o\
../../os/linux/rt_rbus_pci_util.o\
../../os/linux/rt_usb_util.o\
../../os/linux/rt_linux.o
#endif // CONFIG_STA_SUPPORT //
PHONY := all clean
all:$(OBJ)
rtutil$(MODULE)sta.o: $(RT28XX_STA_OBJ)
$(LD) -r $^ -o $@
rtutil$(MODULE)ap.o: $(RT28XX_AP_OBJ)
$(LD) -r $^ -o $@
rtutil$(MODULE)apsta.o: $(RT28XX_APSTA_OBJ)
$(LD) -r $^ -o $@
clean:
rm -f $(RT28xx_DIR)/common/*.o
rm -f $(RT28xx_DIR)/common/.*.{cmd,flags,d}
rm -f $(RT28xx_DIR)/os/linux/*.{o,ko,mod.{o,c}}
rm -f $(RT28xx_DIR)/os/linux/.*.{cmd,flags,d}
rm -fr $(RT28xx_DIR)/os/linux/.tmp_versions
rm -f $(RT28xx_DIR)/chips/*.o
rm -f $(RT28xx_DIR)/chips/.*.{cmd,flags,d}
ifeq ($(RT28xx_MODE),AP)
rm -f $(RT28xx_DIR)/ap/*.o
rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d}
else
ifeq ($(RT28xx_MODE),STA)
rm -f $(RT28xx_DIR)/sta/*.o
rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d}
else
ifeq ($(RT28xx_MODE),APSTA)
rm -f $(RT28xx_DIR)/ap/*.o
rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d}
rm -f $(RT28xx_DIR)/sta/*.o
rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d}
endif
endif
endif
install:
install -d $(LINUX_SRC_MODULE)
install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
/sbin/depmod -a ${shell uname -r}
uninstall:
rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
/sbin/depmod -a ${shell uname -r}
# Declare the contents of the .PHONY variable as phony. We keep that
# # information in a variable so we can use it in if_changed and friends.
.PHONY: $(PHONY)