comparison tango/lib/compiler/llvmdc/llvmdc.mak @ 132:1700239cab2e trunk

[svn r136] MAJOR UNSTABLE UPDATE!!! Initial commit after moving to Tango instead of Phobos. Lots of bugfixes... This build is not suitable for most things.
author lindquist
date Fri, 11 Jan 2008 17:57:40 +0100
parents
children 44a95ac7368a
comparison
equal deleted inserted replaced
131:5825d48b27d1 132:1700239cab2e
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
13 LIB_TARGET=libtango-rt-llvmdc.a
14 LIB_MASK=libtango-rt-llvmdc*.a
15
16 CP=cp -f
17 RM=rm -f
18 MD=mkdir -p
19
20 CFLAGS=-O3 $(ADD_CFLAGS)
21 #CFLAGS=-g $(ADD_CFLAGS)
22
23 DFLAGS=-release -O3 -inline -w $(ADD_DFLAGS)
24 #DFLAGS=-g -w $(ADD_DFLAGS)
25
26 TFLAGS=-O3 -inline -w $(ADD_DFLAGS)
27 #TFLAGS=-g -w $(ADD_DFLAGS)
28
29 DOCFLAGS=-version=DDoc
30
31 CC=gcc
32 LC=llvm-ar rsv
33 DC=llvmdc
34 LLC=llvm-as
35
36 LIB_DEST=..
37
38 .SUFFIXES: .s .S .c .cpp .d .ll .html .o .bc
39
40 .s.o:
41 $(CC) -c $(CFLAGS) $< -o$@
42
43 .S.o:
44 $(CC) -c $(CFLAGS) $< -o$@
45
46 .c.o:
47 $(CC) -c $(CFLAGS) $< -o$@
48
49 .cpp.o:
50 g++ -c $(CFLAGS) $< -o$@
51
52 .d.bc:
53 $(DC) -c $(DFLAGS) $< -of$@
54
55 .ll.bc:
56 $(LLC) -f -o=$@ $<
57
58 .d.html:
59 $(DC) -c -o- $(DOCFLAGS) -Df$*.html llvmdc.ddoc $<
60
61 targets : lib doc
62 all : lib doc
63 lib : llvmdc.lib
64 doc : llvmdc.doc
65
66 ######################################################
67
68 OBJ_BASE= \
69 aaA.bc \
70 aApply.bc \
71 aApplyR.bc \
72 adi.bc \
73 arrays.bc \
74 cast.bc \
75 contract.bc \
76 genobj.bc \
77 lifetime.bc \
78 mem.bc \
79 memory.bc \
80 qsort2.bc \
81 switch.bc \
82
83 # NOTE: trace.obj and cover.obj are not necessary for a successful build
84 # as both are used for debugging features (profiling and coverage)
85 # NOTE: a pre-compiled minit.obj has been provided in dmd for Win32 and
86 # minit.asm is not used by dmd for linux
87 # NOTE: deh.o is only needed for Win32, linux uses deh2.o
88
89 OBJ_UTIL= \
90 util/console.bc \
91 util/ctype.bc \
92 util/string.bc \
93 util/utf.bc
94
95 OBJ_TI= \
96 typeinfo/ti_AC.bc \
97 typeinfo/ti_Acdouble.bc \
98 typeinfo/ti_Acfloat.bc \
99 typeinfo/ti_Acreal.bc \
100 typeinfo/ti_Adouble.bc \
101 typeinfo/ti_Afloat.bc \
102 typeinfo/ti_Ag.bc \
103 typeinfo/ti_Aint.bc \
104 typeinfo/ti_Along.bc \
105 typeinfo/ti_Areal.bc \
106 typeinfo/ti_Ashort.bc \
107 typeinfo/ti_byte.bc \
108 typeinfo/ti_C.bc \
109 typeinfo/ti_cdouble.bc \
110 typeinfo/ti_cfloat.bc \
111 typeinfo/ti_char.bc \
112 typeinfo/ti_creal.bc \
113 typeinfo/ti_dchar.bc \
114 typeinfo/ti_delegate.bc \
115 typeinfo/ti_double.bc \
116 typeinfo/ti_float.bc \
117 typeinfo/ti_idouble.bc \
118 typeinfo/ti_ifloat.bc \
119 typeinfo/ti_int.bc \
120 typeinfo/ti_ireal.bc \
121 typeinfo/ti_long.bc \
122 typeinfo/ti_ptr.bc \
123 typeinfo/ti_real.bc \
124 typeinfo/ti_short.bc \
125 typeinfo/ti_ubyte.bc \
126 typeinfo/ti_uint.bc \
127 typeinfo/ti_ulong.bc \
128 typeinfo/ti_ushort.bc \
129 typeinfo/ti_void.bc \
130 typeinfo/ti_wchar.bc
131
132 ALL_OBJS= \
133 $(OBJ_BASE) \
134 $(OBJ_UTIL) \
135 $(OBJ_TI) \
136 moduleinfo.bc
137
138 ######################################################
139
140 ALL_DOCS=
141
142 ######################################################
143
144 llvmdc.lib : $(LIB_TARGET)
145
146 $(LIB_TARGET) : $(ALL_OBJS)
147 $(RM) $@
148 $(LC) $@ $(ALL_OBJS)
149
150 llvmdc.doc : $(ALL_DOCS)
151 echo No documentation available.
152
153 ######################################################
154
155 clean :
156 find . -name "*.di" | xargs $(RM)
157 $(RM) $(ALL_OBJS)
158 $(RM) $(ALL_DOCS)
159 $(RM) $(LIB_MASK)
160
161 install :
162 $(MD) $(LIB_DEST)
163 $(CP) $(LIB_MASK) $(LIB_DEST)/.