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 $(ADD_DFLAGS)
\r
27 #DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
\r
29 TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
\r
30 #TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
\r
32 DOCFLAGS=-version=DDoc
\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
88 core/bitmanip.html \
\r
89 core/exception.html \
\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 core/bitmanip.o : core/bitmanip.d
\r
113 $(DC) -c $(DFLAGS) core/bitmanip.d -of$@
\r
117 core/memory_.o : core/memory.d
\r
118 $(DC) -c $(DFLAGS) -Hf$*.di $< -of$@
\r
122 core/thread.o : core/thread.d
\r
123 $(DC) -c $(DFLAGS) -d -Hf$*.di core/thread.d -of$@
\r
125 ######################################################
\r
128 find . -name "*.di" | xargs $(RM)
\r
131 find . -name "$(LIB_MASK)" | xargs $(RM)
\r
135 find . -name "*.di" -exec cp -f {} $(INC_DEST)/{} \;
\r
137 find . -name "*.html" -exec cp -f {} $(DOC_DEST)/{} \;
\r
139 find . -name "$(LIB_MASK)" -exec cp -f {} $(LIB_DEST)/{} \;
\r