comparison runtime/internal/llvmdc.mak @ 443:44f08170f4ef

Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn. Reworked the LLVMDC specific pragmas.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Fri, 01 Aug 2008 00:32:06 +0200
parents
children 8bd31c8208da
comparison
equal deleted inserted replaced
442:76078c8ab5b9 443:44f08170f4ef
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-base-llvmdc.a
14 LIB_MASK=libtango-base-llvmdc*.a
15
16 LIB_TARGET_C=libtango-base-c-llvmdc.a
17 LIB_MASK_C=libtango-base-c-llvmdc*.a
18
19 CP=cp -f
20 RM=rm -f
21 MD=mkdir -p
22
23 #CFLAGS=-O3 $(ADD_CFLAGS)
24 CFLAGS=-g $(ADD_CFLAGS)
25
26 #DFLAGS=-release -O3 -inline -w $(ADD_DFLAGS)
27 DFLAGS=-g -w $(ADD_DFLAGS)
28
29 #TFLAGS=-O3 -inline -w $(ADD_DFLAGS)
30 TFLAGS=-g -w $(ADD_DFLAGS)
31
32 DOCFLAGS=-version=DDoc
33
34 CC=gcc
35 LC=llvm-ar rsv
36 CLC=ar rsv
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 .d.html:
60 $(DC) -c -o- $(DOCFLAGS) -Df$*.html llvmdc.ddoc $<
61
62 targets : lib doc
63 all : lib doc
64 lib : llvmdc.lib llvmdc.clib
65 doc : llvmdc.doc
66
67 ######################################################
68 OBJ_C= \
69 monitor.o \
70 critical.o
71
72 OBJ_BASE= \
73 aaA.bc \
74 aApply.bc \
75 aApplyR.bc \
76 adi.bc \
77 arrayInit.bc \
78 cast.bc \
79 dmain2.bc \
80 eh.bc \
81 genobj.bc \
82 lifetime.bc \
83 memory.bc \
84 qsort2.bc \
85 switch.bc \
86
87 OBJ_UTIL= \
88 util/console.bc \
89 util/ctype.bc \
90 util/string.bc \
91 util/utf.bc
92
93 OBJ_LLVMDC= \
94 llvmdc/bitmanip.bc \
95 llvmdc/vararg.bc
96
97 OBJ_TI= \
98 typeinfo/ti_AC.bc \
99 typeinfo/ti_Acdouble.bc \
100 typeinfo/ti_Acfloat.bc \
101 typeinfo/ti_Acreal.bc \
102 typeinfo/ti_Adouble.bc \
103 typeinfo/ti_Afloat.bc \
104 typeinfo/ti_Ag.bc \
105 typeinfo/ti_Aint.bc \
106 typeinfo/ti_Along.bc \
107 typeinfo/ti_Areal.bc \
108 typeinfo/ti_Ashort.bc \
109 typeinfo/ti_byte.bc \
110 typeinfo/ti_C.bc \
111 typeinfo/ti_cdouble.bc \
112 typeinfo/ti_cfloat.bc \
113 typeinfo/ti_char.bc \
114 typeinfo/ti_creal.bc \
115 typeinfo/ti_dchar.bc \
116 typeinfo/ti_delegate.bc \
117 typeinfo/ti_double.bc \
118 typeinfo/ti_float.bc \
119 typeinfo/ti_idouble.bc \
120 typeinfo/ti_ifloat.bc \
121 typeinfo/ti_int.bc \
122 typeinfo/ti_ireal.bc \
123 typeinfo/ti_long.bc \
124 typeinfo/ti_ptr.bc \
125 typeinfo/ti_real.bc \
126 typeinfo/ti_short.bc \
127 typeinfo/ti_ubyte.bc \
128 typeinfo/ti_uint.bc \
129 typeinfo/ti_ulong.bc \
130 typeinfo/ti_ushort.bc \
131 typeinfo/ti_void.bc \
132 typeinfo/ti_wchar.bc
133
134 ALL_OBJS= \
135 $(OBJ_BASE) \
136 $(OBJ_UTIL) \
137 $(OBJ_TI) \
138 $(OBJ_LLVMDC)
139
140 ######################################################
141
142 ALL_DOCS=
143
144 ######################################################
145
146 llvmdc.lib : $(LIB_TARGET)
147
148 $(LIB_TARGET) : $(ALL_OBJS)
149 $(RM) $@
150 $(LC) $@ $(ALL_OBJS)
151
152 llvmdc.clib : $(LIB_TARGET_C)
153
154 $(LIB_TARGET_C) : $(OBJ_C)
155 $(RM) $@
156 $(CLC) $@ $(OBJ_C)
157
158 llvmdc.doc : $(ALL_DOCS)
159 echo No documentation available.
160
161 ######################################################
162
163 clean :
164 find . -name "*.di" | xargs $(RM)
165 $(RM) $(ALL_OBJS)
166 $(RM) $(OBJ_C)
167 $(RM) $(ALL_DOCS)
168 $(RM) $(LIB_MASK)
169 $(RM) $(LIB_MASK_C)
170
171 install :
172 $(MD) $(LIB_DEST)
173 $(CP) $(LIB_MASK) $(LIB_DEST)/.
174 $(CP) $(LIB_MASK_C) $(LIB_DEST)/.