aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: f69b5267ff22f4bd293d0b1e611085d1993e1559 (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
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)