giuliomoro@301
|
1 # Bela
|
giuliomoro@64
|
2 # Low-latency, real-time audio and sensor processing on BeagleBone Black
|
l@260
|
3 # (c) 2016 Andrew McPherson, Victor Zappi, Giulio Moro, Liam Donovan
|
giuliomoro@64
|
4 # Centre for Digital Music, Queen Mary University of London
|
giuliomoro@64
|
5
|
giuliomoro@64
|
6 # This Makefile is intended for use on the BeagleBone Black itself
|
giuliomoro@64
|
7 # and not for cross-compiling
|
giuliomoro@64
|
8
|
giuliomoro@386
|
9 .DEFAULT_GOAL := Bela
|
giuliomoro@386
|
10
|
giuliomoro@393
|
11 NO_PROJECT_TARGETS=coreclean distclean stop help iderun idestop iderunup idenostartup
|
giuliomoro@385
|
12 NO_PROJECT_TARGETS_MESSAGE=PROJECT or EXAMPLE should be set for all targets except: $(NO_PROJECT_TARGETS)
|
giuliomoro@385
|
13 # Type `$ make help` to get a description of the functionalities of this Makefile.
|
giuliomoro@385
|
14 help: ## Show this help
|
giuliomoro@385
|
15 @echo 'Usage: make [target] CL=[command line options] [PROJECT=[projectName] | EXAMPLE=[exampleName]]'
|
giuliomoro@386
|
16 @printf "\n$(NO_PROJECT_TARGETS_MESSAGE)\n\n"
|
giuliomoro@386
|
17 @echo 'Targets: (default: $(.DEFAULT_GOAL))'
|
giuliomoro@385
|
18 @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/^\(.*\): .*##\(.*\)/\1:#\2/' | column -t -c 2 -s '#'
|
l@260
|
19
|
giuliomoro@385
|
20 # PROJECT or EXAMPLE must be set for targets that are not included in NO_PROJECT_TARGETS
|
giuliomoro@374
|
21 ifeq (,$(filter $(NO_PROJECT_TARGETS),$(MAKECMDGOALS)))
|
giuliomoro@374
|
22 ifndef PROJECT
|
giuliomoro@374
|
23 ifndef EXAMPLE
|
giuliomoro@385
|
24 $(error $(NO_PROJECT_TARGETS_MESSAGE))
|
giuliomoro@374
|
25 endif
|
giuliomoro@287
|
26 endif
|
l@260
|
27 endif
|
l@260
|
28
|
giuliomoro@374
|
29 # if we are building an example, just copy it to the projects/ folder
|
giuliomoro@386
|
30 # and then treat it as a project
|
giuliomoro@374
|
31 ifdef EXAMPLE
|
giuliomoro@374
|
32 PROJECT?=exampleTempProject
|
giuliomoro@374
|
33 PROJECT_DIR?=$(abspath projects/$(PROJECT))
|
andrewm@380
|
34 $(shell mkdir -p $(abspath projects))
|
giuliomoro@374
|
35 $(shell rm -rf $(PROJECT_DIR))
|
giuliomoro@374
|
36 $(shell cp -r examples/$(EXAMPLE) $(PROJECT_DIR))
|
giuliomoro@374
|
37 else
|
giuliomoro@287
|
38 PROJECT_DIR := $(abspath projects/$(PROJECT))
|
giuliomoro@287
|
39 endif
|
giuliomoro@287
|
40
|
giuliomoro@374
|
41 ifdef PROJECT
|
giuliomoro@393
|
42 $(shell mkdir -p $(PROJECT_DIR)/build build/core)
|
giuliomoro@287
|
43 endif
|
giuliomoro@374
|
44
|
giuliomoro@331
|
45 OUTPUT_FILE?=$(PROJECT_DIR)/$(PROJECT)
|
giuliomoro@331
|
46 COMMAND_LINE_OPTIONS?=$(CL)
|
giuliomoro@331
|
47 RUN_COMMAND?=$(OUTPUT_FILE) $(COMMAND_LINE_OPTIONS)
|
giuliomoro@331
|
48 BELA_STARTUP_SCRIPT?=/root/BeagleRT_startup.sh
|
giuliomoro@359
|
49 BELA_AUDIO_THREAD_NAME?=bela-audio
|
giuliomoro@377
|
50 SCREEN_NAME?=Bela
|
giuliomoro@393
|
51 BELA_IDE_STARTUP_SCRIPT?=/root/BeagleRT_node.sh
|
giuliomoro@393
|
52 BELA_IDE_HOME?=/root/Bela/IDE
|
giuliomoro@393
|
53 BELA_IDE_SCREEN_NAME?=Bela-IDE
|
giuliomoro@393
|
54 BELA_IDE_RUN_COMMAND?=cd $(BELA_IDE_HOME) && screen -S $(BELA_IDE_SCREEN_NAME) -d -m node index.js
|
giuliomoro@393
|
55 BELA_IDE_STOP_COMMAND?=screen -X -S $(BELA_IDE_SCREEN_NAME) quit > /dev/null
|
giuliomoro@374
|
56
|
giuliomoro@64
|
57 RM := rm -rf
|
giuliomoro@64
|
58 STATIC_LIBS := ./libprussdrv.a ./libNE10.a
|
l@260
|
59 LIBS := -lrt -lnative -lxenomai -lsndfile
|
l@260
|
60
|
giuliomoro@244
|
61 # refresh library cache and check if libpd is there
|
giuliomoro@326
|
62 #TEST_LIBPD := $(shell ldconfig; ldconfig -p | grep "libpd\.so") # safest but slower way of checking
|
giuliomoro@326
|
63 LIBPD_PATH = /usr/lib/libpd.so
|
giuliomoro@326
|
64 TEST_LIBPD := $(shell which $(LIBPD_PATH))
|
giuliomoro@326
|
65 ifneq ($(strip $(TEST_LIBPD)), )
|
giuliomoro@244
|
66 # if libpd is there, link it in
|
giuliomoro@244
|
67 LIBS += -lpd -lpthread_rt
|
giuliomoro@244
|
68 endif
|
giuliomoro@64
|
69
|
giuliomoro@241
|
70 CPP_FLAGS := -O3 -march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize
|
giuliomoro@241
|
71 C_FLAGS := $(CPP_FLAGS)
|
giuliomoro@241
|
72
|
giuliomoro@241
|
73 ifndef COMPILER
|
giuliomoro@241
|
74 # check whether clang is installed
|
giuliomoro@385
|
75 TEST_COMPILER := $(shell which clang)
|
giuliomoro@302
|
76 ifneq ($(strip $(TEST_COMPILER)), )
|
giuliomoro@385
|
77 #if it is installed, use it
|
giuliomoro@302
|
78 COMPILER := clang
|
giuliomoro@302
|
79 else
|
giuliomoro@241
|
80 COMPILER := gcc
|
giuliomoro@302
|
81 endif
|
giuliomoro@241
|
82 endif
|
giuliomoro@241
|
83
|
giuliomoro@241
|
84 ifeq ($(COMPILER), clang)
|
giuliomoro@306
|
85 CC=clang
|
giuliomoro@306
|
86 CXX=clang++
|
giuliomoro@302
|
87 CPP_FLAGS += -DNDEBUG
|
giuliomoro@302
|
88 C_FLAGS += -DNDEBUG
|
giuliomoro@241
|
89 else
|
giuliomoro@241
|
90 CC=gcc
|
giuliomoro@241
|
91 CXX=g++
|
giuliomoro@241
|
92 CPP_FLAGS += --fast-math
|
giuliomoro@241
|
93 C_FLAGS += --fast-math
|
giuliomoro@241
|
94 endif
|
giuliomoro@241
|
95
|
l@260
|
96 INCLUDES := -I$(PROJECT_DIR) -I./include -I/usr/include/ne10 -I/usr/xenomai/include -I/usr/arm-linux-gnueabihf/include/xenomai/include -I/usr/arm-linux-gnueabihf/include/ne10
|
andrewm@68
|
97
|
l@260
|
98 ASM_SRCS := $(wildcard $(PROJECT_DIR)/*.S)
|
l@260
|
99 ASM_OBJS := $(addprefix $(PROJECT_DIR)/build/,$(notdir $(ASM_SRCS:.S=.o)))
|
l@260
|
100 ASM_DEPS := $(addprefix $(PROJECT_DIR)/build/,$(notdir $(ASM_SRCS:.S=.d)))
|
giuliomoro@64
|
101
|
l@260
|
102 C_SRCS := $(wildcard $(PROJECT_DIR)/*.c)
|
l@260
|
103 C_OBJS := $(addprefix $(PROJECT_DIR)/build/,$(notdir $(C_SRCS:.c=.o)))
|
l@260
|
104 C_DEPS := $(addprefix $(PROJECT_DIR)/build/,$(notdir $(C_SRCS:.c=.d)))
|
giuliomoro@64
|
105
|
l@260
|
106 CPP_SRCS := $(wildcard $(PROJECT_DIR)/*.cpp)
|
l@260
|
107 CPP_OBJS := $(addprefix $(PROJECT_DIR)/build/,$(notdir $(CPP_SRCS:.cpp=.o)))
|
l@260
|
108 CPP_DEPS := $(addprefix $(PROJECT_DIR)/build/,$(notdir $(CPP_SRCS:.cpp=.d)))
|
giuliomoro@64
|
109
|
giuliomoro@383
|
110 PROJECT_OBJS = $(ASM_OBJS) $(C_OBJS) $(CPP_OBJS)
|
giuliomoro@383
|
111
|
giuliomoro@301
|
112 # Core Bela sources
|
giuliomoro@186
|
113 CORE_CPP_SRCS = $(filter-out core/default_main.cpp, $(wildcard core/*.cpp))
|
giuliomoro@186
|
114 CORE_OBJS := $(addprefix build/core/,$(notdir $(CORE_CPP_SRCS:.cpp=.o)))
|
giuliomoro@186
|
115 CORE_CPP_DEPS := $(addprefix build/core/,$(notdir $(CORE_CPP_SRCS:.cpp=.d)))
|
giuliomoro@64
|
116
|
andrewm@318
|
117 CORE_ASM_SRCS := $(wildcard core/*.S)
|
andrewm@318
|
118 CORE_ASM_OBJS := $(addprefix build/core/,$(notdir $(CORE_ASM_SRCS:.S=.o)))
|
andrewm@318
|
119 CORE_ASM_DEPS := $(addprefix build/core/,$(notdir $(CORE_ASM_SRCS:.S=.d)))
|
andrewm@318
|
120
|
andrewm@318
|
121
|
giuliomoro@64
|
122 # Objects for a system-supplied default main() file, if the user
|
giuliomoro@64
|
123 # only wants to provide the render functions.
|
giuliomoro@64
|
124 DEFAULT_MAIN_CPP_SRCS := ./core/default_main.cpp
|
giuliomoro@64
|
125 DEFAULT_MAIN_OBJS := ./build/core/default_main.o
|
giuliomoro@64
|
126 DEFAULT_MAIN_CPP_DEPS := ./build/core/default_main.d
|
andrewm@68
|
127
|
giuliomoro@334
|
128 Bela: ## Builds the Bela program with all the opimizations
|
giuliomoro@334
|
129 Bela: $(OUTPUT_FILE)
|
giuliomoro@334
|
130
|
giuliomoro@301
|
131 # all = build Bela
|
giuliomoro@334
|
132 all: ## Same as Bela
|
andrewm@69
|
133 all: SYNTAX_FLAG :=
|
giuliomoro@301
|
134 all: Bela
|
andrewm@68
|
135
|
giuliomoro@301
|
136 # debug = buildBela debug
|
giuliomoro@334
|
137 debug: ## Same as Bela but with debug flags and no optimizations
|
giuliomoro@209
|
138 debug: CPP_FLAGS=-g
|
giuliomoro@209
|
139 debug: C_FLAGS=-g
|
giuliomoro@209
|
140 debug: all
|
giuliomoro@209
|
141
|
andrewm@69
|
142 # syntax = check syntax
|
giuliomoro@334
|
143 syntax: ## Only checks syntax
|
andrewm@69
|
144 syntax: SYNTAX_FLAG := -fsyntax-only
|
l@260
|
145 syntax: SYNTAX
|
andrewm@69
|
146
|
giuliomoro@301
|
147 # Rule for Bela core C++ files
|
giuliomoro@64
|
148 build/core/%.o: ./core/%.cpp
|
l@260
|
149 @echo 'Building $(notdir $<)...'
|
giuliomoro@386
|
150 # @echo 'Invoking: C++ Compiler $(CXX)'
|
l@260
|
151 @$(CXX) $(SYNTAX_FLAG) $(INCLUDES) $(CPP_FLAGS) -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
l@260
|
152 @echo ' ...done'
|
giuliomoro@64
|
153 @echo ' '
|
andrewm@68
|
154
|
andrewm@318
|
155 # Rule for Bela core ASM files
|
andrewm@318
|
156 build/core/%.o: ./core/%.S
|
andrewm@318
|
157 @echo 'Building $(notdir $<)...'
|
andrewm@318
|
158 # @echo 'Invoking: GCC Assembler'
|
andrewm@318
|
159 @as -o "$@" "$<"
|
andrewm@318
|
160 @echo ' ...done'
|
andrewm@318
|
161 @echo ' '
|
andrewm@318
|
162
|
giuliomoro@64
|
163 # Rule for user-supplied C++ files
|
l@260
|
164 $(PROJECT_DIR)/build/%.o: $(PROJECT_DIR)/%.cpp
|
l@260
|
165 @echo 'Building $(notdir $<)...'
|
giuliomoro@386
|
166 @echo 'Invoking: C++ Compiler $(CXX)'
|
l@260
|
167 @$(CXX) $(SYNTAX_FLAG) $(INCLUDES) $(CPP_FLAGS) -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
l@260
|
168 @echo ' ...done'
|
giuliomoro@64
|
169 @echo ' '
|
andrewm@68
|
170
|
giuliomoro@64
|
171 # Rule for user-supplied C files
|
l@260
|
172 $(PROJECT_DIR)/build/%.o: $(PROJECT_DIR)/%.c
|
l@260
|
173 @echo 'Building $(notdir $<)...'
|
giuliomoro@386
|
174 # @echo 'Invoking: C Compiler $(CC)'
|
giuliomoro@287
|
175 $(CC) $(SYNTAX_FLAG) $(INCLUDES) $(C_FLAGS) -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" -std=c99
|
l@260
|
176 @echo ' ...done'
|
giuliomoro@64
|
177 @echo ' '
|
andrewm@68
|
178
|
giuliomoro@64
|
179 # Rule for user-supplied assembly files
|
l@260
|
180 $(PROJECT_DIR)/build/%.o: $(PROJECT_DIR)/%.S
|
l@260
|
181 @echo 'Building $(notdir $<)...'
|
l@260
|
182 # @echo 'Invoking: GCC Assembler'
|
l@260
|
183 @as -o "$@" "$<"
|
l@260
|
184 @echo ' ...done'
|
giuliomoro@64
|
185 @echo ' '
|
giuliomoro@64
|
186
|
giuliomoro@64
|
187 # This is a nasty kludge: we want to be able to optionally link in a default
|
giuliomoro@64
|
188 # main file if the user hasn't supplied one. We check for the presence of the main()
|
giuliomoro@64
|
189 # function, and conditionally call one of two recursive make targets depending on whether
|
giuliomoro@64
|
190 # we want to link in the default main file or not. The kludge is the mess of a shell script
|
giuliomoro@64
|
191 # line below. Surely there's a better way to do this?
|
giuliomoro@383
|
192 $(OUTPUT_FILE): $(CORE_ASM_OBJS) $(CORE_OBJS) $(PROJECT_OBJS) $(STATIC_LIBS) $(DEFAULT_MAIN_OBJS)
|
giuliomoro@383
|
193 $(eval DEFAULT_MAIN_CONDITIONAL := $(shell bash -c 'if [ `nm $(PROJECT_OBJS) | grep -w T | grep -w main | wc -l` == '0' ]; then echo "$(DEFAULT_MAIN_OBJS)"; else echo ""; fi'))
|
giuliomoro@287
|
194 @echo 'Invoking: C++ linker'
|
andrewm@318
|
195 @$(CXX) $(SYNTAX_FLAG) -L/usr/xenomai/lib -L/usr/arm-linux-gnueabihf/lib -L/usr/arm-linux-gnueabihf/lib/xenomai -L/usr/lib/arm-linux-gnueabihf -pthread -Wpointer-arith -o "$(PROJECT_DIR)/$(PROJECT)" $(CORE_ASM_OBJS) $(CORE_OBJS) $(DEFAULT_MAIN_CONDITIONAL) $(ASM_OBJS) $(C_OBJS) $(CPP_OBJS) $(STATIC_LIBS) $(LIBS)
|
giuliomoro@287
|
196 @echo 'Finished building target: $@'
|
giuliomoro@333
|
197 @sync
|
l@260
|
198 # Other Targets:
|
l@260
|
199 # This rule compiles c and c++ source files without output or linking
|
l@260
|
200 SYNTAX: $(C_OBJS) $(CPP_OBJS)
|
giuliomoro@64
|
201
|
giuliomoro@385
|
202 projectclean:## Remove the project's build objects & binary
|
giuliomoro@326
|
203 -$(RM) $(PROJECT_DIR)/build/* $(OUTPUT_FILE)
|
giuliomoro@64
|
204 -@echo ' '
|
giuliomoro@64
|
205
|
giuliomoro@386
|
206 clean: ## Same as projectclean
|
giuliomoro@386
|
207 clean: projectclean
|
giuliomoro@386
|
208
|
giuliomoro@386
|
209 coreclean: ## Remove the core's build objects
|
giuliomoro@386
|
210 -$(RM) build/*
|
giuliomoro@386
|
211
|
giuliomoro@386
|
212 prompt:
|
giuliomoro@386
|
213 @printf "Warning: you are about to DELETE the projects/ folder and its content. This operation cannot be undone. Continue? (y/N) "
|
giuliomoro@386
|
214 @read REPLY; if [ $$REPLY != y ] && [ $$REPLY != Y ]; then echo "Aborting..."; exit 1; fi
|
giuliomoro@386
|
215
|
giuliomoro@386
|
216 distclean: ## Restores the Bela folder to a pristine state: remove all the projects source and the built objects, including the core Bela objects.
|
giuliomoro@386
|
217 distclean: prompt distcleannoprompt
|
giuliomoro@386
|
218
|
giuliomoro@386
|
219 distcleannoprompt: ## Same as distclean, but does not prompt for confirmation. Use with care.
|
giuliomoro@326
|
220 -$(RM) build/source/* $(CORE_OBJS) $(CORE_CPP_DEPS) $(DEFAULT_MAIN_OBJS) $(DEFAULT_MAIN_CPP_DEPS) $(OUTPUT_FILE)
|
giuliomoro@64
|
221 -@echo ' '
|
giuliomoro@64
|
222
|
giuliomoro@302
|
223 runfg: run
|
giuliomoro@334
|
224 run: ## Run PROJECT in the foreground
|
giuliomoro@326
|
225 run: stop Bela
|
giuliomoro@327
|
226 @echo "Running $(RUN_COMMAND)"
|
giuliomoro@327
|
227 @cd $(PROJECT_DIR) && $(RUN_COMMAND)
|
giuliomoro@334
|
228 runscreen: ## Run PROJECT in the background (detached screen)
|
giuliomoro@302
|
229 runscreen: stop $(OUTPUT_FILE)
|
giuliomoro@327
|
230 @echo "Running $(RUN_COMMAND) in a screen"
|
giuliomoro@327
|
231 @cd $(PROJECT_DIR) && screen -S $(SCREEN_NAME) -d -m $(RUN_COMMAND)
|
giuliomoro@334
|
232 runscreenfg: ## Run PROJECT in a screen in the foreground (can detach with ctrl-a ctrl-d)
|
giuliomoro@313
|
233 runscreenfg: stop $(OUTPUT_FILE)
|
giuliomoro@327
|
234 @echo "Running $(RUN_COMMAND) in a screen"
|
giuliomoro@327
|
235 @cd $(PROJECT_DIR) && screen -S $(SCREEN_NAME) -m $(RUN_COMMAND)
|
giuliomoro@313
|
236 FIFO_NAME=/tmp/belafifo
|
giuliomoro@334
|
237 runscreenfifo: ## Same as runscreen, but stdout and stderr are piped to the foreground through a fifo
|
giuliomoro@313
|
238 runscreenfifo: stop $(OUTPUT_FILE)
|
giuliomoro@313
|
239 @echo "Running $(RUN_COMMAND), piping output to $(FIFO_NAME)"
|
giuliomoro@313
|
240 @rm -rf $(FIFO_NAME)
|
giuliomoro@313
|
241 @mkfifo $(FIFO_NAME)
|
giuliomoro@327
|
242 @cd $(PROJECT_DIR)
|
giuliomoro@315
|
243 @screen -S $(SCREEN_NAME) -d -m stdbuf -e 0 -i 0 -o 0 bash -c "$(RUN_COMMAND) &> $(FIFO_NAME)"
|
giuliomoro@315
|
244 @cat /tmp/belafifo
|
giuliomoro@302
|
245
|
giuliomoro@331
|
246 STARTUP_COMMAND=printf "\#!/bin/sh\n\#\n\# This file is autogenerated by Bela. Do not edit!\n\necho Running Bela...\nscreen -S $(SCREEN_NAME) -d -m %s $(RUN_COMMAND) %s\n"
|
giuliomoro@334
|
247 nostartup: ## No Bela project runs at startup
|
giuliomoro@331
|
248 nostartup:
|
giuliomoro@331
|
249 @echo "Disabling BeagleRT at startup..."
|
giuliomoro@344
|
250 @printf "#!/bin/sh\n#\n\n# This file is autogenerated by Bela. Do not edit!\n\n# Run on startup disabled -- nothing to do here\n" > $(BELA_STARTUP_SCRIPT)
|
giuliomoro@331
|
251
|
giuliomoro@334
|
252 startuploop: ## Makes PROJECT run at startup and restarts it if it crashes
|
giuliomoro@331
|
253 startuploop: Bela
|
giuliomoro@331
|
254 @echo "Enabling Bela at startup in a loop..."
|
giuliomoro@331
|
255 @$(STARTUP_COMMAND) 'bash -c "while sleep 0.5 ; do echo Running Bela...;' '; done"' > $(BELA_STARTUP_SCRIPT)
|
giuliomoro@331
|
256
|
giuliomoro@334
|
257 startup: ## Makes PROJECT run at startup
|
giuliomoro@331
|
258 startup: Bela
|
giuliomoro@331
|
259 @echo "Enabling Bela at startup..."
|
giuliomoro@331
|
260 @$(STARTUP_COMMAND) > $(BELA_STARTUP_SCRIPT)
|
giuliomoro@331
|
261
|
giuliomoro@334
|
262 stop: ## Stops any Bela program that is currently running
|
giuliomoro@302
|
263 stop:
|
giuliomoro@393
|
264 # @PID=`grep $(BELA_AUDIO_THREAD_NAME) /proc/xenomai/stat | cut -d " " -f 5 | sed s/\s//g`; if [ -z $$PID ]; then echo "No process to kill"; else echo "Killing old Bela process $$PID"; kill -2 $$PID; fi; screen -X -S $(SCREEN_NAME) quit > /dev/null; exit 0;
|
giuliomoro@393
|
265 @PID=`grep $(BELA_AUDIO_THREAD_NAME) /proc/xenomai/stat | cut -d " " -f 5 | sed s/\s//g`; if [ -z $$PID ]; then echo "No process to kill"; else echo "Killing old Bela process $$PID"; fi; screen -X -S $(SCREEN_NAME) quit > /dev/null; exit 0;
|
giuliomoro@64
|
266
|
giuliomoro@393
|
267 iderun: ## Starts the on-board IDE
|
giuliomoro@393
|
268 iderun:
|
giuliomoro@393
|
269 $(BELA_IDE_RUN_COMMAND)
|
giuliomoro@393
|
270
|
giuliomoro@393
|
271 idestop: ## Stops the on-board IDE
|
giuliomoro@393
|
272 @echo TODO
|
giuliomoro@393
|
273 @exit 1
|
giuliomoro@393
|
274
|
giuliomoro@393
|
275 BELA_IDE_STARTUP_COMMAND=printf "\#!/bin/sh\n\#\n\# This file is autogenerated by Bela. Do not edit!\n\necho Running the Bela IDE...\n$(BELA_IDE_RUN_COMMAND)\n" > $(BELA_IDE_STARTUP_SCRIPT)
|
giuliomoro@393
|
276
|
giuliomoro@393
|
277 iderunup: ## Enables the IDE at startup
|
giuliomoro@393
|
278 @echo "Enabling the IDE at startup"
|
giuliomoro@393
|
279 $(BELA_IDE_STARTUP_COMMAND)
|
giuliomoro@393
|
280 @chmod +x $(BELA_IDE_STARTUP_SCRIPT)
|
giuliomoro@393
|
281
|
giuliomoro@393
|
282 idenostartup: ## Disables the IDE at startup
|
giuliomoro@393
|
283 @echo "Disabling the IDE at startup"
|
giuliomoro@393
|
284 @printf "#!/bin/sh\n#\n\n# This file is autogenerated by Bela. Do not edit!\n\n# The Bela IDE is disabled on startup.\n" > $(BELA_IDE_STARTUP_SCRIPT)
|
giuliomoro@393
|
285 .PHONY: all clean distclean help projectclean nostartup startup startuploop debug run runfg runscreen runscreenfg runscreenfifo stop iderun idestop iderunup idenostartup
|