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-stub
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 ######################################################
73 ######################################################
77 ######################################################
80 make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
83 make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
86 make -fwin32.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
88 ######################################################
90 stub.lib : $(LIB_TARGET)
92 $(LIB_TARGET) : $(ALL_OBJS)
94 $(LC) -c -n $@ $(ALL_OBJS)
96 stub.doc : $(ALL_DOCS)
97 @echo No documentation available.
99 ######################################################
109 $(CP) $(LIB_MASK) $(LIB_DEST)\.
110 copy gc.obj $(LIB_DEST)\gcstub.obj