This repository has been archived by the owner on Jun 4, 2019. It is now read-only.
/
Makefile
123 lines (93 loc) · 3.4 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
TOP=..
##############################################################################
# Variables
##############################################################################
TARGET=lib
SRC=cairo_helpers.ml custom_list_generic.ml async.ml \
flag_visual.ml help.ml \
style2.ml \
parsing2.ml \
editor_connection.ml \
model2.ml \
completion2.ml \
draw_common.ml draw_labels.ml draw_legend.ml \
draw_macrolevel.ml draw_microlevel.ml \
view2.ml
#experimental: future.ml \ ancient2.ml \ completion.ml \
SYSLIBS=str.cma unix.cma dbm.cma threads.cma lablgtk.cma
LIBS=$(TOP)/commons/commons.cma $(TOP)/commons/commons_gui.cma \
$(TOP)/commons/commons_features.cma \
$(TOP)/globals/globals.cma \
INCLUDEDIRS=$(TOP)/commons $(TOP)/globals \
$(TOP)/h_program-lang \
$(TOP)/h_visualization \
$(TOP)/h_program-visual \
$(TOP)/lang_php/parsing \
$(TOP)/lang_php/analyze \
$(TOP)/lang_php/analyze/basic $(TOP)/lang_php/analyze/foundation \
$(TOP)/lang_php/analyze/finder \
$(TOP)/lang_php/analyze/checker \
$(TOP)/lang_php/analyze/database \
$(TOP)/lang_php/matcher \
$(TOP)/lang_ml/parsing \
$(TOP)/lang_ml/analyze \
$(TOP)/lang_haskell/parsing \
$(TOP)/lang_haskell/analyze \
$(TOP)/lang_nw/parsing \
$(TOP)/lang_nw/analyze \
$(TOP)/lang_lisp/parsing \
$(TOP)/lang_lisp/analyze \
$(TOP)/lang_cpp/parsing \
$(TOP)/lang_cpp/analyze \
$(TOP)/lang_js/parsing \
$(TOP)/lang_js/analyze \
SYSINCLUDES=\
-I $(TOP)/external/ocamlgtk/src \
-I $(TOP)/external/ocamlcairo/src \
##############################################################################
# Generic variables
##############################################################################
-include $(TOP)/Makefile.common
##############################################################################
# Top rules
##############################################################################
all:: $(TARGET).cma
all.opt:: $(TARGET).cmxa
opt: all.opt
$(TARGET).cma: $(OBJS) $(LIBS)
$(OCAMLC) -a -o $(TARGET).cma $(OBJS)
$(TARGET).cmxa: $(OPTOBJS) $(LIBS:.cma=.cmxa)
$(OCAMLOPT) -a -o $(TARGET).cmxa $(OPTOBJS)
clean::
rm -f $(TARGET).top
##############################################################################
# Generic rules
##############################################################################
##############################################################################
# Literate Programming rules
##############################################################################
TEXMAIN=Visual.tex.nw
TEX=Visual.tex
# set of noweb (.nw) files
# must be in the same order of the #include for syncweb multi files support
# to work
SRC_ORIG=Visual.tex.nw
# set of ml files, the views. Also used by make lpclean.
SRC_NOT_SYNCED=custom_list_generic.ml
SRC_ML= $(filter-out $(SRC_NOT_SYNCED), $(SRC))
SRC_NO_MLI=flag_visual.mli
SRC_MLI=$(filter-out $(SRC_NO_MLI), $(SRC_ML:ml=mli))
SRC_VIEWS=$(SRC_MLI) $(SRC_ML) ../main_visual.ml
#------------------------------------------------------------------------------
sync:
for i in $(SRC_VIEWS); do $(SYNCWEB) $(SRC_ORIG) $$i || exit 1; done
pdf:
$(NOWEB) $(TEXMAIN) > $(TEX)
pdflatex $(TEX)
# pdflatex $(TEX)
lpclean::
rm -f $(TEX)
lpdistclean::
rm -f $(SRC_VIEWS) .md5sum_* $(TEX)
clean::
rm -f *.aux *.toc *.log *.brf *.out