1 # Makefile to build the D runtime library core components for Win32
2 # Designed to work with DigitalMars make
7 # Build the common library
9 # Generate documentation
11 # Delete unneeded files created by build process
13 LIB_BASE=druntime-core
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
47 .DEFAULT: .asm .c .cpp .d .html .obj
53 $(CC) -c $(CFLAGS) $< -o$@
56 $(CC) -c $(CFLAGS) $< -o$@
59 $(DC) -c $(DFLAGS) -Hf$*.di $< -of$@
60 # $(DC) -c $(DFLAGS) $< -of$@
63 $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
71 ######################################################
88 ######################################################
98 ######################################################
102 ######################################################
105 make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
108 make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
111 make -fwin32.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
113 ######################################################
115 core.lib : $(LIB_TARGET)
117 $(LIB_TARGET) : $(ALL_OBJS)
119 $(LC) -c -n $@ $(ALL_OBJS)
121 core.doc : $(ALL_DOCS)
122 @echo Documentation generated.
124 ######################################################
128 core\bitmanip.obj : core\bitmanip.d
129 $(DC) -c $(DFLAGS) core\bitmanip.d -of$@
133 core\thread.obj : core\thread.d
134 $(DC) -c $(DFLAGS) -d -Hf$*.di core\thread.d -of$@
138 core\vararg.obj : core\vararg.d
139 $(DC) -c $(TFLAGS) -Hf$*.di core\vararg.d -of$@
141 ######################################################
151 $(CP) /s *.di $(INC_DEST)\.
153 $(CP) /s *.html $(DOC_DEST)\.
155 $(CP) $(LIB_MASK) $(LIB_DEST)\.