Last active
February 25, 2018 19:57
-
-
Save RcColes/7d030a3e2e5016a997dd69e23f83d677 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile | |
EXE=d2q9-bgk | |
CC=gcc | |
CFLAGS= -std=c99 -Wall -O3 | |
LIBS = -lm | |
SIZES = 128 256 | |
FINAL_STATE_FILE=./final_state.dat | |
AV_VELS_FILE=./av_vels.dat | |
$(EXE): $(EXE).c | |
$(CC) $(CFLAGS) $^ $(LIBS) -o $@ | |
all: $(SIZES) | |
$(SIZES): | |
@make $(EXE) 1>/dev/null && \ | |
./$(EXE) input_$@x$@.params obstacles_$@x$@.dat && \ | |
python2 check/check.py --ref-av-vels-file=check/$@x$@.av_vels.dat --ref-final-state-file=check/$@x$@.final_state.dat --av-vels-file=$(AV_VELS_FILE) --final-state-file=$(FINAL_STATE_FILE) &>/dev/null && echo -e "\\e[32mPASSED\\e[39m\n" || echo -e "\\e[31mFAILED\\e[39m\n" | |
check: | |
python2 check/check.py --ref-av-vels-file=$(REF_AV_VELS_FILE) --ref-final-state-file=$(REF_FINAL_STATE_FILE) --av-vels-file=$(AV_VELS_FILE) --final-state-file=$(FINAL_STATE_FILE) | |
.PHONY: all check clean | |
clean: | |
rm -f $(EXE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment