-# Makefile to build the compiler runtime D library for Linux\r
-# Designed to work with GNU make\r
-# Targets:\r
-# make\r
-# Same as make all\r
-# make lib\r
-# Build the compiler runtime library\r
-# make doc\r
-# Generate documentation\r
-# make clean\r
-# Delete unneeded files created by build process\r
-\r
-LIB_TARGET=libdruntime-rt-dmd.a\r
-LIB_MASK=libdruntime-rt-dmd*.a\r
-\r
-CP=cp -f\r
-RM=rm -f\r
-MD=mkdir -p\r
-\r
-CFLAGS=-O $(ADD_CFLAGS)\r
-#CFLAGS=-g $(ADD_CFLAGS)\r
-\r
-DFLAGS=-release -O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)\r
-#DFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)\r
-\r
-TFLAGS=-O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)\r
-#TFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)\r
-\r
-DOCFLAGS=-version=DDoc -version=Posix\r
-\r
-CC=gcc\r
-LC=$(AR) -qsv\r
-DC=dmd\r
-\r
-LIB_DEST=../../../lib\r
-\r
-.SUFFIXES: .s .S .c .cpp .d .html .o\r
-\r
-.s.o:\r
- $(CC) -c $(CFLAGS) $< -o$@\r
-\r
-.S.o:\r
- $(CC) -c $(CFLAGS) $< -o$@\r
-\r
-.c.o:\r
- $(CC) -c $(CFLAGS) $< -o$@\r
-\r
-.cpp.o:\r
- g++ -c $(CFLAGS) $< -o$@\r
-\r
-.d.o:\r
- $(DC) -c $(DFLAGS) $< -of$@\r
-\r
-.d.html:\r
- $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<\r
-\r
-targets : lib doc\r
-all : lib doc\r
-lib : dmd.lib\r
-doc : dmd.doc\r
-\r
-######################################################\r
-\r
-OBJ_BASE= \\r
- aaA.o \\r
- aApply.o \\r
- aApplyR.o \\r
- adi.o \\r
- alloca.o \\r
- arraybyte.o \\r
- arraycast.o \\r
- arraycat.o \\r
- arraydouble.o \\r
- arrayfloat.o \\r
- arrayint.o \\r
- arrayreal.o \\r
- arrayshort.o \\r
- cast_.o \\r
- cmath2.o \\r
- complex.o \\r
- cover.o \\r
- critical.o \\r
- deh2.o \\r
- dmain2.o \\r
- invariant_.o \\r
- lifetime.o \\r
- llmath.o \\r
- memory.o \\r
- memset.o \\r
- monitor.o \\r
- obj.o \\r
- object_.o \\r
- qsort.o \\r
- switch_.o \\r
- trace.o\r
-# NOTE: trace.obj and cover.obj are not necessary for a successful build\r
-# as both are used for debugging features (profiling and coverage)\r
-# NOTE: a pre-compiled minit.obj has been provided in dmd for Win32 and\r
-# minit.asm is not used by dmd for linux\r
-# NOTE: deh.o is only needed for Win32, linux uses deh2.o\r
-\r
-OBJ_UTIL= \\r
- util/console.o \\r
- util/cpuid.o \\r
- util/ctype.o \\r
- util/string.o \\r
- util/utf.o\r
-\r
-OBJ_TI= \\r
- typeinfo/ti_AC.o \\r
- typeinfo/ti_Acdouble.o \\r
- typeinfo/ti_Acfloat.o \\r
- typeinfo/ti_Acreal.o \\r
- typeinfo/ti_Adouble.o \\r
- typeinfo/ti_Afloat.o \\r
- typeinfo/ti_Ag.o \\r
- typeinfo/ti_Aint.o \\r
- typeinfo/ti_Along.o \\r
- typeinfo/ti_Areal.o \\r
- typeinfo/ti_Ashort.o \\r
- typeinfo/ti_byte.o \\r
- typeinfo/ti_C.o \\r
- typeinfo/ti_cdouble.o \\r
- typeinfo/ti_cfloat.o \\r
- typeinfo/ti_char.o \\r
- typeinfo/ti_creal.o \\r
- typeinfo/ti_dchar.o \\r
- typeinfo/ti_delegate.o \\r
- typeinfo/ti_double.o \\r
- typeinfo/ti_float.o \\r
- typeinfo/ti_idouble.o \\r
- typeinfo/ti_ifloat.o \\r
- typeinfo/ti_int.o \\r
- typeinfo/ti_ireal.o \\r
- typeinfo/ti_long.o \\r
- typeinfo/ti_ptr.o \\r
- typeinfo/ti_real.o \\r
- typeinfo/ti_short.o \\r
- typeinfo/ti_ubyte.o \\r
- typeinfo/ti_uint.o \\r
- typeinfo/ti_ulong.o \\r
- typeinfo/ti_ushort.o \\r
- typeinfo/ti_void.o \\r
- typeinfo/ti_wchar.o\r
-\r
-ALL_OBJS= \\r
- $(OBJ_BASE) \\r
- $(OBJ_UTIL) \\r
- $(OBJ_TI)\r
-\r
-######################################################\r
-\r
-ALL_DOCS=\r
-\r
-######################################################\r
-\r
-dmd.lib : $(LIB_TARGET)\r
-\r
-$(LIB_TARGET) : $(ALL_OBJS)\r
- $(RM) $@\r
- $(LC) $@ $(ALL_OBJS)\r
-\r
-dmd.doc : $(ALL_DOCS)\r
- echo No documentation available.\r
-\r
-######################################################\r
-\r
-clean :\r
- find . -name "*.di" | xargs $(RM)\r
- $(RM) $(ALL_OBJS)\r
- $(RM) $(ALL_DOCS)\r
- $(RM) $(LIB_MASK)\r
-\r
-install :\r
- $(MD) $(LIB_DEST)\r
- $(CP) $(LIB_MASK) $(LIB_DEST)/.\r
+# Makefile to build the compiler runtime D library for Linux
+# Designed to work with GNU make
+# Targets:
+# make
+# Same as make all
+# make lib
+# Build the compiler runtime library
+# make doc
+# Generate documentation
+# make clean
+# Delete unneeded files created by build process
+
+LIB_BASE=libdruntime-rt-dmd
+LIB_BUILD=
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).a
+LIB_MASK=$(LIB_BASE)*.a
+
+CP=cp -f
+RM=rm -f
+MD=mkdir -p
+
+ADD_CFLAGS=
+ADD_DFLAGS=
+
+CFLAGS_RELEASE=-O $(ADD_CFLAGS)
+CFLAGS_DEBUG=-g $(ADD_CFLAGS)
+CFLAGS=$(CFLAGS_RELEASE)
+
+DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)
+DFLAGS_DEBUG=-g -w -nofloat $(ADD_DFLAGS)
+DFLAGS=$(DFLAGS_RELEASE)
+
+TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)
+TFLAGS_DEBUG=-g -w -nofloat $(ADD_DFLAGS)
+TFLAGS=$(TFLAGS_RELEASE)
+
+DOCFLAGS=-version=DDoc
+
+CC=gcc
+LC=$(AR) -qsv
+DC=dmd
+
+LIB_DEST=../../../lib
+
+.SUFFIXES: .s .S .c .cpp .d .html .o
+
+.s.o:
+ $(CC) -c $(CFLAGS) $< -o$@
+
+.S.o:
+ $(CC) -c $(CFLAGS) $< -o$@
+
+.c.o:
+ $(CC) -c $(CFLAGS) $< -o$@
+
+.cpp.o:
+ g++ -c $(CFLAGS) $< -o$@
+
+.d.o:
+ $(DC) -c $(DFLAGS) $< -of$@
+
+.d.html:
+ $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
+
+targets : lib doc
+all : lib doc
+lib : dmd.lib
+doc : dmd.doc
+
+######################################################
+
+OBJ_BASE= \
+ aaA.o \
+ aApply.o \
+ aApplyR.o \
+ adi.o \
+ alloca.o \
+ arrayassign.o \
+ arraybyte.o \
+ arraycast.o \
+ arraycat.o \
+ arraydouble.o \
+ arrayfloat.o \
+ arrayint.o \
+ arrayreal.o \
+ arrayshort.o \
+ cast_.o \
+ cmath2.o \
+ complex.o \
+ cover.o \
+ critical.o \
+ deh2.o \
+ dmain2.o \
+ invariant.o \
+ invariant_.o \
+ lifetime.o \
+ llmath.o \
+ memory.o \
+ memset.o \
+ monitor.o \
+ obj.o \
+ object_.o \
+ qsort.o \
+ switch_.o \
+ trace.o
+# NOTE: trace.obj and cover.obj are not necessary for a successful build
+# as both are used for debugging features (profiling and coverage)
+# NOTE: a pre-compiled minit.obj has been provided in dmd for Win32 and
+# minit.asm is not used by dmd for linux
+# NOTE: deh.o is only needed for Win32, linux uses deh2.o
+
+OBJ_UTIL= \
+ util/console.o \
+ util/cpuid.o \
+ util/ctype.o \
+ util/string.o \
+ util/utf.o
+
+OBJ_TI= \
+ typeinfo/ti_AC.o \
+ typeinfo/ti_Acdouble.o \
+ typeinfo/ti_Acfloat.o \
+ typeinfo/ti_Acreal.o \
+ typeinfo/ti_Adouble.o \
+ typeinfo/ti_Afloat.o \
+ typeinfo/ti_Ag.o \
+ typeinfo/ti_Aint.o \
+ typeinfo/ti_Along.o \
+ typeinfo/ti_Areal.o \
+ typeinfo/ti_Ashort.o \
+ typeinfo/ti_byte.o \
+ typeinfo/ti_C.o \
+ typeinfo/ti_cdouble.o \
+ typeinfo/ti_cfloat.o \
+ typeinfo/ti_char.o \
+ typeinfo/ti_creal.o \
+ typeinfo/ti_dchar.o \
+ typeinfo/ti_delegate.o \
+ typeinfo/ti_double.o \
+ typeinfo/ti_float.o \
+ typeinfo/ti_idouble.o \
+ typeinfo/ti_ifloat.o \
+ typeinfo/ti_int.o \
+ typeinfo/ti_ireal.o \
+ typeinfo/ti_long.o \
+ typeinfo/ti_ptr.o \
+ typeinfo/ti_real.o \
+ typeinfo/ti_short.o \
+ typeinfo/ti_ubyte.o \
+ typeinfo/ti_uint.o \
+ typeinfo/ti_ulong.o \
+ typeinfo/ti_ushort.o \
+ typeinfo/ti_void.o \
+ typeinfo/ti_wchar.o
+
+ALL_OBJS= \
+ $(OBJ_BASE) \
+ $(OBJ_UTIL) \
+ $(OBJ_TI)
+
+######################################################
+
+ALL_DOCS=
+
+######################################################
+
+unittest :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
+
+release :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
+
+debug :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
+
+######################################################
+
+dmd.lib : $(LIB_TARGET)
+
+$(LIB_TARGET) : $(ALL_OBJS)
+ $(RM) $@
+ $(LC) $@ $(ALL_OBJS)
+
+dmd.doc : $(ALL_DOCS)
+ echo No documentation available.
+
+######################################################
+
+clean :
+ find . -name "*.di" | xargs $(RM)
+ $(RM) $(ALL_OBJS)
+ $(RM) $(ALL_DOCS)
+ $(RM) $(LIB_MASK)
+
+install :
+ $(MD) $(LIB_DEST)
+ $(CP) $(LIB_MASK) $(LIB_DEST)/.