1 # Makefile to build the garbage collector D library for Posix
2 # Designed to work with GNU make
7 # Build the garbage collector library
9 # Generate documentation
11 # Delete unneeded files created by build process
13 LIB_TARGET=libdruntime-gc-stub.a
14 LIB_MASK=libdruntime-gc-stub*.a
23 CFLAGS=-O $(ADD_CFLAGS)
24 #CFLAGS=-g $(ADD_CFLAGS)
26 DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)
27 #DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
30 TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
31 #TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
33 DOCFLAGS=-version=DDoc
41 .SUFFIXES: .s .S .c .cpp .d .html .o
44 $(CC) -c $(CFLAGS) $< -o$@
47 $(CC) -c $(CFLAGS) $< -o$@
50 $(CC) -c $(CFLAGS) $< -o$@
53 g++ -c $(CFLAGS) $< -o$@
56 $(DC) -c $(DFLAGS) $< -of$@
59 $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
60 # $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
67 ######################################################
72 ######################################################
76 ######################################################
78 stub.lib : $(LIB_TARGET)
80 $(LIB_TARGET) : $(ALL_OBJS)
84 stub.doc : $(ALL_DOCS)
85 echo No documentation available.
87 ######################################################
90 find . -name "*.di" | xargs $(RM)
97 $(CP) $(LIB_MASK) $(LIB_DEST)/.