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