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