mirror of
https://github.com/Steffo99/unimore-hpc-assignments.git
synced 2024-11-24 17:14:23 +00:00
27 lines
527 B
Makefile
27 lines
527 B
Makefile
|
# C compiler
|
||
|
CC = gcc
|
||
|
CC_FLAGS = -g -fopenmp -O2
|
||
|
|
||
|
kmeans: cluster.o getopt.o kmeans.o kmeans_clustering.o
|
||
|
$(CC) $(CC_FLAGS) cluster.o getopt.o kmeans.o kmeans_clustering.o -o kmeans
|
||
|
|
||
|
%.o: %.[ch]
|
||
|
$(CC) $(CC_FLAGS) $< -c
|
||
|
|
||
|
cluster.o: cluster.c
|
||
|
$(CC) $(CC_FLAGS) cluster.c -c
|
||
|
|
||
|
getopt.o: getopt.c
|
||
|
$(CC) $(CC_FLAGS) getopt.c -c
|
||
|
|
||
|
kmeans.o: kmeans.c
|
||
|
$(CC) $(CC_FLAGS) kmeans.c -c
|
||
|
|
||
|
kmeans_clustering.o: kmeans_clustering.c kmeans.h
|
||
|
$(CC) $(CC_FLAGS) kmeans_clustering.c -c
|
||
|
|
||
|
clean:
|
||
|
rm -f *.o *~ kmeans
|
||
|
|
||
|
run: kmeans
|
||
|
./run
|