#****h* simple_acc/Makefile
# NAME
#  Makefile
# DESCRIPTION
#  Makefile to generate the input logs for simple_acc (simple Adaptive Cruise Control) benchmark
#
# USAGE
#  make
#
#******
MODEL=simple_acc.dot
LENGTH = $(shell seq 10000 10000 100000)
REPEATS = $(shell seq 1 30)
LOGS = $(foreach length,$(LENGTH),$(foreach repeat,$(REPEATS),./logs/simple_acc-$(length)-$(repeat).txt))

all: simple_acc.zip

simple_acc.zip: $(MODEL) $(LOGS)
	zip $@ $^

define GENLOG

./logs/simple_acc-$(1)-%.txt: $(MODEL) ../../build/hamoni-sim
	mkdir -p ./logs
	../../build/hamoni-sim -f $$< -l $(1) > $$@

endef

$(foreach length, $(LENGTH), $(eval $(call GENLOG,$(length))))

clean:
	$(RM) -r logs
