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=druntime-gc-stub.a
14 LIB_MASK=druntime-gc-stub*.a
23 CFLAGS=-O -m32 $(ADD_CFLAGS)
24 #CFLAGS=-g -m32 $(ADD_CFLAGS)
26 ### warnings disabled because gcx has issues ###
28 DFLAGS=-release -O -inline -version=Posix $(ADD_DFLAGS)
29 #DFLAGS=-g -version=Posix $(ADD_DFLAGS)
31 TFLAGS=-O -inline -version=Posix $(ADD_DFLAGS)
32 #TFLAGS=-g -version=Posix $(ADD_DFLAGS)
34 DOCFLAGS=-version=DDoc -version=Posix
42 .SUFFIXES: .s .S .c .cpp .d .html .o
45 $(CC) -c $(CFLAGS) $< -o$@
48 $(CC) -c $(CFLAGS) $< -o$@
51 $(CC) -c $(CFLAGS) $< -o$@
54 g++ -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 ######################################################
79 stub.lib : $(LIB_TARGET)
81 $(LIB_TARGET) : $(ALL_OBJS)
85 stub.doc : $(ALL_DOCS)
86 echo No documentation available.
88 ######################################################
91 find . -name "*.di" | xargs $(RM)
98 $(CP) $(LIB_MASK) $(LIB_DEST)/.