-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile.Linux
executable file
·62 lines (45 loc) · 1.67 KB
/
Makefile.Linux
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
CC = g++
# These paths need to be configured, depending on where cblas.h
# and libcblas.so are located
BLASINCLUDE = /usr/include/cblas.h
BLASFLAGSINCLUDE = -I/usr/include
BLASFLAGSLIB = -L/usr/lib64/atlas
CPPFLAGS = -Wall -O3 -std=c++0x
OPTIMFLAGS = -funroll-loops -ffast-math
CXXFLAGS = -lm -lblas -g $(CPPFLAGS) $(OPTIMFLAGS) $(BLASFLAGSINCLUDE)
LDFLAGS = -lcblas $(BLASFLAGSLIB)
SRCDIR = DependencyTreeRNN++
INCLUDES = $(BLASINCLUDE) $(SRCDIR)/*.h
OBJDIR = build
OBJ = $(OBJDIR)/ReadJson.o \
$(OBJDIR)/CorpusUnrollsReader.o \
$(OBJDIR)/CommandLineParser.o \
$(OBJDIR)/Vocabulary.o \
$(OBJDIR)/RnnWeights.o \
$(OBJDIR)/RnnLib.o \
$(OBJDIR)/RnnTraining.o \
$(OBJDIR)/RnnDependencyTreeLib.o \
$(OBJDIR)/main.o
all: $(OBJ) RnnDependencyTree
$(OBJDIR)/ReadJson.o: $(SRCDIR)/ReadJson.cpp $(INCLUDES)
$(CC) $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/CorpusUnrollsReader.o: $(SRCDIR)/CorpusUnrollsReader.cpp $(INCLUDES)
$(CC) $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/CommandLineParser.o: $(SRCDIR)/CommandLineParser.cpp $(INCLUDES)
$(CC) $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/Vocabulary.o: $(SRCDIR)/Vocabulary.cpp $(INCLUDES)
$(CC) $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/RnnWeights.o: $(SRCDIR)/RnnWeights.cpp $(INCLUDES)
$(CC) $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/RnnLib.o: $(SRCDIR)/RnnLib.cpp $(INCLUDES)
$(CC) $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/RnnTraining.o: $(SRCDIR)/RnnTraining.cpp $(INCLUDES)
$(CC) $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/RnnDependencyTreeLib.o: $(SRCDIR)/RnnDependencyTreeLib.cpp $(INCLUDES)
$(CC) $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/main.o: $(SRCDIR)/main.cpp $(INCLUDES)
$(CC) $(CXXFLAGS) -c -o $@ $<
RnnDependencyTree: $(OBJ)
$(CC) -o $@ $^ $(LDFLAGS)
clean:
rm -rf $(OBJDIR)/*.o