1 # Makefile to build the garbage collector D library for Win32
2 # Designed to work with DigitalMars make
7 # Build the garbage collector library
9 # Generate documentation
11 # Delete unneeded files created by build process
13 LIB_BASE=druntime-gc-basic
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 $<
61 # $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
68 ######################################################
77 ######################################################
81 ######################################################
84 make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
87 make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
90 make -fwin32.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
92 ######################################################
94 basic.lib : $(LIB_TARGET)
96 $(LIB_TARGET) : $(ALL_OBJS)
98 $(LC) -c -n $@ $(ALL_OBJS)
100 basic.doc : $(ALL_DOCS)
101 @echo No documentation available.
103 ######################################################
113 $(CP) $(LIB_MASK) $(LIB_DEST)\.