1 # Makefile to build the compiler runtime D library for Win32
2 # Designed to work with DigitalMars make
7 # Build the compiler runtime library
9 # Generate documentation
11 # Delete unneeded files created by build process
13 LIB_BASE=druntime-rt-dmd
15 LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).lib
16 LIB_MASK=$(LIB_BASE)*.lib
25 CFLAGS_RELEASE=-mn -6 -r $(ADD_CFLAGS)
26 CFLAGS_DEBUG=-g -mn -6 -r $(ADD_CFLAGS)
27 CFLAGS=$(CFLAGS_RELEASE)
29 DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)
30 DFLAGS_DEBUG=-g -w -nofloat $(ADD_DFLAGS)
31 DFLAGS=$(DFLAGS_RELEASE)
33 TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)
34 TFLAGS_DEBUG=-g -w -nofloat $(ADD_DFLAGS)
35 TFLAGS=$(TFLAGS_RELEASE)
37 DOCFLAGS=-version=DDoc
45 .DEFAULT: .asm .c .cpp .d .html .obj
51 $(CC) -c $(CFLAGS) $< -o$@
54 $(CC) -c $(CFLAGS) $< -o$@
57 $(DC) -c $(DFLAGS) $< -of$@
60 $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
67 ######################################################
100 # NOTE: trace.obj and cover.obj are not necessary for a successful build
101 # as both are used for debugging features (profiling and coverage)
102 # NOTE: a pre-compiled minit.obj has been provided in dmd for Win32 and
103 # minit.asm is not used by dmd for linux
114 typeinfo\ti_Acdouble.obj \
115 typeinfo\ti_Acfloat.obj \
116 typeinfo\ti_Acreal.obj \
117 typeinfo\ti_Adouble.obj \
118 typeinfo\ti_Afloat.obj \
120 typeinfo\ti_Aint.obj \
121 typeinfo\ti_Along.obj \
122 typeinfo\ti_Areal.obj \
123 typeinfo\ti_Ashort.obj \
124 typeinfo\ti_byte.obj \
126 typeinfo\ti_cdouble.obj \
127 typeinfo\ti_cfloat.obj \
128 typeinfo\ti_char.obj \
129 typeinfo\ti_creal.obj \
130 typeinfo\ti_dchar.obj \
131 typeinfo\ti_delegate.obj \
132 typeinfo\ti_double.obj \
133 typeinfo\ti_float.obj \
134 typeinfo\ti_idouble.obj \
135 typeinfo\ti_ifloat.obj \
136 typeinfo\ti_int.obj \
137 typeinfo\ti_ireal.obj \
138 typeinfo\ti_long.obj \
139 typeinfo\ti_ptr.obj \
140 typeinfo\ti_real.obj \
141 typeinfo\ti_short.obj \
142 typeinfo\ti_ubyte.obj \
143 typeinfo\ti_uint.obj \
144 typeinfo\ti_ulong.obj \
145 typeinfo\ti_ushort.obj \
146 typeinfo\ti_void.obj \
147 typeinfo\ti_wchar.obj
154 ######################################################
158 ######################################################
161 make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
164 make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
167 make -fwin32.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
169 ######################################################
171 dmd.lib : $(LIB_TARGET)
173 $(LIB_TARGET) : $(ALL_OBJS)
175 $(LC) -c -n $@ $(ALL_OBJS) minit.obj
177 dmd.doc : $(ALL_DOCS)
178 @echo No documentation available.
180 ######################################################
190 $(CP) $(LIB_MASK) $(LIB_DEST)\.