1 # Makefile to build the compiler runtime D library for Linux
\r
2 # Designed to work with GNU make
\r
7 # Build the compiler runtime library
\r
9 # Generate documentation
\r
11 # Delete unneeded files created by build process
\r
13 LIB_TARGET=libdruntime-rt-dmd.a
\r
14 LIB_MASK=libdruntime-rt-dmd*.a
\r
20 CFLAGS=-O $(ADD_CFLAGS)
\r
21 #CFLAGS=-g $(ADD_CFLAGS)
\r
23 DFLAGS=-release -O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
\r
24 #DFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
\r
26 TFLAGS=-O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
\r
27 #TFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
\r
29 DOCFLAGS=-version=DDoc -version=Posix
\r
35 LIB_DEST=../../../lib
\r
37 .SUFFIXES: .s .S .c .cpp .d .html .o
\r
40 $(CC) -c $(CFLAGS) $< -o$@
\r
43 $(CC) -c $(CFLAGS) $< -o$@
\r
46 $(CC) -c $(CFLAGS) $< -o$@
\r
49 g++ -c $(CFLAGS) $< -o$@
\r
52 $(DC) -c $(DFLAGS) $< -of$@
\r
55 $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
\r
62 ######################################################
\r
96 # NOTE: trace.obj and cover.obj are not necessary for a successful build
\r
97 # as both are used for debugging features (profiling and coverage)
\r
98 # NOTE: a pre-compiled minit.obj has been provided in dmd for Win32 and
\r
99 # minit.asm is not used by dmd for linux
\r
100 # NOTE: deh.o is only needed for Win32, linux uses deh2.o
\r
111 typeinfo/ti_Acdouble.o \
\r
112 typeinfo/ti_Acfloat.o \
\r
113 typeinfo/ti_Acreal.o \
\r
114 typeinfo/ti_Adouble.o \
\r
115 typeinfo/ti_Afloat.o \
\r
117 typeinfo/ti_Aint.o \
\r
118 typeinfo/ti_Along.o \
\r
119 typeinfo/ti_Areal.o \
\r
120 typeinfo/ti_Ashort.o \
\r
121 typeinfo/ti_byte.o \
\r
123 typeinfo/ti_cdouble.o \
\r
124 typeinfo/ti_cfloat.o \
\r
125 typeinfo/ti_char.o \
\r
126 typeinfo/ti_creal.o \
\r
127 typeinfo/ti_dchar.o \
\r
128 typeinfo/ti_delegate.o \
\r
129 typeinfo/ti_double.o \
\r
130 typeinfo/ti_float.o \
\r
131 typeinfo/ti_idouble.o \
\r
132 typeinfo/ti_ifloat.o \
\r
133 typeinfo/ti_int.o \
\r
134 typeinfo/ti_ireal.o \
\r
135 typeinfo/ti_long.o \
\r
136 typeinfo/ti_ptr.o \
\r
137 typeinfo/ti_real.o \
\r
138 typeinfo/ti_short.o \
\r
139 typeinfo/ti_ubyte.o \
\r
140 typeinfo/ti_uint.o \
\r
141 typeinfo/ti_ulong.o \
\r
142 typeinfo/ti_ushort.o \
\r
143 typeinfo/ti_void.o \
\r
144 typeinfo/ti_wchar.o
\r
151 ######################################################
\r
155 ######################################################
\r
157 dmd.lib : $(LIB_TARGET)
\r
159 $(LIB_TARGET) : $(ALL_OBJS)
\r
161 $(LC) $@ $(ALL_OBJS)
\r
163 dmd.doc : $(ALL_DOCS)
\r
164 echo No documentation available.
\r
166 ######################################################
\r
169 find . -name "*.di" | xargs $(RM)
\r
176 $(CP) $(LIB_MASK) $(LIB_DEST)/.
\r