csci5451/assignments/02/Makefile

20 lines
284 B
Makefile
Raw Normal View History

2023-10-23 00:38:42 +00:00
.PHONY: all clean
CC := cc
2023-10-30 09:09:03 +00:00
CFLAGS := -g
LDFLAGS := -g
2023-10-23 00:38:42 +00:00
CFLAGS += $(shell pkg-config --cflags mpi)
LDFLAGS += $(shell pkg-config --libs mpi)
all: qs_mpi
qs_mpi: qs_mpi.o
2023-10-29 21:34:22 +00:00
$(CC) $^ $(CFLAGS) $(LDFLAGS) -o $@
2023-10-23 00:38:42 +00:00
qs_mpi.o: qs_mpi.c
$(CC) $(CFLAGS) -c -o $@ $^
clean:
rm -f qs_mpi *.o