-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
77 lines (53 loc) · 2.04 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
CC=gcc
CFLAGS=-O3 -DNDEBUG -D_POSIX_C_SOURCE=200809L -Wall -std=c99 -pedantic
#CFLAGS=-O3 -DNDEBUG -D_GNU_SOURCE -Wall -std=c99 -pedantic
#CFLAGS=-O3 -save-temps -D_GNU_SOURCE -Wall -std=c99 -pedantic
LIBS=-lm
TARGETS=fastsubs fastsubs-omp fastsubs-test lmheap-test lm-test sentence-test wordsub wordsub-n
all: ${TARGETS}
fastsubs-omp: fastsubs-omp.o fastsubs.o lm.o ngram.o sentence.o heap.o dlib.o
$(CC) -fopenmp $(CFLAGS) $^ $(LIBS) -o $@
fastsubs-omp.o: fastsubs-omp.c fastsubs.h
$(CC) -c -fopenmp $(CFLAGS) $< -o $@
fastsubs: fastsubs-main.o fastsubs.o lm.o ngram.o sentence.o heap.o dlib.o
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
fastsubs-main.o: fastsubs-main.c fastsubs.h
$(CC) -c $(CFLAGS) $< -o $@
fastsubs-test: fastsubs-test.o fastsubs.o lm.o ngram.o sentence.o heap.o dlib.o
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
fastsubs-test.o: fastsubs-test.c fastsubs.h
$(CC) -c $(CFLAGS) $< -o $@
fastsubs.o: fastsubs.c fastsubs.h lm.h sentence.h ngram.h heap.h
$(CC) -c $(CFLAGS) $< -o $@
lmheap-test: lmheap-test.o lm.o ngram.o heap.o dlib.o sentence.o
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
lmheap-test.o: lmheap-test.c lm.h
$(CC) -c $(CFLAGS) $< -o $@
lm-test: lm-test.o lm.o ngram.o dlib.o heap.o sentence.o
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
lm-test.o: lm-test.c lm.h
$(CC) -c $(CFLAGS) $< -o $@
lm.o: lm.c lm.h ngram.h
$(CC) -c $(CFLAGS) $< -o $@
sentence-test: sentence-test.o sentence.o lm.o ngram.o dlib.o heap.o
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
sentence-test.o: sentence-test.c sentence.h
$(CC) -c $(CFLAGS) $< -o $@
sentence.o: sentence.c sentence.h token.h lm.h dlib.h
$(CC) -c $(CFLAGS) $< -o $@
ngram.o: ngram.c ngram.h token.h dlib.h
$(CC) -c $(CFLAGS) $< -o $@
heap.o: heap.c heap.h token.h
$(CC) -c $(CFLAGS) $< -o $@
wordsub: wordsub.o dlib.o
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
wordsub.o: wordsub.c dlib.h
$(CC) -c $(CFLAGS) $< -o $@
wordsub-n: wordsub-n.o dlib.o
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
wordsub-n.o: wordsub-n.c dlib.h
$(CC) -c $(CFLAGS) $< -o $@
dlib.o: dlib.c dlib.h
$(CC) -c $(CFLAGS) $< -o $@
clean:
-rm -f *.o *.i *.s *~ ${TARGETS}