Day 16/part 1: bash version

This commit is contained in:
2021-01-06 13:32:56 +01:00
parent 0f962b6f83
commit 88f13ab3a6
5 changed files with 410 additions and 0 deletions

30
day16/Makefile Normal file
View File

@@ -0,0 +1,30 @@
INPUT := INPUT.txt
SHELL := /bin/bash
#CFLAGS := -w -g
#CFLAGS := -w -g -pg
CFLAGS := -w -O3
TIME := \time -f "\ttime: %E real, %U user, %S sys\n\tcontext-switch:\t%c+%w, page-faults: %F+%R\n"
export PATH := .:$(PATH)
.PHONY: clean all compile deploy ex1 ex2
all: ex1 ex2
output:
@$(MAKE) --no-print-directory all 2>&1 > OUTPUT
compile: ex1-c ex2-c
ex1:
@$(TIME) ex1.bash < $(INPUT) 2>&1
@#$(TIME) ex1-c 2020 < $(INPUT) 2>&1
ex2:
@#$(TIME) ex1.bash 30000000 < $(INPUT) 2>&1
@#$(TIME) ex1-c 30000000 < $(INPUT) 2>&1
clean:
@rm -f ex1-c ex2-c core
deploy:
@$(MAKE) -C .. deploy