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_BASE=libdruntime-gc-basic
15 LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).a
16 LIB_MASK=$(LIB_BASE)*.a
25 CFLAGS_RELEASE=-O $(ADD_CFLAGS)
26 CFLAGS_DEBUG=-g $(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 .SUFFIXES: .s .S .c .cpp .d .html .o
48 $(CC) -c $(CFLAGS) $< -o$@
51 $(CC) -c $(CFLAGS) $< -o$@
54 $(CC) -c $(CFLAGS) $< -o$@
57 g++ -c $(CFLAGS) $< -o$@
60 $(DC) -c $(DFLAGS) $< -of$@
63 $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
64 # $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
71 ######################################################
80 ######################################################
84 ######################################################
87 make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
90 make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
93 make -fposix.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
95 ######################################################
97 basic.lib : $(LIB_TARGET)
99 $(LIB_TARGET) : $(ALL_OBJS)
103 basic.doc : $(ALL_DOCS)
104 echo No documentation available.
106 ######################################################
109 find . -name "*.di" | xargs $(RM)
116 $(CP) $(LIB_MASK) $(LIB_DEST)/.