-
Notifications
You must be signed in to change notification settings - Fork 33
/
Makefile.misc
61 lines (51 loc) · 3.38 KB
/
Makefile.misc
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
# The joint segmentor or postagger decoder
SRC_JOINT = $(SRC_CHINESE)/joint
DIST_JOINT = $(DIST_DIR)/joint
OBJECT_JOINT = $(OBJECT_DIR)/joint
$(OBJECT_JOINT):
$(MKDIR) $(OBJECT_JOINT)
$(DIST_JOINT):
$(MKDIR) $(DIST_JOINT)
$(OBJECT_JOINT)/postagger: $(OBJECT_JOINT)
$(MKDIR) $(OBJECT_JOINT)/postagger
$(DIST_JOINT)/postagger: $(DIST_JOINT)
$(MKDIR) $(DIST_JOINT)/postagger
joint.postagger: $(OBJECT_DIR) $(DIST_DIR) $(DIST_JOINT)/postagger $(OBJECT_JOINT)/postagger $(DIST_JOINT)/postagger/postagger $(DIST_JOINT)/postagger/train
@echo The joint segmentor postagger is successfully compiled into $(DIST_JOINT)/postagger
$(OBJECT_JOINT)/postagger.o: $(SRC_JOINT)/postagger/reranker.h $(SRC_JOINT)/postagger/reranker.cpp
$(CXX) $(CXXFLAGS) -I$(SRC_CHINESE) -I$(SRC_SEGMENTOR) -I$(SRC_SEGMENTOR)/implementations/$(SEGMENTOR_IMPL) -I$(SRC_TAGGER) -I$(SRC_TAGGER)/implementations/$(CHINESE_TAGGER_IMPL) -c $(SRC_JOINT)/postagger/reranker.cpp -o $(OBJECT_JOINT)/postagger.o
$(DIST_JOINT)/postagger/postagger: $(OBJECT_JOINT)/postagger.o $(OBJECT_DIR)/segmentor.o $(OBJECT_DIR)/chinese.postagger.o $(OBJECT_TAGGER)/weight.o $(OBJECT_DIR)/reader.o $(OBJECT_DIR)/writer.o $(SRC_JOINT)/postagger/main.cpp
$(CXX) $(CXXFLAGS) -I$(SRC_CHINESE) -I$(SRC_SEGMENTOR) -I$(SRC_SEGMENTOR)/implementations/$(SEGMENTOR_IMPL) -I$(SRC_TAGGER) -I$(SRC_TAGGER)/implementations/$(CHINESE_TAGGER_IMPL) -c $(SRC_JOINT)/postagger/main.cpp -o $(OBJECT_JOINT)/postagger/main.o
$(LD) $(LDFLAGS) -o $(DIST_JOINT)/postagger/postagger $(OBJECT_JOINT)/postagger/main.o $(OBJECT_JOINT)/postagger.o $(OBJECT_DIR)/segmentor.o $(OBJECT_DIR)/chinese.postagger.o $(OBJECT_TAGGER)/weight.o $(OBJECT_DIR)/reader.o $(OBJECT_DIR)/writer.o $(OBJECT_DIR)/options.o
$(DIST_JOINT)/postagger/train: $(OBJECT_JOINT)/postagger.o $(OBJECT_DIR)/segmentor.o $(OBJECT_DIR)/chinese.postagger.o $(OBJECT_TAGGER)/weight.o $(OBJECT_DIR)/reader.o $(OBJECT_DIR)/writer.o $(SRC_JOINT)/postagger/train.cpp
$(CXX) $(CXXFLAGS) -I$(SRC_CHINESE) -I$(SRC_SEGMENTOR) -I$(SRC_SEGMENTOR)/implementations/$(SEGMENTOR_IMPL) -I$(SRC_TAGGER) -I$(SRC_TAGGER)/implementations/$(CHINESE_TAGGER_IMPL) -c $(SRC_JOINT)/postagger/train.cpp -o $(OBJECT_JOINT)/postagger/train.o
$(LD) $(LDFLAGS) -o $(DIST_JOINT)/postagger/train $(OBJECT_JOINT)/postagger/train.o $(OBJECT_JOINT)/postagger.o $(OBJECT_DIR)/segmentor.o $(OBJECT_DIR)/chinese.postagger.o $(OBJECT_TAGGER)/weight.o $(OBJECT_DIR)/reader.o $(OBJECT_DIR)/writer.o $(OBJECT_DIR)/options.o
#----------------------------------------------------------------
#
# the test program
#
#----------------------------------------------------------------
test: $(SRC_DIR)/test.cpp $(OBJECT_DIR) $(DIST_DIR) $(SRC_INCLUDES)/bitarray.h $(OBJECTS)
$(CXX) $(CXXFLAGS) -DDEBUG -c $(SRC_DIR)/test.cpp -o $(OBJECT_DIR)/test.o
$(LD) $(LDFLAGS) -o $(DIST_DIR)/test $(OBJECT_DIR)/reader.o $(OBJECT_DIR)/writer.o $(OBJECT_DIR)/options.o $(OBJECT_DIR)/test.o $(OBJECT_DIR)/linguistics/conll.o
#----------------------------------------------------------------
#
# make docs
#
#----------------------------------------------------------------
docs:
$(MAKE) -C doc/
clean.docs:
$(MAKE) -C doc/ clean
#----------------------------------------------------------------
#
# make clean
#
#----------------------------------------------------------------
clean: clean.ge clean.en clean.es clean.zh
rm -rf $(OBJECT_DIR)
rm -f test.o
rm -f test.exe
rm -rf $(DIST_DIR)
$(MKDIR) dist
$(MKDIR) obj