UniTO/anno2/YearI/SecondSem/SCPD/exercises/ex3/makefile

23 lines
420 B
Makefile
Raw Normal View History

2018-11-22 13:09:11 +01:00
CC=mpicc
SRC=src/ex3.c
ALL= $(SRC)
LOCPATH= ./bin
DEBFLAGS= -g -Wall -DDEBUG
NAME= ex3
all:
mkdir -p $(LOCPATH)
$(CC) $(ALL) -o $(LOCPATH)/$(NAME)
debug:
mkdir -p $(LOCPATH)/debug
$(CC) $(ALL) -o $(LOCPATH)/debug/$(NAME)_debug $(DEBFLAGS)
clean:
rm $(LOCPATH)/$(NAME)
rm $(LOCPATH)/debug/$(NAME)_debug
distclean:
rm -r $(LOCPATH)
run: all
@echo -e "\e[1;31m[Source Compiled] Running.\e[0m"
$(LOCPATH)/$(NAME)