-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRules.mk
95 lines (74 loc) · 2.12 KB
/
Rules.mk
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
include $(MK_SHARE)Core/Main.dirstack.mk
MK_$d := $/Rules.mk
MK += $(MK_$d)
#
# ------------ --
ifeq ($(shell uname -s),Darwin)
ARDUINOAPPDIR := $(shell cd /Applications/Arduino.app/ && pwd -P)
else
ARDUINOAPPDIR := $(shell realpath ./arduinodir)
endif
$(info $(shell $(call log,header2,ARDUINOAPPDIR,$(ARDUINOAPPDIR))))
ifneq ($(wildcard $(ARDUINOAPPDIR)/Contents/Resources/Java),)
ARDUINODIR := $(ARDUINOAPPDIR)/Contents/Resources/Java
else
ifneq ($(wildcard $(ARDUINOAPPDIR)/Contents/Java),)
ARDUINODIR := $(ARDUINOAPPDIR)/Contents/Java
else
$(error No ARDUINODIR for $(ARDUINOAPPDIR))
endif
endif
$(info $(shell $(call log,header2,ARDUINODIR,$(ARDUINODIR))))
# ------------ --
arduinodir-libraries-relink::
for f in libraries/*; do \
F=$$(basename $$f); \
if [ -n "$$(echo $$F | grep '[^a-zA-Z0-9_]')" ] ; then \
continue; fi; \
T=$$(realpath arduinodir/libraries)/$$F; \
[ -e "$$T" ] && [ -L "$$T" ] && { \
rm -v $$T; \
} || { \
echo Existing library $$F; \
};\
[ ! -e "$$T" ] && { \
ln -sv $$(pwd -P)/$$f $$T; \
} || { \
echo -n; \
};\
done
# ------------ --
./Misc/Soarer_Converter/docs:
unzip ./Misc/Soarer_Converter/Soarer_Converter_v1.12_docs.zip -c Misc/Soarer_Converter
# ------------ --
include $/Rules.serial.mk
# ------------ --
OLD ?= 0
ifeq ($(OLD),1)
include $/Rules.edams.mk
else
include $/Rules.sudar.mk
endif
include $/Rules.targets.mk
# ------------ --
ifneq ($(call contains,$(MAKECMDGOALS),clean),)
CLN += $(shell find $/ -name .dep -or -name .lib -o -name *.o -o -name *.swp -o -name *.swo)
endif
# ------------ --
clean-git:
git submodule foreach git clean -dfx
git clean -dfx
STRGT += clean-git
# ------------ --
#DIR := $/mydir
#include $(call rules,$(DIR)/)
#
# DMK += $/dynamic-makefile.mk
# DEP += $/generated-dependency
# TRGT += $/build-target
# TEST += $/testtarget
# XXX: cleanable only noticed on 'make clean'
# ------------ --
#
include $(MK_SHARE)Core/Main.dirstack-pop.mk
# vim:noet: