1 .PHONY: all objdir clean realclean distclean
8 TARGET_TYPE = staticlib
10 OBJ = obj/$(CONFIG).$(PLATFORM)/
14 TARGET = obj/$(CONFIG).$(PLATFORM)/$(LP)ecBootstrap$(A)
16 OBJECTS = $(OBJ)ast.o $(OBJ)copy.o $(OBJ)dbpass.o $(OBJ)ec.main.o $(OBJ)ecdefs.o \
17 $(OBJ)expression.o $(OBJ)firstPass.o $(OBJ)freeAst.o $(OBJ)grammar.o $(OBJ)lexer.o \
18 $(OBJ)loadSymbols.o $(OBJ)output.o $(OBJ)pass0.o $(OBJ)pass1.o $(OBJ)pass15.o $(OBJ)pass16.o \
19 $(OBJ)pass2.o $(OBJ)pass3.o $(OBJ)shortcuts.o $(OBJ)type.o $(OBJ)bsl.o
21 SOURCES = bootstrap/ast.c bootstrap/copy.c bootstrap/dbpass.c bootstrap/ec.main.c \
22 bootstrap/ecdefs.c bootstrap/expression.c bootstrap/firstPass.c bootstrap/freeAst.c \
23 bootstrap/grammar.c bootstrap/lexer.c bootstrap/loadSymbols.c bootstrap/output.c bootstrap/pass0.c \
24 bootstrap/pass1.c bootstrap/pass15.c bootstrap/pass16.c bootstrap/pass2.c bootstrap/pass3.c \
25 bootstrap/shortcuts.c bootstrap/type.c ../bsl.c
27 # CROSS-PLATFORM MAGIC
29 include ../../../include.mk
33 CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
34 -DYYTOKENTYPE -DECERE_STATIC
38 ECFLAGS = -nolinenumbers
40 LIBS = $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
49 $(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))
51 $(TARGET): $(SOURCES) $(RESOURCES) | objdir $(SYMBOLS) $(OBJECTS)
52 $(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)
54 $(OBJ)ast.o: bootstrap/ast.c
55 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/ast.c -o $(OBJ)ast.o
57 $(OBJ)copy.o: bootstrap/copy.c
58 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/copy.c -o $(OBJ)copy.o
60 $(OBJ)dbpass.o: bootstrap/dbpass.c
61 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/dbpass.c -o $(OBJ)dbpass.o
63 $(OBJ)ec.main.o: bootstrap/ec.main.c
64 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/ec.main.c -o $(OBJ)ec.main.o
66 $(OBJ)ecdefs.o: bootstrap/ecdefs.c
67 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/ecdefs.c -o $(OBJ)ecdefs.o
69 $(OBJ)expression.o: bootstrap/expression.c
70 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/expression.c -o $(OBJ)expression.o
72 $(OBJ)firstPass.o: bootstrap/firstPass.c
73 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/firstPass.c -o $(OBJ)firstPass.o
75 $(OBJ)freeAst.o: bootstrap/freeAst.c
76 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/freeAst.c -o $(OBJ)freeAst.o
78 $(OBJ)grammar.o: bootstrap/grammar.c
79 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/grammar.c -o $(OBJ)grammar.o
81 $(OBJ)lexer.o: bootstrap/lexer.c
82 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/lexer.c -o $(OBJ)lexer.o
84 $(OBJ)loadSymbols.o: bootstrap/loadSymbols.c
85 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/loadSymbols.c -o $(OBJ)loadSymbols.o
87 $(OBJ)output.o: bootstrap/output.c
88 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/output.c -o $(OBJ)output.o
90 $(OBJ)pass0.o: bootstrap/pass0.c
91 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass0.c -o $(OBJ)pass0.o
93 $(OBJ)pass1.o: bootstrap/pass1.c
94 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass1.c -o $(OBJ)pass1.o
96 $(OBJ)pass15.o: bootstrap/pass15.c
97 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass15.c -o $(OBJ)pass15.o
99 $(OBJ)pass16.o: bootstrap/pass16.c
100 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass16.c -o $(OBJ)pass16.o
102 $(OBJ)pass2.o: bootstrap/pass2.c
103 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass2.c -o $(OBJ)pass2.o
105 $(OBJ)pass3.o: bootstrap/pass3.c
106 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/pass3.c -o $(OBJ)pass3.o
108 $(OBJ)shortcuts.o: bootstrap/shortcuts.c
109 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/shortcuts.c -o $(OBJ)shortcuts.o
111 $(OBJ)type.o: bootstrap/type.c
112 $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/type.c -o $(OBJ)type.o
114 $(OBJ)bsl.o: ../bsl.c
115 $(CC) $(CFLAGS) $(FVISIBILITY) -c ../bsl.c -o $(OBJ)bsl.o
118 $(call rmq,$(TARGET))
119 $(call rmq,$(OBJECTS))