-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathMakefile.zpar.ge
92 lines (77 loc) · 4.56 KB
/
Makefile.zpar.ge
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# currently support only agenda
GENERIC_TAGGER_IMPL = $(TAGGER_IMPL)
# currently support nivre, combined implementations (other implementations are not generalized)
GENERIC_DEPPARSER_IMPL = $(DEPPARSER_IMPL)
GENERIC_DEPPARSER_LABELED = true
# current naive
GENERIC_DEPLABELER_IMPL = naive
# currently support sr implementations
GENERIC_CONPARSER_IMPL = $(CONPARSER_IMPL)
GENERIC_CONPARSER_D = -DGENERIC_CONLABEL_SIZE=12
#===================================================================
SRC_GENERIC = $(SRC_DIR)/generic
SRC_GENERIC_TAGGER = $(SRC_COMMON)/tagger
DIST_GENERIC_TAGGER = $(DIST_DIR)/generic.postagger
OBJECT_GENERIC_TAGGER = $(OBJECT_DIR)/generic.postagger
$(DIST_GENERIC_TAGGER):
$(MKDIR) $(DIST_GENERIC_TAGGER)
$(OBJECT_GENERIC_TAGGER):
$(MKDIR) $(OBJECT_GENERIC_TAGGER)
SRC_GENERIC_DEPPARSER = $(SRC_COMMON)/depparser
DIST_GENERIC_DEPPARSER = $(DIST_DIR)/generic.depparser
OBJECT_GENERIC_DEPPARSER = $(OBJECT_DIR)/generic.depparser
ifeq ($(GENERIC_DEPPARSER_LABELED), true)
GENERIC_DEPPARSER_D = -DLABELED
endif
ifeq ($(GENERIC_DEPPARSER_IMPL), combined)
GENERIC_DEPPARSER_D := $(GENERIC_DEPPARSER_D) -DCOMBINED
GENERIC_DEPPARSER_IMPL = nivre
endif
SRC_GENERIC_CONPARSER = $(SRC_COMMON_CONPARSER)
DIST_GENERIC_CONPARSER = $(DIST_DIR)/generic.conparser
OBJECT_GENERIC_CONPARSER = $(OBJECT_DIR)/generic.conparser
#===================================================================
SRC_GENERIC_DEPLABELER = $(SRC_COMMON_DEPLABELER)
DIST_GENERIC_DEPLABELER = $(DIST_DIR)/generic.deplabeler
OBJECT_GENERIC_DEPLABELER = $(OBJECT_DIR)/generic.deplabeler
ifneq ("$(wildcard Makefile.d/Makefile.ge.conparser.$(TAGGER_IMPL))","")
include Makefile.d/Makefile.ge.conparser.$(CONPARSER_IMPL)
else
ifneq ("$(wildcard $(SRC_COMMON_CONPARSER)/implementations/$(GENERIC_CONPARSER_IMPL)/Makefile)","")
include $(SRC_COMMON_CONPARSER)/implementations/$(GENERIC_CONPARSER_IMPL)/Makefile
else
include Makefile.d/Makefile.ge.conparser
endif
endif
ifneq ("$(wildcard Makefile.d/Makefile.ge.depparser.$(TAGGER_IMPL))","")
include Makefile.d/Makefile.ge.depparser.$(DEPPARSER_IMPL)
else
ifneq ("$(wildcard $(SRC_GENERIC_DEPPARSER)/implementations/$(GENERIC_DEPPARSER_IMPL)/Makefile)","")
include $(SRC_GENERIC_DEPPARSER)/implementations/$(GENERIC_DEPPARSER_IMPL)/Makefile
else
include Makefile.d/Makefile.ge.depparser
endif
endif
ifneq ("$(wildcard Makefile.d/Makefile.ge.deplabeler.$(TAGGER_IMPL))","")
include Makefile.d/Makefile.ge.deplabeler.$(DEPPARSER_IMPL)
else
ifneq ("$(wildcard $(SRC_COMMON_DEPLABELER)/implementations/$(GENERIC_DEPLABELER_IMPL)/Makefile)","")
include $(SRC_COMMON_DEPLABELER)/implementations/$(GENERIC_DEPLABELER_IMPL)/Makefile
else
include Makefile.d/Makefile.ge.deplabeler
endif
endif
ifneq ("$(wildcard Makefile.d/Makefile.ge.postagger.$(TAGGER_IMPL))","")
include Makefile.d/Makefile.ge.postagger.$(TAGGER_IMPL)
else
ifneq ("$(wildcard $(SRC_GENERIC_TAGGER)/implementations/$(GENERIC_TAGGER_IMPL)/Makefile)","")
include $(SRC_GENERIC_TAGGER)/implementations/$(GENERIC_TAGGER_IMPL)/Makefile
else
include Makefile.d/Makefile.ge.postagger
endif
endif
zpar.ge: $(OBJECT_DIR) $(OBJECT_DIR)/pos.ge.o $(OBJECT_DIR)/cfg.ge.o $(OBJECT_DIR)/deplabel.ge.o $(DIST_DIR) $(OBJECT_DIR)/generic.postagger.o $(OBJECT_GENERIC_TAGGER)/weight.o $(OBJECT_DIR)/generic.conparser.o $(OBJECT_DIR)/constituent.ge.o $(OBJECT_GENERIC_CONPARSER)/weight.o $(OBJECT_DIR)/generic.depparser.o $(OBJECT_GENERIC_DEPPARSER)/weight.o $(OBJECT_DIR)/generic.deplabeler.o $(OBJECT_GENERIC_DEPLABELER)/weight.o $(OBJECTS)
$(CXX) $(CXXFLAGS) -DTARGET_LANGUAGE=generic $(GENERIC_DEPPARSER_D) -I$(SRC_GENERIC) -I$(SRC_GENERIC_TAGGER) -I$(SRC_GENERIC_TAGGER)/implementations/$(GENERIC_TAGGER_IMPL) -I$(SRC_GENERIC_CONPARSER) -I$(SRC_GENERIC_CONPARSER)/implementations/$(GENERIC_CONPARSER_IMPL) -I$(SRC_GENERIC_DEPPARSER) -I$(SRC_GENERIC_DEPPARSER)/implementations/$(GENERIC_DEPPARSER_IMPL) -I$(SRC_GENERIC_DEPLABELER) -I$(SRC_GENERIC_DEPLABELER)/implementations/$(GENERIC_DEPLABELER_IMPL) -c $(SRC_GENERIC)/zpar.ge.cpp -o $(OBJECT_DIR)/zpar.ge.o
$(LD) $(LDFLAGS) -o $(DIST_DIR)/zpar $(OBJECT_DIR)/zpar.ge.o $(OBJECT_DIR)/generic.postagger.o $(OBJECT_GENERIC_TAGGER)/weight.o $(OBJECT_DIR)/generic.conparser.o $(OBJECT_DIR)/constituent.ge.o $(OBJECT_GENERIC_CONPARSER)/weight.o $(OBJECT_DIR)/generic.depparser.o $(OBJECT_GENERIC_DEPPARSER)/weight.o $(OBJECT_DIR)/generic.deplabeler.o $(OBJECT_GENERIC_DEPLABELER)/weight.o $(OBJECT_DIR)/pos.ge.o $(OBJECT_DIR)/cfg.ge.o $(OBJECT_DIR)/deplabel.ge.o $(OBJECTS)
@echo The generic zpar.ge system compiled successfully into $(DIST_DIR).
clean.ge: clean.ge.postagger clean.ge.conparser clean.ge.depparser clean.ge.deplabeler