-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
134 lines (118 loc) · 3.54 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
# library name
lib.name = jl
EXT=src/externals
DEP=src/dependencies
ABS=abstractions
HLP=helpfiles
# input source files
# aaosc~.class.sources = $(EXT)/aaosc~.cpp $(DEP)/jl.cpp.lib/dsp/synthesis/Oscillator.cpp
# hann~.class.sources = $(EXT)/hann~.cpp $(DEP)/jl.cpp.lib/dsp/synthesis/Oscillator.cpp
bibi~.class.sources = $(EXT)/bibi~.cpp
gbend~.class.sources = $(EXT)/gbend~.cpp $(DEP)/cpp-jl/src/dsp/sampler/Gbend.cpp
stut~.class.sources = $(EXT)/stut~.cpp $(DEP)/cpp-jl/src/dsp/effects/temporal/Stut.cpp
sidechain~.class.sources = $(EXT)/sidechain~.cpp $(DEP)/cpp-jl/src/dsp/effects/dynamics/Compress.cpp
flatten~.class.sources = $(EXT)/flatten~.cpp $(DEP)/cpp-jl/src/dsp/effects/dynamics/Compress.cpp
router~.class.sources = $(EXT)/router~.cpp
map.class.sources = $(EXT)/map.cpp
magnetize.class.sources = $(EXT)/magnetize.cpp
routerctrl.class.sources = $(EXT)/routerctrl.cpp
tonnetz.class.sources = $(EXT)/tonnetz.cpp
# all extra files to be included in binary distribution of the library
datafiles = \
$(ABS)/jl-meta.pd \
$(ABS)/jl-objects.pd \
$(HLP)/gbend~-help.pd \
$(HLP)/stut~-help.pd \
$(HLP)/sidechain~-help.pd \
$(HLP)/flatten~-help.pd \
$(HLP)/bibi~-help.pd \
$(HLP)/map-help.pd \
$(HLP)/magnetize-help.pd \
$(HLP)/tonnetz-help.pd \
$(ABS)/split~.pd \
$(HLP)/split~-help.pd \
$(ABS)/merge~.pd \
$(HLP)/merge~-help.pd \
$(ABS)/feedfm~.pd \
$(HLP)/feedfm~-help.pd \
$(ABS)/rmetro.pd \
$(HLP)/rmetro-help.pd \
$(ABS)/lr2ms~.pd \
$(HLP)/lr2ms~-help.pd \
$(ABS)/ms2lr~.pd \
$(HLP)/ms2lr~-help.pd \
$(ABS)/mtosf.pd \
$(HLP)/mtosf-help.pd \
$(ABS)/slideflute~.pd \
$(HLP)/slideflute~-help.pd \
$(ABS)/spitchshift~.pd \
$(ABS)/gpan-unit~.pd \
$(ABS)/gdelay-unit~.pd \
$(ABS)/gdelay~.pd \
$(HLP)/gdelay~-help.pd \
$(ABS)/gflow-unit~.pd \
$(ABS)/gflow~.pd \
$(HLP)/gflow~-help.pd \
$(ABS)/guzi-unit~.pd \
$(ABS)/guzi~.pd \
$(HLP)/guzi~-help.pd \
$(ABS)/dirac~.pd \
$(HLP)/dirac~-help.pd \
$(ABS)/bitcrush~.pd \
$(HLP)/bitcrush~-help.pd \
$(ABS)/decimate~.pd \
$(HLP)/decimate~-help.pd \
$(ABS)/logdelay-unit~.pd \
$(ABS)/logdelay~.pd \
$(ABS)/pulse.pd \
$(HLP)/pulse-help.pd \
$(ABS)/keynote.pd \
$(HLP)/keynote-help.pd \
$(ABS)/keyboard.pd \
$(HLP)/keyboard-help.pd \
$(ABS)/envgen.pd \
$(HLP)/envgen-help.pd \
$(ABS)/routerctrl-ui.pd \
$(ABS)/switchcontrol.pd \
# update path to reflect your environment
# PDLIBDIR="/Users/larralde/Documents/Pd/externals"
UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
PDLIBDIR="./build/darwin"
endif
ifeq ($(UNAME),Linux)
PDLIBDIR="/usr/local/lib/pd-externals"
endif
ifeq (MINGW,$(findstring MINGW,$(UNAME)))
PDLIBDIR="./build/win32"
PDINCLUDEDIR="/c/Program\ Files/Pd/src"
PDBINDIR="/c/Program\ Files/Pd/bin"
endif
SRCOUT=./build/source/jl
# this is needed for initializer lists
cflags += -std=c++2a
# cflags += -stdlib=libstdc++
# CC=gcc
# CC=clang++
CC=g++
# this is needed for use of <vector> (!?)
ifeq ($(UNAME),Darwin)
cflags += -mmacosx-version-min=10.9
endif
cflags += -c
# include Makefile.pdlibbuilder from submodule directory 'pd-lib-builder'
# update path to reflect your environment
PDLIBBUILDER_DIR=$(DEP)/pd-lib-builder/
include $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder
# found here
# https://stackoverflow.com/questions/4822321/remove-all-git-files-from-a-directory
source:
rm -rf "$(SRCOUT)";
mkdir "$(SRCOUT)";
cp Makefile "$(SRCOUT)";
mkdir "$(SRCOUT)/patches";
cp $(datafiles) "$(SRCOUT)/patches";
# cp -r ./abstractions ./jl/abstractions;
# cp -r ./helpfiles ./jl/helpfiles;
cp -r ./src "$(SRCOUT)/src";
(find $(SRCOUT) -name ".git" && find $(SRCOUT) -name ".gitignore" && find $(SRCOUT) -name ".gitmodules") | xargs rm -rf;