1 # Makefile to build the D runtime library core components for Posix
2 # Designed to work with GNU make
7 # Build the common library
9 # Generate documentation
11 # Delete unneeded files created by build process
13 LIB_TARGET=libdruntime-core.a
14 LIB_MASK=libdruntime-core*.a
23 CFLAGS=-O $(ADD_CFLAGS)
24 #CFLAGS=-g $(ADD_CFLAGS)
26 DFLAGS=-release -O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
27 #DFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
29 TFLAGS=-O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
30 #TFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
32 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) -Hf$*.di $< -of$@
58 # $(DC) -c $(DFLAGS) $< -of$@
61 $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
69 ######################################################
85 ######################################################
97 ######################################################
99 core.lib : $(LIB_TARGET)
101 $(LIB_TARGET) : $(ALL_OBJS)
105 core.doc : $(ALL_DOCS)
106 echo Documentation generated.
108 ######################################################
112 bitmanip.o : bitmanip.d
113 $(DC) -c $(DFLAGS) bitmanip.d -of$@
118 $(DC) -c $(DFLAGS) -d -Hf$*.di thread.d -of$@
120 ######################################################
123 find . -name "*.di" | xargs $(RM)
126 find . -name "$(LIB_MASK)" | xargs $(RM)
130 find . -name "*.di" -exec cp -f {} $(INC_DEST)/{} \;
132 find . -name "*.html" -exec cp -f {} $(DOC_DEST)/{} \;
134 find . -name "$(LIB_MASK)" -exec cp -f {} $(LIB_DEST)/{} \;