makefiles: single file per line for all file lists in all makefiles.
[sdk] / compiler / bootstrap / libec / Makefile
1 .PHONY: all objdir clean realclean distclean
2
3 # CONTENT
4
5 MODULE := ec
6 CONFIG := bootstrap
7 COMPILER := default
8 TARGET_TYPE = staticlib
9
10 OBJ = obj/$(CONFIG).$(PLATFORM)/
11
12 RES = 
13
14 TARGET = obj/$(CONFIG).$(PLATFORM)/$(LP)ecBootstrap$(A)
15
16 OBJECTS = \
17         $(OBJ)ast.o \
18         $(OBJ)copy.o \
19         $(OBJ)dbpass.o \
20         $(OBJ)ec.main.o \
21         $(OBJ)ecdefs.o \
22         $(OBJ)expression.o \
23         $(OBJ)firstPass.o \
24         $(OBJ)freeAst.o \
25         $(OBJ)grammar.o \
26         $(OBJ)lexer.o \
27         $(OBJ)loadSymbols.o \
28         $(OBJ)output.o \
29         $(OBJ)pass0.o \
30         $(OBJ)pass1.o \
31         $(OBJ)pass15.o \
32         $(OBJ)pass16.o \
33         $(OBJ)pass2.o \
34         $(OBJ)pass3.o \
35         $(OBJ)shortcuts.o \
36         $(OBJ)type.o \
37         $(OBJ)bsl.o
38
39 SOURCES = \
40         bootstrap/ast.c \
41         bootstrap/copy.c \
42         bootstrap/dbpass.c \
43         bootstrap/ec.main.c \
44         bootstrap/ecdefs.c \
45         bootstrap/expression.c \
46         bootstrap/firstPass.c \
47         bootstrap/freeAst.c \
48         bootstrap/grammar.c \
49         bootstrap/lexer.c \
50         bootstrap/loadSymbols.c \
51         bootstrap/output.c \
52         bootstrap/pass0.c \
53         bootstrap/pass1.c \
54         bootstrap/pass15.c \
55         bootstrap/pass16.c \
56         bootstrap/pass2.c \
57         bootstrap/pass3.c \
58         bootstrap/shortcuts.c \
59         bootstrap/type.c \
60         ../bsl.c
61
62 # CROSS-PLATFORM MAGIC
63
64 include ../../../include.mk
65
66 # FLAGS
67
68 CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
69          -DYYTOKENTYPE -DECERE_STATIC
70
71 CECFLAGS =
72
73 ECFLAGS = -nolinenumbers
74
75 LIBS = $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
76
77 UPXFLAGS = -9 -q
78
79 # TARGETS
80
81 all: objdir $(TARGET)
82
83 objdir:
84         $(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))
85
86 $(TARGET): $(SOURCES) $(RESOURCES) | objdir $(SYMBOLS) $(OBJECTS)
87         $(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)
88
89 $(OBJ)ast.o: bootstrap/ast.c
90         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/ast.c -o $(OBJ)ast.o
91
92 $(OBJ)copy.o: bootstrap/copy.c
93         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/copy.c -o $(OBJ)copy.o
94
95 $(OBJ)dbpass.o: bootstrap/dbpass.c
96         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/dbpass.c -o $(OBJ)dbpass.o
97
98 $(OBJ)ec.main.o: bootstrap/ec.main.c
99         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/ec.main.c -o $(OBJ)ec.main.o
100
101 $(OBJ)ecdefs.o: bootstrap/ecdefs.c
102         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/ecdefs.c -o $(OBJ)ecdefs.o
103
104 $(OBJ)expression.o: bootstrap/expression.c
105         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/expression.c -o $(OBJ)expression.o
106
107 $(OBJ)firstPass.o: bootstrap/firstPass.c
108         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/firstPass.c -o $(OBJ)firstPass.o
109
110 $(OBJ)freeAst.o: bootstrap/freeAst.c
111         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/freeAst.c -o $(OBJ)freeAst.o
112
113 $(OBJ)grammar.o: bootstrap/grammar.c
114         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/grammar.c -o $(OBJ)grammar.o
115
116 $(OBJ)lexer.o: bootstrap/lexer.c
117         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/lexer.c -o $(OBJ)lexer.o
118
119 $(OBJ)loadSymbols.o: bootstrap/loadSymbols.c
120         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/loadSymbols.c -o $(OBJ)loadSymbols.o
121
122 $(OBJ)output.o: bootstrap/output.c
123         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/output.c -o $(OBJ)output.o
124
125 $(OBJ)pass0.o: bootstrap/pass0.c
126         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass0.c -o $(OBJ)pass0.o
127
128 $(OBJ)pass1.o: bootstrap/pass1.c
129         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass1.c -o $(OBJ)pass1.o
130
131 $(OBJ)pass15.o: bootstrap/pass15.c
132         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass15.c -o $(OBJ)pass15.o
133
134 $(OBJ)pass16.o: bootstrap/pass16.c
135         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass16.c -o $(OBJ)pass16.o
136
137 $(OBJ)pass2.o: bootstrap/pass2.c
138         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass2.c -o $(OBJ)pass2.o
139
140 $(OBJ)pass3.o: bootstrap/pass3.c
141         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass3.c -o $(OBJ)pass3.o
142
143 $(OBJ)shortcuts.o: bootstrap/shortcuts.c
144         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/shortcuts.c -o $(OBJ)shortcuts.o
145
146 $(OBJ)type.o: bootstrap/type.c
147         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/type.c -o $(OBJ)type.o
148
149 $(OBJ)bsl.o: ../bsl.c
150         $(CC) $(CFLAGS) $(FVISIBILITY) -c ../bsl.c -o $(OBJ)bsl.o
151
152 clean: objdir
153         $(call rmq,$(TARGET))
154         $(call rmq,$(OBJECTS))
155
156 realclean:
157         $(call rmrq,$(OBJ))
158
159 distclean:
160         $(call rmrq,obj/)