3 HN := $(shell hostname)
4 TILABHOSTS := $(shell echo ti{1..41}) apps1
7 ifeq ($(findstring $(HN), $(TILABHOSTS)), $(HN))
8 DPROGFLAGS := -d /dev/ttyS0 -b 9600
10 ifeq ($(findstring $(HN), $(STEFANHOST)), $(HN))
11 DPROGFLAGS := -d /dev/ttyS0 -b 115200
13 DPROGFLAGS := -d /dev/ttyUSB0 -b 115200
22 gcc -x c -E -C -P $< > $@
26 ../3a_asm/dtas < $< > $@
33 ../tools/dtprog.py $< $(DPROGFLAGS)
35 %.s_pre_sim: %.s dt_inc.s
37 gcc -x c -E -C -P -DDTSIM $< > $@
39 %.dthex_sim: %.s_pre_sim
41 ../3a_asm/dtas < $< > $@
48 cd ../3b_sim/; ./sim -f ../progs/$<
50 .PHONY: clean buildtools
52 rm -rf *.dthex *.s_pre *.dthex_sim *.s_pre_sim