-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·59 lines (47 loc) · 1.44 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
PWD=$(shell pwd)
-include $(SDK_CONFIG_CONFIG)
#** include *.mk **
-include define.mk
#[major].[minor].[revision].[build]
VERSION_MAJOR = 1
VERSION_MINOR = 0
VERSION_REVISION = 0
VERSION_FULL = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_REVISION)
LIBNAME_A = xxx
LIBNAME_SO =
LIBNAME_MOD =
#** GITHUB_LIBS **
GITHUB_LIBS = \
https://github.com/lankahsu520/pythonX9.git
#** PYTHON_FILES **
PYTHON_FILES = \
awsp9-db_123.py \
awsp9-s3_123.py
DEBUG=3
DEBUG_ARG=-d $(DEBUG)
#********************************************************************************
#** All **
#********************************************************************************
.DEFAULT_GOAL = all
.PHONY: all clean distclean layer_python
all: $(PYTHON_FILES)
clean:
$(PJ_SH_RM) export.log
$(PJ_SH_RM) .configured
$(PJ_SH_RMDIR) __pycache__/ ./python/ github_libs/
$(PJ_SH_RM) $(PJ_NAME)/version.txt
@for subdir in $(CONFS_yes); do \
[ -d "$$subdir" ] && (make -C $$subdir $@;) || echo "skip !!! ($$subdir)"; \
done
distclean: clean
layer_python:
@echo '----->> $@ - $(PWD)/python'
@if [ ! -d "$(PWD)/python" ]; then \
(pip3 install --target $(PWD)/python -r requirements.txt); \
for libs in $(GITHUB_LIBS); do (git clone $$libs github_libs && $(PJ_SH_CP) github_libs/*.py $(PWD)/python && rm -rf github_libs); done \
fi
@echo
$(PYTHON_FILES): layer_python
@echo
@echo '----->> run $@'
PYTHONPATH=$(PWD)/python ./$@ $(DEBUG_ARG)