1 # Makefile to build the D runtime library core components for Win32
\r
2 # Designed to work with DigitalMars make
\r
7 # Build the common library
\r
9 # Generate documentation
\r
11 # Delete unneeded files created by build process
\r
13 LIB_BASE=druntime-core
\r
15 LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).lib
\r
16 LIB_MASK=$(LIB_BASE)*.lib
\r
25 CFLAGS_RELEASE=-mn -6 -r $(ADD_CFLAGS)
\r
26 CFLAGS_DEBUG=-D -g -mn -6 -r $(ADD_CFLAGS)
\r
27 CFLAGS=$(CFLAGS_RELEASE)
\r
29 DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)
\r
30 DFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
\r
31 DFLAGS=$(DFLAGS_RELEASE)
\r
33 TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)
\r
34 TFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
\r
35 TFLAGS=$(TFLAGS_RELEASE)
\r
37 DOCFLAGS=-version=DDoc
\r
43 INC_DEST=..\..\import
\r
47 .DEFAULT: .asm .c .cpp .d .html .obj
\r
53 $(CC) -c $(CFLAGS) $< -o$@
\r
56 $(CC) -c $(CFLAGS) $< -o$@
\r
59 $(DC) -c $(DFLAGS) -Hf$*.di $< -of$@
\r
60 # $(DC) -c $(DFLAGS) $< -of$@
\r
63 $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
\r
71 ######################################################
\r
75 core\exception.obj \
\r
87 ######################################################
\r
90 core\bitmanip.html \
\r
91 core\exception.html \
\r
96 ######################################################
\r
100 ######################################################
\r
103 make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
\r
106 make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
\r
109 make -fwin32.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
\r
111 ######################################################
\r
113 core.lib : $(LIB_TARGET)
\r
115 $(LIB_TARGET) : $(ALL_OBJS)
\r
117 $(LC) -c -n $@ $(ALL_OBJS)
\r
119 core.doc : $(ALL_DOCS)
\r
120 @echo Documentation generated.
\r
122 ######################################################
\r
126 core\bitmanip.obj : core\bitmanip.d
\r
127 $(DC) -c $(DFLAGS) core\bitmanip.d -of$@
\r
131 core\thread.obj : core\thread.d
\r
132 $(DC) -c $(DFLAGS) -d -Hf$*.di core\thread.d -of$@
\r
134 ######################################################
\r
143 $(MD) $(INC_DEST)\.
\r
144 $(CP) /s *.di $(INC_DEST)\.
\r
146 $(CP) /s *.html $(DOC_DEST)\.
\r
148 $(CP) $(LIB_MASK) $(LIB_DEST)\.
\r