SHELL = /opt/bin/dash # for tictoc: -O -pthread # CXX = g++ -std=c++17 -pedantic -Wall -g -O -pthread LIST = $(shell awk '{ print $$1; }' LIST) # some vecr/ files won't compile due to missing include's # VLIST = $(shell awk '{ print $$1; }' LIST | egrep -v '(Stack|Queue)' | sed 's/\.cc//') all: LIST make.sh ./make.sh test: @for d in $(LIST); do if [ -d "$$d" ]; then (echo "\n$$d/\n---"; cd $$d; make; ./main < /dev/null); fi; done @for d in $(VLIST); do (echo "\nvecr/$$d\n---"; cd vecr; $(CXX) $$d.cc; ./a.out < /dev/null); done clean: for d in $(LIST); do (if [ -d $$d ]; then cd $$d && make clean; fi); done cd vecr && rm -f a.out core clobber: clean rm -f */*.zip