CC=clang CFLAGS= -g -std=c99 -Wall -pedantic -L. -lruntime SRC=ipc.c pa23.c proc.c banking.c bank_robbery.c HDR=proc.h assign=pa2 all: $(assign) $(assign).tar.gz: $(SRC) $(HDR) mkdir -p $(assign) cp $^ $(assign) tar -cjf $(assign).tar.gz $(assign) rm -r $(assign) $(assign): $(SRC) $(CC) $(CFLAGS) $^ -o $@ run: $(assign) LD_LIBRARY_PATH="$(CURDIR)/../pa2345_starter_code/lib64" \ LD_PRELOAD="$(CURDIR)/../pa2345_starter_code/lib64/libruntime.so" \ ./$(assign) -p 3 10 20 30 debug: $(assign) rm -f str.* LD_LIBRARY_PATH="$(CURDIR)/../pa2345_starter_code/lib64" \ LD_PRELOAD="$(CURDIR)/../pa2345_starter_code/lib64/libruntime.so" \ strace -ffo str ./$(assign) -p 3 10 20 30 clean: rm -f $(assign).tar.gz pipes.log events.log $(assign) .PHONY: run debug clean