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-basic.a
14 LIB_MASK=libdruntime-gc-basic*.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)
29 TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
30 #TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
32 DOCFLAGS=-version=DDoc
40 .SUFFIXES: .s .S .c .cpp .d .html .o
43 $(CC) -c $(CFLAGS) $< -o$@
46 $(CC) -c $(CFLAGS) $< -o$@
49 $(CC) -c $(CFLAGS) $< -o$@
52 g++ -c $(CFLAGS) $< -o$@
55 $(DC) -c $(DFLAGS) $< -of$@
58 $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
59 # $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
66 ######################################################
75 ######################################################
79 ######################################################
81 basic.lib : $(LIB_TARGET)
83 $(LIB_TARGET) : $(ALL_OBJS)
87 basic.doc : $(ALL_DOCS)
88 echo No documentation available.
90 ######################################################
93 find . -name "*.di" | xargs $(RM)
100 $(CP) $(LIB_MASK) $(LIB_DEST)/.