22 lines
420 B
Makefile
22 lines
420 B
Makefile
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)
|
|
|