tarball; synced all makefiles with generated makefiles that are now using PRJ_CFLAGS.
[sdk] / compiler / bootstrap / ecere / Makefile
1 .PHONY: all objdir clean realclean distclean
2
3 # CORE VARIABLES
4
5 MODULE := ecere
6 CONFIG := bootstrap
7 ifndef COMPILER
8 COMPILER := default
9 endif
10
11 TARGET_TYPE = staticlib
12
13 # FLAGS
14
15 ECFLAGS =
16 ifndef DEBIAN_PACKAGE
17 CFLAGS =
18 LDFLAGS =
19 endif
20 CECFLAGS =
21 OFLAGS =
22 LIBS =
23
24 ifdef DEBUG
25 NOSTRIP := y
26 endif
27
28 CONSOLE = -mwindows
29
30 # INCLUDES
31
32 _CF_DIR = ../../../
33
34 include $(_CF_DIR)crossplatform.mk
35 include $(_CF_DIR)default.cf
36
37 # POST-INCLUDES VARIABLES
38
39 OBJ = obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/
40
41 RES = res/
42
43 TARGET = obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/$(LP)ecereBootstrap$(A)
44
45 OBJECTS = \
46         $(OBJ)Array.o \
47         $(OBJ)AVLTree.o \
48         $(OBJ)BinaryTree.o \
49         $(OBJ)BTNode.o \
50         $(OBJ)BufferedFile.o \
51         $(OBJ)BuiltInContainer.o \
52         $(OBJ)Container.o \
53         $(OBJ)CustomAVLTree.o \
54         $(OBJ)dataTypes.o \
55         $(OBJ)DualPipe.o \
56         $(OBJ)ecere.main.o \
57         $(OBJ)File.o \
58         $(OBJ)instance.o \
59         $(OBJ)LinkList.o \
60         $(OBJ)List.o \
61         $(OBJ)Map.o \
62         $(OBJ)memory.o \
63         $(OBJ)OldList.o \
64         $(OBJ)String.o \
65         $(OBJ)System.o \
66         $(OBJ)TempFile.o \
67         $(OBJ)instance.c.o \
68         $(OBJ)DualPipe.c.o \
69         $(OBJ)File.c.o \
70         $(OBJ)System.c.o \
71         $(OBJ)i18n.o
72
73 SOURCES = \
74         bootstrap/Array.c \
75         bootstrap/AVLTree.c \
76         bootstrap/BinaryTree.c \
77         bootstrap/i18n.c \
78         bootstrap/BTNode.c \
79         bootstrap/BufferedFile.c \
80         bootstrap/BuiltInContainer.c \
81         bootstrap/Container.c \
82         bootstrap/CustomAVLTree.c \
83         bootstrap/dataTypes.c \
84         bootstrap/DualPipe.c \
85         bootstrap/ecere.main.c \
86         bootstrap/File.c \
87         bootstrap/instance.c \
88         bootstrap/LinkList.c \
89         bootstrap/List.c \
90         bootstrap/Map.c \
91         bootstrap/memory.c \
92         bootstrap/OldList.c \
93         bootstrap/String.c \
94         bootstrap/System.c \
95         bootstrap/TempFile.c \
96         ../../../ecere/src/com/instance.c \
97         ../../../ecere/src/sys/DualPipe.c \
98         ../../../ecere/src/sys/File.c \
99         ../../../ecere/src/sys/System.c
100
101 LIBS += $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
102
103 ifndef STATIC_LIBRARY_TARGET
104 LIBS +=
105 endif
106
107 CFLAGS += \
108          $(if $(DEBUG), -g, -O2 -ffast-math) $(FORCE_32_BIT) $(FPIC) -w \
109          -DBUILDING_ECERE_COM -DECERE_STATIC -DECERE_BOOTSTRAP
110 ECFLAGS += \
111          -nolinenumbers -defaultns ecere
112
113
114
115
116 CECFLAGS += -cpp $(_CPP)
117
118 ifndef STATIC_LIBRARY_TARGET
119 OFLAGS += $(FORCE_32_BIT)
120 endif
121
122 # TARGETS
123
124 all: objdir $(TARGET)
125
126 objdir:
127         $(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))
128
129 $(TARGET): $(SOURCES) $(RESOURCES) | objdir $(SYMBOLS) $(OBJECTS)
130         $(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)
131
132 # OBJECT RULES
133
134 $(OBJ)BufferedFile.o: bootstrap/BufferedFile.c
135         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/BufferedFile.c -o $(OBJ)BufferedFile.o
136
137 $(OBJ)DualPipe.o: bootstrap/DualPipe.c
138         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/DualPipe.c -o $(OBJ)DualPipe.o
139
140 $(OBJ)File.o: bootstrap/File.c
141         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/File.c -o $(OBJ)File.o
142
143 $(OBJ)memory.o: bootstrap/memory.c
144         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/memory.c -o $(OBJ)memory.o
145
146 $(OBJ)System.o: bootstrap/System.c
147         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/System.c -o $(OBJ)System.o
148
149 $(OBJ)TempFile.o: bootstrap/TempFile.c
150         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/TempFile.c -o $(OBJ)TempFile.o
151
152 $(OBJ)File.c.o: ../../../ecere/src/sys/File.c
153         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c ../../../ecere/src/sys/File.c -o $(OBJ)File.c.o
154
155 $(OBJ)DualPipe.c.o: ../../../ecere/src/sys/DualPipe.c
156         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c ../../../ecere/src/sys/DualPipe.c -o $(OBJ)DualPipe.c.o
157
158 $(OBJ)System.c.o: ../../../ecere/src/sys/System.c
159         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c ../../../ecere/src/sys/System.c -o $(OBJ)System.c.o
160
161 $(OBJ)i18n.o: bootstrap/i18n.c
162         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/i18n.c -o $(OBJ)i18n.o
163
164 $(OBJ)Array.o: bootstrap/Array.c
165         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/Array.c -o $(OBJ)Array.o
166
167 $(OBJ)AVLTree.o: bootstrap/AVLTree.c
168         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/AVLTree.c -o $(OBJ)AVLTree.o
169
170 $(OBJ)BuiltInContainer.o: bootstrap/BuiltInContainer.c
171         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/BuiltInContainer.c -o $(OBJ)BuiltInContainer.o
172
173 $(OBJ)Container.o: bootstrap/Container.c
174         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/Container.c -o $(OBJ)Container.o
175
176 $(OBJ)CustomAVLTree.o: bootstrap/CustomAVLTree.c
177         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/CustomAVLTree.c -o $(OBJ)CustomAVLTree.o
178
179 $(OBJ)LinkList.o: bootstrap/LinkList.c
180         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/LinkList.c -o $(OBJ)LinkList.o
181
182 $(OBJ)List.o: bootstrap/List.c
183         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/List.c -o $(OBJ)List.o
184
185 $(OBJ)Map.o: bootstrap/Map.c
186         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/Map.c -o $(OBJ)Map.o
187
188 $(OBJ)BinaryTree.o: bootstrap/BinaryTree.c
189         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/BinaryTree.c -o $(OBJ)BinaryTree.o
190
191 $(OBJ)BTNode.o: bootstrap/BTNode.c
192         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/BTNode.c -o $(OBJ)BTNode.o
193
194 $(OBJ)dataTypes.o: bootstrap/dataTypes.c
195         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/dataTypes.c -o $(OBJ)dataTypes.o
196
197 $(OBJ)instance.o: bootstrap/instance.c
198         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/instance.c -o $(OBJ)instance.o
199
200 $(OBJ)String.o: bootstrap/String.c
201         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/String.c -o $(OBJ)String.o
202
203 $(OBJ)OldList.o: bootstrap/OldList.c
204         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/OldList.c -o $(OBJ)OldList.o
205
206 $(OBJ)instance.c.o: ../../../ecere/src/com/instance.c
207         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c ../../../ecere/src/com/instance.c -o $(OBJ)instance.c.o
208
209 $(OBJ)$(MODULE).main$(O): bootstrap/$(MODULE).main.c
210         $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/$(MODULE).main.c -o $(OBJ)$(MODULE).main$(O)
211
212 clean: objdir
213         $(call rmq,$(TARGET))
214         $(call rmq,$(OBJECTS))
215
216 realclean: clean
217         $(call rmrq,$(OBJ))
218
219 distclean:
220         $(call rmrq,obj/)