ide/Makefiles: Updated tarball makefiles to use FORCE_32BIT; Disabled forcing -m32...
[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 ifndef DEBIAN_PACKAGE
63 CFLAGS =
64 endif
65 OFLAGS =
66
67 # CROSS-PLATFORM MAGIC
68
69 include ../../../crossplatform.mk
70 include ../../../include.mk
71
72 # FLAGS
73
74 CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w \
75          -DYYTOKENTYPE -DECERE_STATIC
76
77 CECFLAGS =
78
79 ECFLAGS = -nolinenumbers
80
81 LIBS = $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
82
83 UPXFLAGS = -9 -q
84
85 # TARGETS
86
87 all: objdir $(TARGET)
88
89 objdir:
90         $(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))
91
92 $(TARGET): $(SOURCES) $(RESOURCES) | objdir $(SYMBOLS) $(OBJECTS)
93         $(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)
94
95 $(OBJ)ast.o: bootstrap/ast.c
96         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/ast.c -o $(OBJ)ast.o
97
98 $(OBJ)copy.o: bootstrap/copy.c
99         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/copy.c -o $(OBJ)copy.o
100
101 $(OBJ)dbpass.o: bootstrap/dbpass.c
102         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/dbpass.c -o $(OBJ)dbpass.o
103
104 $(OBJ)ec.main.o: bootstrap/ec.main.c
105         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/ec.main.c -o $(OBJ)ec.main.o
106
107 $(OBJ)ecdefs.o: bootstrap/ecdefs.c
108         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/ecdefs.c -o $(OBJ)ecdefs.o
109
110 $(OBJ)expression.o: bootstrap/expression.c
111         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/expression.c -o $(OBJ)expression.o
112
113 $(OBJ)firstPass.o: bootstrap/firstPass.c
114         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/firstPass.c -o $(OBJ)firstPass.o
115
116 $(OBJ)freeAst.o: bootstrap/freeAst.c
117         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/freeAst.c -o $(OBJ)freeAst.o
118
119 $(OBJ)grammar.o: bootstrap/grammar.c
120         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/grammar.c -o $(OBJ)grammar.o
121
122 $(OBJ)lexer.o: bootstrap/lexer.c
123         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/lexer.c -o $(OBJ)lexer.o
124
125 $(OBJ)loadSymbols.o: bootstrap/loadSymbols.c
126         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/loadSymbols.c -o $(OBJ)loadSymbols.o
127
128 $(OBJ)output.o: bootstrap/output.c
129         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/output.c -o $(OBJ)output.o
130
131 $(OBJ)pass0.o: bootstrap/pass0.c
132         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass0.c -o $(OBJ)pass0.o
133
134 $(OBJ)pass1.o: bootstrap/pass1.c
135         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass1.c -o $(OBJ)pass1.o
136
137 $(OBJ)pass15.o: bootstrap/pass15.c
138         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass15.c -o $(OBJ)pass15.o
139
140 $(OBJ)pass16.o: bootstrap/pass16.c
141         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass16.c -o $(OBJ)pass16.o
142
143 $(OBJ)pass2.o: bootstrap/pass2.c
144         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass2.c -o $(OBJ)pass2.o
145
146 $(OBJ)pass3.o: bootstrap/pass3.c
147         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass3.c -o $(OBJ)pass3.o
148
149 $(OBJ)shortcuts.o: bootstrap/shortcuts.c
150         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/shortcuts.c -o $(OBJ)shortcuts.o
151
152 $(OBJ)type.o: bootstrap/type.c
153         $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/type.c -o $(OBJ)type.o
154
155 $(OBJ)bsl.o: ../bsl.c
156         $(CC) $(CFLAGS) $(FVISIBILITY) -c ../bsl.c -o $(OBJ)bsl.o
157
158 clean: objdir
159         $(call rmq,$(TARGET))
160         $(call rmq,$(OBJECTS))
161
162 realclean:
163         $(call rmrq,$(OBJ))
164
165 distclean:
166         $(call rmrq,obj/)