1 # Makefile to build the garbage collector D library for Posix
\r
2 # Designed to work with GNU make
\r
7 # Build the garbage collector library
\r
9 # Generate documentation
\r
11 # Delete unneeded files created by build process
\r
13 LIB_TARGET=druntime-gc-stub.a
\r
14 LIB_MASK=druntime-gc-stub*.a
\r
23 CFLAGS=-O -m32 $(ADD_CFLAGS)
\r
24 #CFLAGS=-g -m32 $(ADD_CFLAGS)
\r
26 ### warnings disabled because gcx has issues ###
\r
28 DFLAGS=-release -O -inline -version=Posix $(ADD_DFLAGS)
\r
29 #DFLAGS=-g -version=Posix $(ADD_DFLAGS)
\r
31 TFLAGS=-O -inline -version=Posix $(ADD_DFLAGS)
\r
32 #TFLAGS=-g -version=Posix $(ADD_DFLAGS)
\r
34 DOCFLAGS=-version=DDoc -version=Posix
\r
42 .SUFFIXES: .s .S .c .cpp .d .html .o
\r
45 $(CC) -c $(CFLAGS) $< -o$@
\r
48 $(CC) -c $(CFLAGS) $< -o$@
\r
51 $(CC) -c $(CFLAGS) $< -o$@
\r
54 g++ -c $(CFLAGS) $< -o$@
\r
57 $(DC) -c $(DFLAGS) $< -of$@
\r
60 $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
\r
61 # $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
\r
68 ######################################################
\r
73 ######################################################
\r
77 ######################################################
\r
79 stub.lib : $(LIB_TARGET)
\r
81 $(LIB_TARGET) : $(ALL_OBJS)
\r
83 $(LC) $@ $(ALL_OBJS)
\r
85 stub.doc : $(ALL_DOCS)
\r
86 echo No documentation available.
\r
88 ######################################################
\r
91 find . -name "*.di" | xargs $(RM)
\r
98 $(CP) $(LIB_MASK) $(LIB_DEST)/.
\r