forked from anpaza/kicad-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (22 loc) · 726 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (22 loc) · 726 Bytes
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
.PHONY: all install showrules
# A newline
define NL
endef
LIBS=Capacitors_Alu_SMD Connectors_JST Choke_SMD Crystals \
Capacitors_gen
KICAD.LIBS=/usr/share/kicad
CWD=$(shell pwd)
all:
@echo "Run 'sudo make install' to make symlinks in $(KICAD.LIBS)"
@echo "to libraries in this directory"
define CHECKLIB
@./mklink "$(KICAD.LIBS)/modules/$2.pretty" "$(CWD)/$1/$2.pretty" kicad_mod
@./mklink "$(KICAD.LIBS)/modules/packages3d/$2.3dshapes" "$(CWD)/$1/$2.3dshapes" wrl
endef
define CHECKLIBS
$(foreach _,$(basename $(notdir $(wildcard $1/*.pretty))),$(call CHECKLIB,$1,$_))
endef
install:
$(foreach _,$(LIBS),$(call CHECKLIBS,$_))
showrules:
@echo -e '$(subst $(NL),\n,$(foreach _,$(LIBS),$(call CHECKLIBS,$_)))'