Mercurial > projects > ldc
annotate tango/lib/compiler/llvmdc/llvmdc.mak @ 237:a168a2c3ea48 trunk
[svn r253] Removed -inlineasm option. inline asm is now enabled by default unless the new -noasm option is passed.
Tried adding a stack trace print when compiler crashes, not sure it's working though.
Changed data layouts to match that of llvm-gcc.
Fixed casting function pointers.
Added support checks in AsmStatement.
author | lindquist |
---|---|
date | Sun, 08 Jun 2008 19:09:24 +0200 |
parents | 4c2689d57ba4 |
children | 2b72433d5c8c |
rev | line source |
---|---|
132 | 1 # Makefile to build the LLVMDC compiler runtime D library for Linux |
2 # Designed to work with GNU make | |
3 # Targets: | |
4 # make | |
5 # Same as make all | |
6 # make lib | |
7 # Build the compiler runtime library | |
8 # make doc | |
9 # Generate documentation | |
10 # make clean | |
11 # Delete unneeded files created by build process | |
12 | |
212
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
203
diff
changeset
|
13 LIB_TARGET=libtango-base-llvmdc.a |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
203
diff
changeset
|
14 LIB_MASK=libtango-base-llvmdc*.a |
132 | 15 |
212
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
203
diff
changeset
|
16 LIB_TARGET_C=libtango-base-c-llvmdc.a |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
203
diff
changeset
|
17 LIB_MASK_C=libtango-base-c-llvmdc*.a |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
18 |
132 | 19 CP=cp -f |
20 RM=rm -f | |
21 MD=mkdir -p | |
22 | |
139
0ab29b838084
[svn r143] Fixed: a few bugs in debug information, still only line info, but should be correct files now :)
lindquist
parents:
133
diff
changeset
|
23 #CFLAGS=-O3 $(ADD_CFLAGS) |
0ab29b838084
[svn r143] Fixed: a few bugs in debug information, still only line info, but should be correct files now :)
lindquist
parents:
133
diff
changeset
|
24 CFLAGS=-g $(ADD_CFLAGS) |
132 | 25 |
139
0ab29b838084
[svn r143] Fixed: a few bugs in debug information, still only line info, but should be correct files now :)
lindquist
parents:
133
diff
changeset
|
26 #DFLAGS=-release -O3 -inline -w $(ADD_DFLAGS) |
237
a168a2c3ea48
[svn r253] Removed -inlineasm option. inline asm is now enabled by default unless the new -noasm option is passed.
lindquist
parents:
212
diff
changeset
|
27 DFLAGS=-g -w -noasm $(ADD_DFLAGS) |
132 | 28 |
139
0ab29b838084
[svn r143] Fixed: a few bugs in debug information, still only line info, but should be correct files now :)
lindquist
parents:
133
diff
changeset
|
29 #TFLAGS=-O3 -inline -w $(ADD_DFLAGS) |
237
a168a2c3ea48
[svn r253] Removed -inlineasm option. inline asm is now enabled by default unless the new -noasm option is passed.
lindquist
parents:
212
diff
changeset
|
30 TFLAGS=-g -w -noasm $(ADD_DFLAGS) |
132 | 31 |
32 DOCFLAGS=-version=DDoc | |
33 | |
34 CC=gcc | |
35 LC=llvm-ar rsv | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
36 CLC=ar rsv |
132 | 37 DC=llvmdc |
38 LLC=llvm-as | |
39 | |
40 LIB_DEST=.. | |
41 | |
42 .SUFFIXES: .s .S .c .cpp .d .ll .html .o .bc | |
43 | |
44 .s.o: | |
45 $(CC) -c $(CFLAGS) $< -o$@ | |
46 | |
47 .S.o: | |
48 $(CC) -c $(CFLAGS) $< -o$@ | |
49 | |
50 .c.o: | |
51 $(CC) -c $(CFLAGS) $< -o$@ | |
52 | |
53 .cpp.o: | |
54 g++ -c $(CFLAGS) $< -o$@ | |
55 | |
56 .d.bc: | |
57 $(DC) -c $(DFLAGS) $< -of$@ | |
58 | |
59 .ll.bc: | |
60 $(LLC) -f -o=$@ $< | |
61 | |
62 .d.html: | |
63 $(DC) -c -o- $(DOCFLAGS) -Df$*.html llvmdc.ddoc $< | |
64 | |
65 targets : lib doc | |
66 all : lib doc | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
67 lib : llvmdc.lib llvmdc.clib |
132 | 68 doc : llvmdc.doc |
69 | |
70 ###################################################### | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
71 OBJ_C= \ |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
72 monitor.o \ |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
73 critical.o |
132 | 74 |
75 OBJ_BASE= \ | |
76 aaA.bc \ | |
77 aApply.bc \ | |
78 aApplyR.bc \ | |
79 adi.bc \ | |
80 arrays.bc \ | |
81 cast.bc \ | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
82 dmain2.bc \ |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
83 eh.bc \ |
132 | 84 genobj.bc \ |
85 lifetime.bc \ | |
86 memory.bc \ | |
87 qsort2.bc \ | |
88 switch.bc \ | |
89 | |
90 # NOTE: trace.obj and cover.obj are not necessary for a successful build | |
91 # as both are used for debugging features (profiling and coverage) | |
92 # NOTE: a pre-compiled minit.obj has been provided in dmd for Win32 and | |
93 # minit.asm is not used by dmd for linux | |
94 # NOTE: deh.o is only needed for Win32, linux uses deh2.o | |
95 | |
96 OBJ_UTIL= \ | |
97 util/console.bc \ | |
98 util/ctype.bc \ | |
99 util/string.bc \ | |
100 util/utf.bc | |
101 | |
102 OBJ_TI= \ | |
103 typeinfo/ti_AC.bc \ | |
104 typeinfo/ti_Acdouble.bc \ | |
105 typeinfo/ti_Acfloat.bc \ | |
106 typeinfo/ti_Acreal.bc \ | |
107 typeinfo/ti_Adouble.bc \ | |
108 typeinfo/ti_Afloat.bc \ | |
109 typeinfo/ti_Ag.bc \ | |
110 typeinfo/ti_Aint.bc \ | |
111 typeinfo/ti_Along.bc \ | |
112 typeinfo/ti_Areal.bc \ | |
113 typeinfo/ti_Ashort.bc \ | |
114 typeinfo/ti_byte.bc \ | |
115 typeinfo/ti_C.bc \ | |
116 typeinfo/ti_cdouble.bc \ | |
117 typeinfo/ti_cfloat.bc \ | |
118 typeinfo/ti_char.bc \ | |
119 typeinfo/ti_creal.bc \ | |
120 typeinfo/ti_dchar.bc \ | |
121 typeinfo/ti_delegate.bc \ | |
122 typeinfo/ti_double.bc \ | |
123 typeinfo/ti_float.bc \ | |
124 typeinfo/ti_idouble.bc \ | |
125 typeinfo/ti_ifloat.bc \ | |
126 typeinfo/ti_int.bc \ | |
127 typeinfo/ti_ireal.bc \ | |
128 typeinfo/ti_long.bc \ | |
129 typeinfo/ti_ptr.bc \ | |
130 typeinfo/ti_real.bc \ | |
131 typeinfo/ti_short.bc \ | |
132 typeinfo/ti_ubyte.bc \ | |
133 typeinfo/ti_uint.bc \ | |
134 typeinfo/ti_ulong.bc \ | |
135 typeinfo/ti_ushort.bc \ | |
136 typeinfo/ti_void.bc \ | |
137 typeinfo/ti_wchar.bc | |
138 | |
139 ALL_OBJS= \ | |
140 $(OBJ_BASE) \ | |
141 $(OBJ_UTIL) \ | |
142 $(OBJ_TI) \ | |
143 moduleinfo.bc | |
144 | |
145 ###################################################### | |
146 | |
147 ALL_DOCS= | |
148 | |
149 ###################################################### | |
150 | |
151 llvmdc.lib : $(LIB_TARGET) | |
152 | |
153 $(LIB_TARGET) : $(ALL_OBJS) | |
154 $(RM) $@ | |
155 $(LC) $@ $(ALL_OBJS) | |
156 | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
157 llvmdc.clib : $(LIB_TARGET_C) |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
158 |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
159 $(LIB_TARGET_C) : $(OBJ_C) |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
160 $(RM) $@ |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
161 $(CLC) $@ $(OBJ_C) |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
162 |
132 | 163 llvmdc.doc : $(ALL_DOCS) |
164 echo No documentation available. | |
165 | |
166 ###################################################### | |
167 | |
168 clean : | |
169 find . -name "*.di" | xargs $(RM) | |
170 $(RM) $(ALL_OBJS) | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
171 $(RM) $(OBJ_C) |
132 | 172 $(RM) $(ALL_DOCS) |
173 $(RM) $(LIB_MASK) | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
174 $(RM) $(LIB_MASK_C) |
132 | 175 |
176 install : | |
177 $(MD) $(LIB_DEST) | |
178 $(CP) $(LIB_MASK) $(LIB_DEST)/. | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
179 $(CP) $(LIB_MASK_C) $(LIB_DEST)/. |