forked from liuliu/ccv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
37 lines (23 loc) · 777 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
include ../lib/config.mk
LDFLAGS := -L"../lib" -lccv $(LDFLAGS)
CFLAGS := -O3 -Wall -I"../lib" $(CFLAGS)
TARGETS = bbffmt msermatch siftmatch bbfcreate bbfdetect scdcreate scddetect swtcreate swtdetect dpmcreate dpmdetect tld icfcreate icfdetect icfoptimize cifar-10 image-net cnnclassify aflw
TARGET_SRCS := $(patsubst %,%.c,$(TARGETS))
.PHONY: release all clean dep
release: all
include ../lib/scheme.mk
all: libccv.a $(TARGETS) .gitignore
clean:
${MAKE} clean -C ../lib ; rm -f *.o $(TARGETS)
$(TARGETS): %: %.o libccv.a
$(CC) -o $@ $< $(LDFLAGS)
libccv.a:
${MAKE} -C ../lib
%.o: %.c
$(CC) $< -o $@ -c $(CFLAGS)
.gitignore:
echo $(TARGETS) | tr ' ' '\n' > .gitignore
dep: .dep.mk
.dep.mk: $(TARGET_SRCS)
$(CC) $(CFLAGS) -MM $^ > .dep.mk
-include .dep.mk