HOSTNAME = $(shell uname -n)

or

HOSTNAME = $(shell hostname)



After that, you can call the hostname as  $(HOSTNAME)


I added other example


MKDIR:= $(shell echo $(ARDMK_DIR))

include $(MKDIR)/arduino-mk/Arduino.mk


posted by citadel