1
Fork 0
mirror of https://github.com/Steffo99/unimore-hpc-assignments.git synced 2024-11-29 11:34:21 +00:00
hpc-2022-g3/profile/gemmv2/Makefile
Alessandro Capotondi b2b6809b64 Gemm for profiling
2022-10-24 00:13:55 +02:00

28 lines
401 B
Makefile

ifndef EXERCISE
EXERCISE=gemmv2.c
endif
CC=gcc
LD=ld
OBJDUMP=objdump
OPT=-O2 -pg
CFLAGS=$(OPT) $(OMP) -I. -I../ $(EXT_CFLAGS)
LDFLAGS=-lm $(EXT_LDFLAGS)
SRCS=../utils.c
OBJS=$(SRCS:.c=.o) $(EXERCISE:.c=.o)
EXE=$(EXERCISE:.c=.exe)
$(EXE): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS)
all: $(EXE)
.PHONY: run clean
run: $(EXE)
./$(EXE) $(EXT_ARGS)
clean:
rm -f $(OBJS) *.o *.exe *.out *~