aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 11e4f116f9f48e5d56dea9058cfc2cae3719c935 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
APP=km-test
CFLAGS=-W -Wall -Wextra -Werror -pedantic -std=c11 -O2 -fopenmp
OBJS=src/km-set.o src/km-draw.o src/km-load.o src/km-find.o \
     src/km-rand.o src/km-solve.o src/km-init-rand.o src/main.o \
     src/km-init-forgy.o src/km-init-kmeans.o src/km-init.o \
     src/km-rand-libc.o src/km-rand-path.o src/km-rand-erand48.o \
     src/km-set-print.o
LIBS=-lm

.PHONY=all clean
all: $(APP)

$(APP): $(OBJS)
	$(CC) $(CFLAGS) -o $(APP) $(OBJS) $(LIBS)

%.o: src/%.c
	$(CC) -c $(CFLAGS) $<

clean:
	$(RM) $(APP) $(OBJS)