Blame view

Giac_maj/epsilon-giac/poincare/Makefile 3.4 KB
6663b6c9   adorian   projet complet av...
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
  SFLAGS += -Ipoincare/include
  
  #include poincare/src/simplify/Makefile
  
  objs += $(addprefix poincare/src/,\
    absolute_value.o\
    addition.o\
    arc_cosine.o\
    arc_sine.o\
    arc_tangent.o\
    binary_operation.o\
    binomial_coefficient.o\
    ceiling.o\
    complex.o\
    complex_argument.o\
    complex_matrix.o\
    confidence_interval.o\
    conjugate.o\
    cosine.o\
    derivative.o\
    determinant.o\
    division_quotient.o\
    division_remainder.o\
    evaluation.o\
    expression.o\
    expression_lexer.o\
    expression_parser.o\
    factorial.o\
    floor.o\
    frac_part.o\
    fraction.o\
    function.o\
    expression_matrix.o\
    global_context.o\
    great_common_divisor.o\
    hyperbolic_arc_cosine.o\
    hyperbolic_arc_sine.o\
    hyperbolic_arc_tangent.o\
    hyperbolic_cosine.o\
    hyperbolic_sine.o\
    hyperbolic_tangent.o\
    imaginary_part.o\
    integer.o\
    integral.o\
    list_data.o\
    leaf_expression.o\
    least_common_multiple.o\
    logarithm.o\
    matrix.o\
    matrix_data.o\
    matrix_dimension.o\
    matrix_inverse.o\
    matrix_trace.o\
    matrix_transpose.o\
    multiplication.o\
    naperian_logarithm.o\
    nth_root.o\
    opposite.o\
    parenthesis.o\
    permute_coefficient.o\
    power.o\
    prediction_interval.o\
    preferences.o\
    product.o\
    reel_part.o\
    round.o\
    sequence.o\
    sine.o\
    square_root.o\
    store.o\
    subtraction.o\
    sum.o\
    symbol.o\
    tangent.o\
    variable_context.o\
  )
  objs += $(addprefix poincare/src/layout/,\
    baseline_relative_layout.o\
    bracket_layout.o\
    condensed_sum_layout.o\
    conjugate_layout.o\
    expression_layout.o\
    fraction_layout.o\
    grid_layout.o\
    horizontal_layout.o\
    integral_layout.o\
    nth_root_layout.o\
    parenthesis_layout.o\
    product_layout.o\
    sequence_layout.o\
    string_layout.o\
    sum_layout.o\
  )
  
  tests += $(addprefix poincare/test/,\
    addition.cpp\
    complex.cpp\
    fraction.cpp\
    function.cpp\
    helper.cpp\
    integer.cpp\
    matrix.cpp\
    parser.cpp\
    product.cpp\
    power.cpp\
    subtraction.cpp\
    symbol.cpp\
    trigo.cpp\
  )
  
  # tests += $(addprefix poincare/test/,\
    addition.cpp\
    float.cpp\
    fraction.cpp\
    identity.cpp\
    integer.cpp\
    matrix.cpp\
    product.cpp\
    power.cpp\
    simplify_utils.cpp\
    simplify_addition.cpp\
    simplify_product.cpp\
    subtraction.cpp\
    trigo.cpp\
  )
  
  ifdef POINCARE_TESTS_PRINT_EXPRESSIONS
  tests += poincare/src/expression_debug.o
  SFLAGS += -DPOINCARE_TESTS_PRINT_EXPRESSIONS=1
  endif
  
  # Even though flex and bison will generate both implementation and headers at
  # once, we don't declare it in the Makefile. If we did, "make -jN" with N>1 may
  # call bison or flex twice.
  
  lexer_files = $(addprefix poincare/src/, expression_lexer.cpp expression_lexer.hpp)
  poincare/src/expression_lexer.hpp: poincare/src/expression_lexer.cpp
  poincare/src/expression_lexer.cpp: poincare/src/expression_lexer.l
  	@echo "FLEX    $(lexer_files)"
  	@flex -P poincare_expression_yy --header-file=poincare/src/expression_lexer.hpp -o poincare/src/expression_lexer.cpp $<
  
  poincare/src/expression_lexer.o: CXXFLAGS += -Wno-deprecated-register -Wno-unused-value -Wno-unused-function
  
  parser_files = $(addprefix poincare/src/, expression_parser.cpp expression_parser.hpp)
  poincare/src/expression_parser.hpp: poincare/src/expression_parser.cpp
  poincare/src/expression_parser.cpp: poincare/src/expression_parser.y
  	@echo "BISON   $(parser_files)"
  	@bison -d -p poincare_expression_yy -o poincare/src/expression_parser.cpp $<
  
  poincare/src/expression.cpp: $(lexer_files) $(parser_files)
  
  products += $(lexer_files) $(parser_files)