forked from ahmar20/wave300-openwrt
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
executable file
·150 lines (116 loc) · 5.2 KB
/
Makefile
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
CONFIG_FILE:=.config
CONFIG_EXISTS := $(wildcard $(CONFIG_FILE))
VCPROJ_FNAME:=msvc_all_[$(shell echo $${PWD\#\#*/})].vcproj
VCXPROJ_FNAME:=msvc_all_[$(shell echo $${PWD\#\#*/})].vcxproj
VCXPROJ_FILTERS_FNAME:=$(VCXPROJ_FNAME).filters
WBLD_DIR:=support/wbld_scripts/
ifneq ($(CONFIG_EXISTS),)
ifneq ($(_LQBLD_FTP_COPY),)
AUTHFILE:=support/release/release_config/.nld_release_ftp
FTPDIR:=Israel/users/wave300/Kiev_MTLK/nld/temp/$(USER)
endif
include $(CONFIG_FILE)
all: .build_tree_ts
@make -C builds/$(CONFIG_ENVIRONMENT_NAME) install
ifneq ($(_TFTPROOT),)
ifeq ($(CONFIG_LIN_DRV), y)
@cp -v builds/$(CONFIG_ENVIRONMENT_NAME)/binaries/wls/driver/* $(_TFTPROOT)
endif
ifeq ($(CONFIG_LIN_MTTOOLS), y)
@cp -v builds/$(CONFIG_ENVIRONMENT_NAME)/binaries/wls/mttools/* $(_TFTPROOT)
endif
ifeq ($(CONFIG_LIN_RTLOG_COMPONENTS), y)
@cp -v builds/$(CONFIG_ENVIRONMENT_NAME)/binaries/wls/rtlogger/* $(_TFTPROOT)
endif
ifeq ($(CONFIG_LIN_DUT), y)
@cp -v builds/$(CONFIG_ENVIRONMENT_NAME)/binaries/dut/* $(_TFTPROOT)
endif
endif
ifneq ($(_LQBLD_FTP_COPY),)
ifeq ($(CONFIG_LIN_DRV), y)
@ncftpput -m -v -R -f $(AUTHFILE) $(FTPDIR) builds/$(CONFIG_ENVIRONMENT_NAME)/binaries/wls/driver/*
endif
ifeq ($(CONFIG_LIN_MTTOOLS), y)
@ncftpput -m -v -R -f $(AUTHFILE) $(FTPDIR) builds/$(CONFIG_ENVIRONMENT_NAME)/binaries/wls/mttools/*
endif
ifeq ($(CONFIG_LIN_RTLOG_COMPONENTS), y)
@ncftpput -m -v -R -f $(AUTHFILE) $(FTPDIR) builds/$(CONFIG_ENVIRONMENT_NAME)/binaries/wls/rtlogger/*
endif
ifeq ($(CONFIG_LIN_DUT), y)
@ncftpput -m -v -R -f $(AUTHFILE) $(FTPDIR) builds/$(CONFIG_ENVIRONMENT_NAME)/binaries/dut/*
endif
endif
else
all:
@echo ERROR: no .config file found!
@echo Run "make xconfig" or "make menuconfig" first to generate .config file!
clean:
@echo ERROR: no .config file found!
@echo Run "make xconfig" or "make menuconfig" first to generate .config file!
endif
distclean:
-rm -rf .build_tree_ts .config .config.h Makefile.in config.guess config.h.in config.sub configure depcomp install-sh missing compile branch_version.m4 builds autom4te.cache
@make -C tools/kconfig clean
vcproj:
@echo "Building VCPROJ ($(VCPROJ_FNAME))..."
@perl $(WBLD_DIR)/mtlk_list_files.pl . mtlk_list_files.cfg $(WBLD_DIR)/msvc_all.vcproj.cfg.template NO_FILTERS > $(VCPROJ_FNAME) < $(WBLD_DIR)/msvc_all.vcproj.template
@echo "Done ($(VCPROJ_FNAME))!"
vcxproj:
@echo "Building VCXPROJ ($(VCXPROJ_FNAME))..."
@perl $(WBLD_DIR)/mtlk_list_files.pl . mtlk_list_files.cfg $(WBLD_DIR)/msvc_all.vcxproj.cfg.template $(WBLD_DIR)/msvc_all.vcxproj.cfg_list.template > $(VCXPROJ_FNAME) < $(WBLD_DIR)/msvc_all.vcxproj.template
@perl $(WBLD_DIR)/mtlk_list_files.pl . mtlk_list_files.cfg $(WBLD_DIR)/msvc_all.vcxproj.cfg.template $(WBLD_DIR)/msvc_all.vcxproj.cfg_list.template > $(VCXPROJ_FILTERS_FNAME) < $(WBLD_DIR)/msvc_all.vcxproj.filters.template
@echo "Done ($(VCXPROJ_FNAME))!"
.PHONY: .build_conf .build_mconf .build_nconf .build_qconf .config_x .config_m .config_c .config_d config xconfig menuconfig nconfig defconfig
configure: configure.ac branch_version.m4
autoreconf --install
branch_version.m4: branch_version.m4.in mtlk_version
@echo dnl WARNING: > $@
@echo dnl WARNING: This file is automatically generated from branch_version.m4.in. >> $@
@echo dnl WARNING: Do not edit it, all changes will gone. >> $@
@echo dnl WARNING: Edit branch_version.m4.in instead. >> $@
@echo dnl WARNING: >> $@
@echo >> $@
@sed -e"s/@BRANCH_VERSION@/`perl ./support/mtlk_ver.pl -G < mtlk_version`/g" < branch_version.m4.in >> $@
config: .build_conf .config_c .config.h
xconfig: .build_qconf .config_x .config.h
menuconfig: .build_mconf .config_m .config.h
nconfig: .build_nconf .config_n .config.h
defconfig: .build_conf .config_d .config.h
BUILD_TREE_DEPS:=$(shell [ -f .config ] && ./support/cfghlpr.sh .config get_bld_tree_cfg)
# NOTE: .config.h is being copied for MSVC oldconfig correct parsing
.build_tree_ts .config.h:: configure .config $(BUILD_TREE_DEPS)
./support/cfghlpr.sh .config
@cp -v $(shell ./support/cfghlpr.sh .config get_bld_dir)/.config.h .
@touch .build_tree_ts
.build_conf:
@make -C tools/kconfig config
.build_qconf:
@make -C tools/kconfig xconfig
.build_mconf:
@make -C tools/kconfig menuconfig
.build_nconf:
@make -C tools/kconfig nconfig
ifneq ( $(BUILD_TREE_DEPS), )
$(BUILD_TREE_DEPS):
@echo -n
endif
.config_c:
./tools/kconfig/conf ./MTLKConfig
test .config.h -nt .config || rm -f .config.h
.config_x:
./tools/kconfig/qconf ./MTLKConfig
test .config.h -nt .config || rm -f .config.h
.config_m:
./tools/kconfig/mconf ./MTLKConfig
test .config.h -nt .config || rm -f .config.h
.config_n:
./tools/kconfig/nconf ./MTLKConfig
test .config.h -nt .config || rm -f .config.h
ifeq ($(MINICONFIG),)
MINICONFIG:=/dev/null
endif
.config_d:
./tools/kconfig/conf -D $(MINICONFIG) MTLKConfig
test .config.h -nt .config || rm -f .config.h
%:
@make -C builds/$(CONFIG_ENVIRONMENT_NAME) $@