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
97 # NOTE: trace.obj and cover.obj are not necessary for a successful build
\r
98 # as both are used for debugging features (profiling and coverage)
\r
99 # NOTE: a pre-compiled minit.obj has been provided in dmd for Win32 and
\r
100 # minit.asm is not used by dmd for linux
\r
101 # NOTE: deh.o is only needed for Win32, linux uses deh2.o
\r
112 typeinfo/ti_Acdouble.o \
\r
113 typeinfo/ti_Acfloat.o \
\r
114 typeinfo/ti_Acreal.o \
\r
115 typeinfo/ti_Adouble.o \
\r
116 typeinfo/ti_Afloat.o \
\r
118 typeinfo/ti_Aint.o \
\r
119 typeinfo/ti_Along.o \
\r
120 typeinfo/ti_Areal.o \
\r
121 typeinfo/ti_Ashort.o \
\r
122 typeinfo/ti_byte.o \
\r
124 typeinfo/ti_cdouble.o \
\r
125 typeinfo/ti_cfloat.o \
\r
126 typeinfo/ti_char.o \
\r
127 typeinfo/ti_creal.o \
\r
128 typeinfo/ti_dchar.o \
\r
129 typeinfo/ti_delegate.o \
\r
130 typeinfo/ti_double.o \
\r
131 typeinfo/ti_float.o \
\r
132 typeinfo/ti_idouble.o \
\r
133 typeinfo/ti_ifloat.o \
\r
134 typeinfo/ti_int.o \
\r
135 typeinfo/ti_ireal.o \
\r
136 typeinfo/ti_long.o \
\r
137 typeinfo/ti_ptr.o \
\r
138 typeinfo/ti_real.o \
\r
139 typeinfo/ti_short.o \
\r
140 typeinfo/ti_ubyte.o \
\r
141 typeinfo/ti_uint.o \
\r
142 typeinfo/ti_ulong.o \
\r
143 typeinfo/ti_ushort.o \
\r
144 typeinfo/ti_void.o \
\r
145 typeinfo/ti_wchar.o
\r
152 ######################################################
\r
156 ######################################################
\r
158 dmd.lib : $(LIB_TARGET)
\r
160 $(LIB_TARGET) : $(ALL_OBJS)
\r
162 $(LC) $@ $(ALL_OBJS)
\r
164 dmd.doc : $(ALL_DOCS)
\r
165 echo No documentation available.
\r
167 ######################################################
\r
170 find . -name "*.di" | xargs $(RM)
\r
177 $(CP) $(LIB_MASK) $(LIB_DEST)/.
\r