aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 5796eb4b9a8c3ef3ec15cf4a66ae546dff57028d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# to cross-compile:
# WIN32_APP=km-test.exe
# WIN32_CC=x86_64-w64-mingw32-gcc
# WIN32_CFLAGS=-W -Wall -Wextra -Werror -pedantic -std=c11 -O2 -D__USE_MINGW_ANSI_STDIO=1
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)