Mercurial > projects > ldc
annotate tango/lib/common/tango/llvmdc.mak @ 133:44a95ac7368a trunk
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
In particular, assertions has been fixed to include file/line info, and much more!
author | lindquist |
---|---|
date | Mon, 14 Jan 2008 05:11:54 +0100 |
parents | 1700239cab2e |
children | 0ab29b838084 |
rev | line source |
---|---|
132 | 1 # Makefile to build the common D runtime library for LLVM |
2 # Designed to work with GNU make | |
3 # Targets: | |
4 # make | |
5 # Same as make all | |
6 # make lib | |
7 # Build the common library | |
8 # make doc | |
9 # Generate documentation | |
10 # make clean | |
11 # Delete unneeded files created by build process | |
12 | |
13 LIB_TARGET=libtango-cc-tango.a | |
14 LIB_MASK=libtango-cc-tango*.a | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
15 LIB_TARGET_C=libtango-cc-c-tango.a |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
16 LIB_MASK_C=libtango-cc-c-tango*.a |
132 | 17 |
18 CP=cp -f | |
19 RM=rm -f | |
20 MD=mkdir -p | |
21 | |
22 ADD_CFLAGS= | |
23 ADD_DFLAGS= | |
24 | |
25 CFLAGS=-O $(ADD_CFLAGS) | |
26 #CFLAGS=-g $(ADD_CFLAGS) | |
27 | |
28 DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS) | |
29 #DFLAGS=-g -w -nofloat $(ADD_DFLAGS) | |
30 | |
31 TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS) | |
32 #TFLAGS=-g -w -nofloat $(ADD_DFLAGS) | |
33 | |
34 DOCFLAGS=-version=DDoc | |
35 | |
36 CC=gcc | |
37 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
|
38 CLC=ar rsv |
132 | 39 DC=llvmdc |
40 LLC=llvm-as | |
41 | |
42 INC_DEST=../../../tango | |
43 LIB_DEST=.. | |
44 DOC_DEST=../../../doc/tango | |
45 | |
46 .SUFFIXES: .s .S .c .cpp .d .ll .html .o .bc | |
47 | |
48 .s.o: | |
49 $(CC) -c $(CFLAGS) $< -o$@ | |
50 | |
51 .S.o: | |
52 $(CC) -c $(CFLAGS) $< -o$@ | |
53 | |
54 .c.o: | |
55 $(CC) -c $(CFLAGS) $< -o$@ | |
56 | |
57 .cpp.o: | |
58 g++ -c $(CFLAGS) $< -o$@ | |
59 | |
60 .d.bc: | |
61 $(DC) -c $(DFLAGS) -Hf$*.di $< -of$@ | |
62 # $(DC) -c $(DFLAGS) $< -of$@ | |
63 | |
64 .ll.bc: | |
65 $(LLC) -f -o=$@ $< | |
66 | |
67 .d.html: | |
68 $(DC) -c -o- $(DOCFLAGS) -Df$*.html $< | |
69 # $(DC) -c -o- $(DOCFLAGS) -Df$*.html tango.ddoc $< | |
70 | |
71 targets : lib doc | |
72 all : lib doc | |
73 tango : lib | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
74 lib : tango.lib tango.clib |
132 | 75 doc : tango.doc |
76 | |
77 ###################################################### | |
78 | |
79 OBJ_CORE= \ | |
80 core/BitManip.bc \ | |
81 core/Exception.bc \ | |
82 core/Memory.bc \ | |
83 core/Runtime.bc \ | |
84 core/Thread.bc | |
85 # core/ThreadASM.o | |
86 | |
87 OBJ_STDC= \ | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
88 stdc/wrap.o |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
89 # stdc/wrap.bc |
132 | 90 |
91 OBJ_STDC_POSIX= \ | |
92 stdc/posix/pthread_darwin.o | |
93 | |
94 ALL_OBJS= \ | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
95 $(OBJ_CORE) |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
96 # $(OBJ_STDC) |
132 | 97 # $(OBJ_STDC_POSIX) |
98 | |
99 ###################################################### | |
100 | |
101 DOC_CORE= \ | |
102 core/BitManip.html \ | |
103 core/Exception.html \ | |
104 core/Memory.html \ | |
105 core/Runtime.html \ | |
106 core/Thread.html | |
107 | |
108 | |
109 ALL_DOCS= | |
110 | |
111 ###################################################### | |
112 | |
113 tango.lib : $(LIB_TARGET) | |
114 | |
115 $(LIB_TARGET) : $(ALL_OBJS) | |
116 $(RM) $@ | |
117 $(LC) $@ $(ALL_OBJS) | |
118 | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
119 |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
120 tango.clib : $(LIB_TARGET_C) |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
121 |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
122 $(LIB_TARGET_C) : $(OBJ_STDC) |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
123 $(RM) $@ |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
124 $(CLC) $@ $(OBJ_STDC) |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
125 |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
126 |
132 | 127 tango.doc : $(ALL_DOCS) |
128 echo Documentation generated. | |
129 | |
130 ###################################################### | |
131 | |
132 ### stdc/posix | |
133 | |
134 #stdc/posix/pthread_darwin.o : stdc/posix/pthread_darwin.d | |
135 # $(DC) -c $(DFLAGS) stdc/posix/pthread_darwin.d -of$@ | |
136 | |
137 ###################################################### | |
138 | |
139 clean : | |
140 find . -name "*.di" | xargs $(RM) | |
141 $(RM) $(ALL_OBJS) | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
142 $(RM) $(OBJ_STDC) |
132 | 143 $(RM) $(ALL_DOCS) |
144 find . -name "$(LIB_MASK)" | xargs $(RM) | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
145 find . -name "$(LIB_MASK_C)" | xargs $(RM) |
132 | 146 |
147 install : | |
148 $(MD) $(INC_DEST) | |
149 find . -name "*.di" -exec cp -f {} $(INC_DEST)/{} \; | |
150 $(MD) $(DOC_DEST) | |
151 find . -name "*.html" -exec cp -f {} $(DOC_DEST)/{} \; | |
152 $(MD) $(LIB_DEST) | |
153 find . -name "$(LIB_MASK)" -exec cp -f {} $(LIB_DEST)/{} \; | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
154 find . -name "$(LIB_MASK_C)" -exec cp -f {} $(LIB_DEST)/{} \; |