Skip to content

Commit e3dbf17

Browse files
authored
Merge pull request #528 from metala/custom-simavr-path
Makefiles can set custom simavr path
2 parents 2637583 + 2fbe72a commit e3dbf17

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile.common

+8-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@
2727
# along with simavr. If not, see <http://www.gnu.org/licenses/>.
2828

2929
# simavr directory
30+
ifndef SIMAVR
3031
SIMAVR := ${shell for p in . .. ../.. ../../..;do test -d $$p/simavr/sim && echo $$p/simavr; done}
32+
endif
33+
34+
# check if it is found
35+
ifeq ("$(wildcard $(SIMAVR)/sim/)","")
36+
$(warning Simavr path not found. SIMAVR=$(SIMAVR))
37+
endif
3138

3239
# You can override the build settings with local changes in this file
3340
# for example:
@@ -179,7 +186,7 @@ endif
179186
-ffunction-sections -fdata-sections \
180187
-Wl,--relax,--gc-sections \
181188
-Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000 \
182-
-I../simavr/sim/avr -I../../simavr/sim/avr \
189+
-I$(SIMAVR)/sim/avr -I../simavr/sim/avr -I../../simavr/sim/avr \
183190
${^} -o ${@}
184191
@${AVR}size ${@}|sed '1d'
185192

0 commit comments

Comments
 (0)