-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
45 lines (33 loc) · 887 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
CC = gcc
CFLAGS = -Wall -Wextra
LDFLAGS = -lm
ifndef build
build=release
endif
ifeq ($(build),release)
CFLAGS += -O3 -fomit-frame-pointer -ffast-math
endif
ifeq ($(build),profile)
CFLAGS += -g3 -pg -fprofile-arcs -ftest-coverage
endif
ifeq ($(build),debug)
CFLAGS += -g3
endif
%.o: %.c
$(CC) $(CFLAGS) -c $<
all: festlearn festclassify
debug:
make build=debug
profile:
make build=profile
festlearn: tree.o forest.o learn.o dataset.o
$(CC) $(CFLAGS) -o festlearn tree.o forest.o learn.o dataset.o $(LDFLAGS)
festclassify: tree.o forest.o classify.o dataset.o
$(CC) $(CFLAGS) -o festclassify tree.o forest.o classify.o dataset.o $(LDFLAGS)
tree.o: tree.c tree.h dataset.h
dataset.o: dataset.c dataset.h
learn.o: learn.c
classify.o: classify.c
forest.o: tree.h forest.c forest.h
clean:
/bin/rm -f svn-commit* *.o *.gcov *.gcda *.gcno gmon.out festlearn festclassify