-/**\r
- * This module contains a collection of bit-level operations.\r
- *\r
- * Copyright: Copyright (c) 2005-2008, The D Runtime Project\r
- * License: BSD Style, see LICENSE\r
- * Authors: Walter Bright, Don Clugston, Sean Kelly\r
- */\r
-module bitmanip;\r
-\r
-\r
-version( DDoc )\r
-{\r
- /**\r
- * Scans the bits in v starting with bit 0, looking\r
- * for the first set bit.\r
- * Returns:\r
- * The bit number of the first bit set.\r
- * The return value is undefined if v is zero.\r
- */\r
- int bsf( uint v );\r
-\r
-\r
- /**\r
- * Scans the bits in v from the most significant bit\r
- * to the least significant bit, looking\r
- * for the first set bit.\r
- * Returns:\r
- * The bit number of the first bit set.\r
- * The return value is undefined if v is zero.\r
- * Example:\r
- * ---\r
- * import bitmanip;\r
- *\r
- * int main()\r
- * {\r
- * uint v;\r
- * int x;\r
- *\r
- * v = 0x21;\r
- * x = bsf(v);\r
- * printf("bsf(x%x) = %d\n", v, x);\r
- * x = bsr(v);\r
- * printf("bsr(x%x) = %d\n", v, x);\r
- * return 0;\r
- * }\r
- * ---\r
- * Output:\r
- * bsf(x21) = 0<br>\r
- * bsr(x21) = 5\r
- */\r
- int bsr( uint v );\r
-\r
-\r
- /**\r
- * Tests the bit.\r
- */\r
- int bt( uint* p, uint bitnum );\r
-\r
-\r
- /**\r
- * Tests and complements the bit.\r
- */\r
- int btc( uint* p, uint bitnum );\r
-\r
-\r
- /**\r
- * Tests and resets (sets to 0) the bit.\r
- */\r
- int btr( uint* p, uint bitnum );\r
-\r
-\r
- /**\r
- * Tests and sets the bit.\r
- * Params:\r
- * p = a non-NULL pointer to an array of uints.\r
- * index = a bit number, starting with bit 0 of p[0],\r
- * and progressing. It addresses bits like the expression:\r
- ---\r
- p[index / (uint.sizeof*8)] & (1 << (index & ((uint.sizeof*8) - 1)))\r
- ---\r
- * Returns:\r
- * A non-zero value if the bit was set, and a zero\r
- * if it was clear.\r
- *\r
- * Example:\r
- * ---\r
- import bitmanip;\r
-\r
- int main()\r
- {\r
- uint array[2];\r
-\r
- array[0] = 2;\r
- array[1] = 0x100;\r
-\r
- printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));\r
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);\r
-\r
- printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));\r
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);\r
-\r
- printf("bts(array, 35) = %d\n", <b>bts</b>(array, 35));\r
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);\r
-\r
- printf("btr(array, 35) = %d\n", <b>btr</b>(array, 35));\r
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);\r
-\r
- printf("bt(array, 1) = %d\n", <b>bt</b>(array, 1));\r
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);\r
-\r
- return 0;\r
- }\r
- * ---\r
- * Output:\r
- <pre>\r
- btc(array, 35) = 0\r
- array = [0]:x2, [1]:x108\r
- btc(array, 35) = -1\r
- array = [0]:x2, [1]:x100\r
- bts(array, 35) = 0\r
- array = [0]:x2, [1]:x108\r
- btr(array, 35) = -1\r
- array = [0]:x2, [1]:x100\r
- bt(array, 1) = -1\r
- array = [0]:x2, [1]:x100\r
- </pre>\r
- */\r
- int bts( uint* p, uint bitnum );\r
-\r
-\r
- /**\r
- * Swaps bytes in a 4 byte uint end-to-end, i.e. byte 0 becomes\r
- * byte 3, byte 1 becomes byte 2, byte 2 becomes byte 1, byte 3\r
- * becomes byte 0.\r
- */\r
- uint bswap( uint v );\r
-\r
-\r
- /**\r
- * Reads I/O port at port_address.\r
- */\r
- ubyte inp( uint port_address );\r
-\r
-\r
- /**\r
- * ditto\r
- */\r
- ushort inpw( uint port_address );\r
-\r
-\r
- /**\r
- * ditto\r
- */\r
- uint inpl( uint port_address );\r
-\r
-\r
- /**\r
- * Writes and returns value to I/O port at port_address.\r
- */\r
- ubyte outp( uint port_address, ubyte value );\r
-\r
-\r
- /**\r
- * ditto\r
- */\r
- ushort outpw( uint port_address, ushort value );\r
-\r
-\r
- /**\r
- * ditto\r
- */\r
- uint outpl( uint port_address, uint value );\r
-}\r
-else\r
-{\r
- public import std.intrinsic;\r
-}\r
-\r
-\r
-/**\r
- * Calculates the number of set bits in a 32-bit integer.\r
- */\r
-int popcnt( uint x )\r
-{\r
- // Avoid branches, and the potential for cache misses which\r
- // could be incurred with a table lookup.\r
-\r
- // We need to mask alternate bits to prevent the\r
- // sum from overflowing.\r
- // add neighbouring bits. Each bit is 0 or 1.\r
- x = x - ((x>>1) & 0x5555_5555);\r
- // now each two bits of x is a number 00,01 or 10.\r
- // now add neighbouring pairs\r
- x = ((x&0xCCCC_CCCC)>>2) + (x&0x3333_3333);\r
- // now each nibble holds 0000-0100. Adding them won't\r
- // overflow any more, so we don't need to mask any more\r
-\r
- // Now add the nibbles, then the bytes, then the words\r
- // We still need to mask to prevent double-counting.\r
- // Note that if we used a rotate instead of a shift, we\r
- // wouldn't need the masks, and could just divide the sum\r
- // by 8 to account for the double-counting.\r
- // On some CPUs, it may be faster to perform a multiply.\r
-\r
- x += (x>>4);\r
- x &= 0x0F0F_0F0F;\r
- x += (x>>8);\r
- x &= 0x00FF_00FF;\r
- x += (x>>16);\r
- x &= 0xFFFF;\r
- return x;\r
-}\r
-\r
-\r
-/**\r
- * Reverses the order of bits in a 32-bit integer.\r
- */\r
-uint bitswap( uint x )\r
-{\r
-\r
- version( D_InlineAsm_X86 )\r
- {\r
- asm\r
- {\r
- // Author: Tiago Gasiba.\r
- mov EDX, EAX;\r
- shr EAX, 1;\r
- and EDX, 0x5555_5555;\r
- and EAX, 0x5555_5555;\r
- shl EDX, 1;\r
- or EAX, EDX;\r
- mov EDX, EAX;\r
- shr EAX, 2;\r
- and EDX, 0x3333_3333;\r
- and EAX, 0x3333_3333;\r
- shl EDX, 2;\r
- or EAX, EDX;\r
- mov EDX, EAX;\r
- shr EAX, 4;\r
- and EDX, 0x0f0f_0f0f;\r
- and EAX, 0x0f0f_0f0f;\r
- shl EDX, 4;\r
- or EAX, EDX;\r
- bswap EAX;\r
- }\r
- }\r
- else\r
- {\r
- // swap odd and even bits\r
- x = ((x >> 1) & 0x5555_5555) | ((x & 0x5555_5555) << 1);\r
- // swap consecutive pairs\r
- x = ((x >> 2) & 0x3333_3333) | ((x & 0x3333_3333) << 2);\r
- // swap nibbles\r
- x = ((x >> 4) & 0x0F0F_0F0F) | ((x & 0x0F0F_0F0F) << 4);\r
- // swap bytes\r
- x = ((x >> 8) & 0x00FF_00FF) | ((x & 0x00FF_00FF) << 8);\r
- // swap 2-byte long pairs\r
- x = ( x >> 16 ) | ( x << 16);\r
- return x;\r
-\r
- }\r
-}\r
+/**
+ * This module contains a collection of bit-level operations.
+ *
+ * Copyright: Copyright (c) 2005-2008, The D Runtime Project
+ * License: BSD Style, see LICENSE
+ * Authors: Walter Bright, Don Clugston, Sean Kelly
+ */
+module bitmanip;
+
+
+version( DDoc )
+{
+ /**
+ * Scans the bits in v starting with bit 0, looking
+ * for the first set bit.
+ * Returns:
+ * The bit number of the first bit set.
+ * The return value is undefined if v is zero.
+ */
+ int bsf( uint v );
+
+
+ /**
+ * Scans the bits in v from the most significant bit
+ * to the least significant bit, looking
+ * for the first set bit.
+ * Returns:
+ * The bit number of the first bit set.
+ * The return value is undefined if v is zero.
+ * Example:
+ * ---
+ * import bitmanip;
+ *
+ * int main()
+ * {
+ * uint v;
+ * int x;
+ *
+ * v = 0x21;
+ * x = bsf(v);
+ * printf("bsf(x%x) = %d\n", v, x);
+ * x = bsr(v);
+ * printf("bsr(x%x) = %d\n", v, x);
+ * return 0;
+ * }
+ * ---
+ * Output:
+ * bsf(x21) = 0<br>
+ * bsr(x21) = 5
+ */
+ int bsr( uint v );
+
+
+ /**
+ * Tests the bit.
+ */
+ int bt( uint* p, uint bitnum );
+
+
+ /**
+ * Tests and complements the bit.
+ */
+ int btc( uint* p, uint bitnum );
+
+
+ /**
+ * Tests and resets (sets to 0) the bit.
+ */
+ int btr( uint* p, uint bitnum );
+
+
+ /**
+ * Tests and sets the bit.
+ * Params:
+ * p = a non-NULL pointer to an array of uints.
+ * index = a bit number, starting with bit 0 of p[0],
+ * and progressing. It addresses bits like the expression:
+ ---
+ p[index / (uint.sizeof*8)] & (1 << (index & ((uint.sizeof*8) - 1)))
+ ---
+ * Returns:
+ * A non-zero value if the bit was set, and a zero
+ * if it was clear.
+ *
+ * Example:
+ * ---
+ import bitmanip;
+
+ int main()
+ {
+ uint array[2];
+
+ array[0] = 2;
+ array[1] = 0x100;
+
+ printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));
+ printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+
+ printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));
+ printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+
+ printf("bts(array, 35) = %d\n", <b>bts</b>(array, 35));
+ printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+
+ printf("btr(array, 35) = %d\n", <b>btr</b>(array, 35));
+ printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+
+ printf("bt(array, 1) = %d\n", <b>bt</b>(array, 1));
+ printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+
+ return 0;
+ }
+ * ---
+ * Output:
+ <pre>
+ btc(array, 35) = 0
+ array = [0]:x2, [1]:x108
+ btc(array, 35) = -1
+ array = [0]:x2, [1]:x100
+ bts(array, 35) = 0
+ array = [0]:x2, [1]:x108
+ btr(array, 35) = -1
+ array = [0]:x2, [1]:x100
+ bt(array, 1) = -1
+ array = [0]:x2, [1]:x100
+ </pre>
+ */
+ int bts( uint* p, uint bitnum );
+
+
+ /**
+ * Swaps bytes in a 4 byte uint end-to-end, i.e. byte 0 becomes
+ * byte 3, byte 1 becomes byte 2, byte 2 becomes byte 1, byte 3
+ * becomes byte 0.
+ */
+ uint bswap( uint v );
+
+
+ /**
+ * Reads I/O port at port_address.
+ */
+ ubyte inp( uint port_address );
+
+
+ /**
+ * ditto
+ */
+ ushort inpw( uint port_address );
+
+
+ /**
+ * ditto
+ */
+ uint inpl( uint port_address );
+
+
+ /**
+ * Writes and returns value to I/O port at port_address.
+ */
+ ubyte outp( uint port_address, ubyte value );
+
+
+ /**
+ * ditto
+ */
+ ushort outpw( uint port_address, ushort value );
+
+
+ /**
+ * ditto
+ */
+ uint outpl( uint port_address, uint value );
+}
+else
+{
+ public import std.intrinsic;
+}
+
+
+/**
+ * Calculates the number of set bits in a 32-bit integer.
+ */
+int popcnt( uint x )
+{
+ // Avoid branches, and the potential for cache misses which
+ // could be incurred with a table lookup.
+
+ // We need to mask alternate bits to prevent the
+ // sum from overflowing.
+ // add neighbouring bits. Each bit is 0 or 1.
+ x = x - ((x>>1) & 0x5555_5555);
+ // now each two bits of x is a number 00,01 or 10.
+ // now add neighbouring pairs
+ x = ((x&0xCCCC_CCCC)>>2) + (x&0x3333_3333);
+ // now each nibble holds 0000-0100. Adding them won't
+ // overflow any more, so we don't need to mask any more
+
+ // Now add the nibbles, then the bytes, then the words
+ // We still need to mask to prevent double-counting.
+ // Note that if we used a rotate instead of a shift, we
+ // wouldn't need the masks, and could just divide the sum
+ // by 8 to account for the double-counting.
+ // On some CPUs, it may be faster to perform a multiply.
+
+ x += (x>>4);
+ x &= 0x0F0F_0F0F;
+ x += (x>>8);
+ x &= 0x00FF_00FF;
+ x += (x>>16);
+ x &= 0xFFFF;
+ return x;
+}
+
+
+/**
+ * Reverses the order of bits in a 32-bit integer.
+ */
+uint bitswap( uint x )
+{
+
+ version( D_InlineAsm_X86 )
+ {
+ asm
+ {
+ // Author: Tiago Gasiba.
+ mov EDX, EAX;
+ shr EAX, 1;
+ and EDX, 0x5555_5555;
+ and EAX, 0x5555_5555;
+ shl EDX, 1;
+ or EAX, EDX;
+ mov EDX, EAX;
+ shr EAX, 2;
+ and EDX, 0x3333_3333;
+ and EAX, 0x3333_3333;
+ shl EDX, 2;
+ or EAX, EDX;
+ mov EDX, EAX;
+ shr EAX, 4;
+ and EDX, 0x0f0f_0f0f;
+ and EAX, 0x0f0f_0f0f;
+ shl EDX, 4;
+ or EAX, EDX;
+ bswap EAX;
+ }
+ }
+ else
+ {
+ // swap odd and even bits
+ x = ((x >> 1) & 0x5555_5555) | ((x & 0x5555_5555) << 1);
+ // swap consecutive pairs
+ x = ((x >> 2) & 0x3333_3333) | ((x & 0x3333_3333) << 2);
+ // swap nibbles
+ x = ((x >> 4) & 0x0F0F_0F0F) | ((x & 0x0F0F_0F0F) << 4);
+ // swap bytes
+ x = ((x >> 8) & 0x00FF_00FF) | ((x & 0x00FF_00FF) << 8);
+ // swap 2-byte long pairs
+ x = ( x >> 16 ) | ( x << 16);
+ return x;
+
+ }
+}
-module object;\r
-\r
-alias typeof(int.sizeof) size_t;\r
-alias typeof(cast(void*)0 - cast(void*)0) ptrdiff_t;\r
-\r
-alias size_t hash_t;\r
-alias bool equals_t;\r
-\r
-alias invariant(char)[] string;\r
-alias invariant(wchar)[] wstring;\r
-alias invariant(dchar)[] dstring;\r
-\r
-class Object\r
-{\r
- string toString();\r
- hash_t toHash();\r
- int opCmp(Object o);\r
- equals_t opEquals(Object o);\r
-\r
- interface Monitor\r
- {\r
- void lock();\r
- void unlock();\r
- }\r
-}\r
-\r
-struct Interface\r
-{\r
- ClassInfo classinfo;\r
- void*[] vtbl;\r
- ptrdiff_t offset; // offset to Interface 'this' from Object 'this'\r
-}\r
-\r
-class ClassInfo : Object\r
-{\r
- byte[] init; // class static initializer\r
- string name; // class name\r
- void*[] vtbl; // virtual function pointer table\r
- Interface[] interfaces;\r
- ClassInfo base;\r
- void* destructor;\r
- void(*classInvariant)(Object);\r
- uint flags;\r
- // 1: // is IUnknown or is derived from IUnknown\r
- // 2: // has no possible pointers into GC memory\r
- // 4: // has offTi[] member\r
- // 8: // has constructors\r
- // 16: // has xgetMembers member\r
- void* deallocator;\r
- OffsetTypeInfo[] offTi;\r
- void* defaultConstructor;\r
- const(MemberInfo[]) function(string) xgetMembers;\r
-\r
- static ClassInfo find(in char[] classname);\r
- Object create();\r
- const(MemberInfo[]) getMembers(in char[] classname);\r
-}\r
-\r
-struct OffsetTypeInfo\r
-{\r
- size_t offset;\r
- TypeInfo ti;\r
-}\r
-\r
-class TypeInfo\r
-{\r
- hash_t getHash(in void* p);\r
- equals_t equals(in void* p1, in void* p2);\r
- int compare(in void* p1, in void* p2);\r
- size_t tsize();\r
- void swap(void* p1, void* p2);\r
- TypeInfo next();\r
- void[] init();\r
- uint flags();\r
- // 1: // has possible pointers into GC memory\r
- OffsetTypeInfo[] offTi();\r
- void destroy(void* p);\r
- void postblit(void* p);\r
-}\r
-\r
-class TypeInfo_Typedef : TypeInfo\r
-{\r
- TypeInfo base;\r
- string name;\r
- void[] m_init;\r
-}\r
-\r
-class TypeInfo_Enum : TypeInfo_Typedef\r
-{\r
-\r
-}\r
-\r
-class TypeInfo_Pointer : TypeInfo\r
-{\r
- TypeInfo m_next;\r
-}\r
-\r
-class TypeInfo_Array : TypeInfo\r
-{\r
- TypeInfo value;\r
-}\r
-\r
-class TypeInfo_StaticArray : TypeInfo\r
-{\r
- TypeInfo value;\r
- size_t len;\r
-}\r
-\r
-class TypeInfo_AssociativeArray : TypeInfo\r
-{\r
- TypeInfo value;\r
- TypeInfo key;\r
-}\r
-\r
-class TypeInfo_Function : TypeInfo\r
-{\r
- TypeInfo next;\r
-}\r
-\r
-class TypeInfo_Delegate : TypeInfo\r
-{\r
- TypeInfo next;\r
-}\r
-\r
-class TypeInfo_Class : TypeInfo\r
-{\r
- ClassInfo info;\r
-}\r
-\r
-class TypeInfo_Interface : TypeInfo\r
-{\r
- ClassInfo info;\r
-}\r
-\r
-class TypeInfo_Struct : TypeInfo\r
-{\r
- string name;\r
- void[] m_init;\r
-\r
- uint function(in void*) xtoHash;\r
- equals_t function(in void*, in void*) xopEquals;\r
- int function(in void*, in void*) xopCmp;\r
- string function(in void*) xtoString;\r
-\r
- uint m_flags;\r
-\r
- const(MemberInfo[]) function(in char[]) xgetMembers;\r
- void function(void*) xdtor;\r
- void function(void*) xpostblit;\r
-}\r
-\r
-class TypeInfo_Tuple : TypeInfo\r
-{\r
- TypeInfo[] elements;\r
-}\r
-\r
-class TypeInfo_Const : TypeInfo\r
-{\r
- TypeInfo next;\r
-}\r
-\r
-class TypeInfo_Invariant : TypeInfo_Const\r
-{\r
-\r
-}\r
-\r
-abstract class MemberInfo\r
-{\r
- string name();\r
-}\r
-\r
-class MemberInfo_field : MemberInfo\r
-{\r
- this(string name, TypeInfo ti, size_t offset);\r
-\r
- override string name();\r
- TypeInfo typeInfo();\r
- size_t offset();\r
-}\r
-\r
-class MemberInfo_function : MemberInfo\r
-{\r
- enum\r
- {\r
- Virtual = 1,\r
- Member = 2,\r
- Static = 4,\r
- }\r
-\r
- this(string name, TypeInfo ti, void* fp, uint flags);\r
-\r
- override string name();\r
- TypeInfo typeInfo();\r
- void* fp();\r
- uint flags();\r
-}\r
-\r
-class ModuleInfo\r
-{\r
- string name;\r
- ModuleInfo[] importedModules;\r
- ClassInfo[] localClasses;\r
- uint flags;\r
-\r
- void function() ctor;\r
- void function() dtor;\r
- void function() unitTest;\r
-\r
- static int opApply( int delegate( inout ModuleInfo ) );\r
-}\r
-\r
-class Exception : Object\r
-{\r
- interface TraceInfo\r
- {\r
- int opApply( int delegate(inout char[]) );\r
- string toString();\r
- }\r
-\r
- string msg;\r
- string file;\r
- size_t line;\r
- TraceInfo info;\r
- Exception next;\r
-\r
- this(string msg, Exception next = null);\r
- this(string msg, string file, size_t line, Exception next = null);\r
- override string toString();\r
-}\r
+module object;
+
+alias typeof(int.sizeof) size_t;
+alias typeof(cast(void*)0 - cast(void*)0) ptrdiff_t;
+
+alias size_t hash_t;
+alias bool equals_t;
+
+alias invariant(char)[] string;
+alias invariant(wchar)[] wstring;
+alias invariant(dchar)[] dstring;
+
+class Object
+{
+ string toString();
+ hash_t toHash();
+ int opCmp(Object o);
+ equals_t opEquals(Object o);
+
+ interface Monitor
+ {
+ void lock();
+ void unlock();
+ }
+}
+
+struct Interface
+{
+ ClassInfo classinfo;
+ void*[] vtbl;
+ ptrdiff_t offset; // offset to Interface 'this' from Object 'this'
+}
+
+class ClassInfo : Object
+{
+ byte[] init; // class static initializer
+ string name; // class name
+ void*[] vtbl; // virtual function pointer table
+ Interface[] interfaces;
+ ClassInfo base;
+ void* destructor;
+ void(*classInvariant)(Object);
+ uint flags;
+ // 1: // is IUnknown or is derived from IUnknown
+ // 2: // has no possible pointers into GC memory
+ // 4: // has offTi[] member
+ // 8: // has constructors
+ // 16: // has xgetMembers member
+ void* deallocator;
+ OffsetTypeInfo[] offTi;
+ void* defaultConstructor;
+ const(MemberInfo[]) function(string) xgetMembers;
+
+ static ClassInfo find(in char[] classname);
+ Object create();
+ const(MemberInfo[]) getMembers(in char[] classname);
+}
+
+struct OffsetTypeInfo
+{
+ size_t offset;
+ TypeInfo ti;
+}
+
+class TypeInfo
+{
+ hash_t getHash(in void* p);
+ equals_t equals(in void* p1, in void* p2);
+ int compare(in void* p1, in void* p2);
+ size_t tsize();
+ void swap(void* p1, void* p2);
+ TypeInfo next();
+ void[] init();
+ uint flags();
+ // 1: // has possible pointers into GC memory
+ OffsetTypeInfo[] offTi();
+ void destroy(void* p);
+ void postblit(void* p);
+}
+
+class TypeInfo_Typedef : TypeInfo
+{
+ TypeInfo base;
+ string name;
+ void[] m_init;
+}
+
+class TypeInfo_Enum : TypeInfo_Typedef
+{
+
+}
+
+class TypeInfo_Pointer : TypeInfo
+{
+ TypeInfo m_next;
+}
+
+class TypeInfo_Array : TypeInfo
+{
+ TypeInfo value;
+}
+
+class TypeInfo_StaticArray : TypeInfo
+{
+ TypeInfo value;
+ size_t len;
+}
+
+class TypeInfo_AssociativeArray : TypeInfo
+{
+ TypeInfo value;
+ TypeInfo key;
+}
+
+class TypeInfo_Function : TypeInfo
+{
+ TypeInfo next;
+}
+
+class TypeInfo_Delegate : TypeInfo
+{
+ TypeInfo next;
+}
+
+class TypeInfo_Class : TypeInfo
+{
+ ClassInfo info;
+}
+
+class TypeInfo_Interface : TypeInfo
+{
+ ClassInfo info;
+}
+
+class TypeInfo_Struct : TypeInfo
+{
+ string name;
+ void[] m_init;
+
+ uint function(in void*) xtoHash;
+ equals_t function(in void*, in void*) xopEquals;
+ int function(in void*, in void*) xopCmp;
+ string function(in void*) xtoString;
+
+ uint m_flags;
+
+ const(MemberInfo[]) function(in char[]) xgetMembers;
+ void function(void*) xdtor;
+ void function(void*) xpostblit;
+}
+
+class TypeInfo_Tuple : TypeInfo
+{
+ TypeInfo[] elements;
+}
+
+class TypeInfo_Const : TypeInfo
+{
+ TypeInfo next;
+}
+
+class TypeInfo_Invariant : TypeInfo_Const
+{
+
+}
+
+abstract class MemberInfo
+{
+ string name();
+}
+
+class MemberInfo_field : MemberInfo
+{
+ this(string name, TypeInfo ti, size_t offset);
+
+ override string name();
+ TypeInfo typeInfo();
+ size_t offset();
+}
+
+class MemberInfo_function : MemberInfo
+{
+ enum
+ {
+ Virtual = 1,
+ Member = 2,
+ Static = 4,
+ }
+
+ this(string name, TypeInfo ti, void* fp, uint flags);
+
+ override string name();
+ TypeInfo typeInfo();
+ void* fp();
+ uint flags();
+}
+
+class ModuleInfo
+{
+ string name;
+ ModuleInfo[] importedModules;
+ ClassInfo[] localClasses;
+ uint flags;
+
+ void function() ctor;
+ void function() dtor;
+ void function() unitTest;
+
+ static int opApply( int delegate( inout ModuleInfo ) );
+}
+
+class Exception : Object
+{
+ interface TraceInfo
+ {
+ int opApply( int delegate(inout char[]) );
+ string toString();
+ }
+
+ string msg;
+ string file;
+ size_t line;
+ TraceInfo info;
+ Exception next;
+
+ this(string msg, Exception next = null);
+ this(string msg, string file, size_t line, Exception next = null);
+ override string toString();
+}
-/**\r
- * These functions are built-in intrinsics to the compiler.\r
- *\r
- * Copyright: Public Domain\r
- * License: Public Domain\r
- * Authors: David Friedman\r
- */\r
-module std.c.stdarg;\r
-\r
-version( GNU )\r
-{\r
- private import gcc.builtins;\r
- alias __builtin_va_list va_list;\r
- alias __builtin_va_end va_end;\r
- alias __builtin_va_copy va_copy;\r
-}\r
-\r
-template va_start(T)\r
-{\r
- void va_start( out va_list ap, inout T parmn )\r
- {\r
-\r
- }\r
-}\r
-\r
-template va_arg(T)\r
-{\r
- T va_arg( inout va_list ap )\r
- {\r
- return T.init;\r
- }\r
-}\r
+/**
+ * These functions are built-in intrinsics to the compiler.
+ *
+ * Copyright: Public Domain
+ * License: Public Domain
+ * Authors: David Friedman
+ */
+module std.c.stdarg;
+
+version( GNU )
+{
+ private import gcc.builtins;
+ alias __builtin_va_list va_list;
+ alias __builtin_va_end va_end;
+ alias __builtin_va_copy va_copy;
+}
+
+template va_start(T)
+{
+ void va_start( out va_list ap, inout T parmn )
+ {
+
+ }
+}
+
+template va_arg(T)
+{
+ T va_arg( inout va_list ap )
+ {
+ return T.init;
+ }
+}
-/**\r
- * These functions are built-in intrinsics to the compiler.\r
- *\r
- * Intrinsic functions are functions built in to the compiler, usually to take\r
- * advantage of specific CPU features that are inefficient to handle via\r
- * external functions. The compiler's optimizer and code generator are fully\r
- * integrated in with intrinsic functions, bringing to bear their full power on\r
- * them. This can result in some surprising speedups.\r
- *\r
- * Copyright: Public Domain\r
- * License: Public Domain\r
- * Authors: Walter Bright\r
- */\r
-module std.intrinsic;\r
-\r
-\r
-/**\r
- * Scans the bits in v starting with bit 0, looking\r
- * for the first set bit.\r
- * Returns:\r
- * The bit number of the first bit set.\r
- * The return value is undefined if v is zero.\r
- */\r
-int bsf( uint v );\r
-\r
-\r
-/**\r
- * Scans the bits in v from the most significant bit\r
- * to the least significant bit, looking\r
- * for the first set bit.\r
- * Returns:\r
- * The bit number of the first bit set.\r
- * The return value is undefined if v is zero.\r
- * Example:\r
- * ---\r
- * import std.intrinsic;\r
- *\r
- * int main()\r
- * {\r
- * uint v;\r
- * int x;\r
- *\r
- * v = 0x21;\r
- * x = bsf(v);\r
- * printf("bsf(x%x) = %d\n", v, x);\r
- * x = bsr(v);\r
- * printf("bsr(x%x) = %d\n", v, x);\r
- * return 0;\r
- * }\r
- * ---\r
- * Output:\r
- * bsf(x21) = 0<br>\r
- * bsr(x21) = 5\r
- */\r
-int bsr( uint v );\r
-\r
-\r
-/**\r
- * Tests the bit.\r
- */\r
-int bt( uint* p, uint bitnum );\r
-\r
-\r
-/**\r
- * Tests and complements the bit.\r
- */\r
-int btc( uint* p, uint bitnum );\r
-\r
-\r
-/**\r
- * Tests and resets (sets to 0) the bit.\r
- */\r
-int btr( uint* p, uint bitnum );\r
-\r
-\r
-/**\r
- * Tests and sets the bit.\r
- * Params:\r
- * p = a non-NULL pointer to an array of uints.\r
- * index = a bit number, starting with bit 0 of p[0],\r
- * and progressing. It addresses bits like the expression:\r
----\r
-p[index / (uint.sizeof*8)] & (1 << (index & ((uint.sizeof*8) - 1)))\r
----\r
- * Returns:\r
- * A non-zero value if the bit was set, and a zero\r
- * if it was clear.\r
- *\r
- * Example:\r
- * ---\r
-import std.intrinsic;\r
-\r
-int main()\r
-{\r
- uint array[2];\r
-\r
- array[0] = 2;\r
- array[1] = 0x100;\r
-\r
- printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));\r
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);\r
-\r
- printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));\r
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);\r
-\r
- printf("bts(array, 35) = %d\n", <b>bts</b>(array, 35));\r
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);\r
-\r
- printf("btr(array, 35) = %d\n", <b>btr</b>(array, 35));\r
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);\r
-\r
- printf("bt(array, 1) = %d\n", <b>bt</b>(array, 1));\r
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);\r
-\r
- return 0;\r
-}\r
- * ---\r
- * Output:\r
-<pre>\r
-btc(array, 35) = 0\r
-array = [0]:x2, [1]:x108\r
-btc(array, 35) = -1\r
-array = [0]:x2, [1]:x100\r
-bts(array, 35) = 0\r
-array = [0]:x2, [1]:x108\r
-btr(array, 35) = -1\r
-array = [0]:x2, [1]:x100\r
-bt(array, 1) = -1\r
-array = [0]:x2, [1]:x100\r
-</pre>\r
- */\r
-int bts( uint* p, uint bitnum );\r
-\r
-\r
-/**\r
- * Swaps bytes in a 4 byte uint end-to-end, i.e. byte 0 becomes\r
- * byte 3, byte 1 becomes byte 2, byte 2 becomes byte 1, byte 3\r
- * becomes byte 0.\r
- */\r
-uint bswap( uint v );\r
-\r
-\r
-/**\r
- * Reads I/O port at port_address.\r
- */\r
-ubyte inp( uint port_address );\r
-\r
-\r
-/**\r
- * ditto\r
- */\r
-ushort inpw( uint port_address );\r
-\r
-\r
-/**\r
- * ditto\r
- */\r
-uint inpl( uint port_address );\r
-\r
-\r
-/**\r
- * Writes and returns value to I/O port at port_address.\r
- */\r
-ubyte outp( uint port_address, ubyte value );\r
-\r
-\r
-/**\r
- * ditto\r
- */\r
-ushort outpw( uint port_address, ushort value );\r
-\r
-\r
-/**\r
- * ditto\r
- */\r
-uint outpl( uint port_address, uint value );\r
+/**
+ * These functions are built-in intrinsics to the compiler.
+ *
+ * Intrinsic functions are functions built in to the compiler, usually to take
+ * advantage of specific CPU features that are inefficient to handle via
+ * external functions. The compiler's optimizer and code generator are fully
+ * integrated in with intrinsic functions, bringing to bear their full power on
+ * them. This can result in some surprising speedups.
+ *
+ * Copyright: Public Domain
+ * License: Public Domain
+ * Authors: Walter Bright
+ */
+module std.intrinsic;
+
+
+/**
+ * Scans the bits in v starting with bit 0, looking
+ * for the first set bit.
+ * Returns:
+ * The bit number of the first bit set.
+ * The return value is undefined if v is zero.
+ */
+int bsf( uint v );
+
+
+/**
+ * Scans the bits in v from the most significant bit
+ * to the least significant bit, looking
+ * for the first set bit.
+ * Returns:
+ * The bit number of the first bit set.
+ * The return value is undefined if v is zero.
+ * Example:
+ * ---
+ * import std.intrinsic;
+ *
+ * int main()
+ * {
+ * uint v;
+ * int x;
+ *
+ * v = 0x21;
+ * x = bsf(v);
+ * printf("bsf(x%x) = %d\n", v, x);
+ * x = bsr(v);
+ * printf("bsr(x%x) = %d\n", v, x);
+ * return 0;
+ * }
+ * ---
+ * Output:
+ * bsf(x21) = 0<br>
+ * bsr(x21) = 5
+ */
+int bsr( uint v );
+
+
+/**
+ * Tests the bit.
+ */
+int bt( uint* p, uint bitnum );
+
+
+/**
+ * Tests and complements the bit.
+ */
+int btc( uint* p, uint bitnum );
+
+
+/**
+ * Tests and resets (sets to 0) the bit.
+ */
+int btr( uint* p, uint bitnum );
+
+
+/**
+ * Tests and sets the bit.
+ * Params:
+ * p = a non-NULL pointer to an array of uints.
+ * index = a bit number, starting with bit 0 of p[0],
+ * and progressing. It addresses bits like the expression:
+---
+p[index / (uint.sizeof*8)] & (1 << (index & ((uint.sizeof*8) - 1)))
+---
+ * Returns:
+ * A non-zero value if the bit was set, and a zero
+ * if it was clear.
+ *
+ * Example:
+ * ---
+import std.intrinsic;
+
+int main()
+{
+ uint array[2];
+
+ array[0] = 2;
+ array[1] = 0x100;
+
+ printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));
+ printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+
+ printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));
+ printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+
+ printf("bts(array, 35) = %d\n", <b>bts</b>(array, 35));
+ printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+
+ printf("btr(array, 35) = %d\n", <b>btr</b>(array, 35));
+ printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+
+ printf("bt(array, 1) = %d\n", <b>bt</b>(array, 1));
+ printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+
+ return 0;
+}
+ * ---
+ * Output:
+<pre>
+btc(array, 35) = 0
+array = [0]:x2, [1]:x108
+btc(array, 35) = -1
+array = [0]:x2, [1]:x100
+bts(array, 35) = 0
+array = [0]:x2, [1]:x108
+btr(array, 35) = -1
+array = [0]:x2, [1]:x100
+bt(array, 1) = -1
+array = [0]:x2, [1]:x100
+</pre>
+ */
+int bts( uint* p, uint bitnum );
+
+
+/**
+ * Swaps bytes in a 4 byte uint end-to-end, i.e. byte 0 becomes
+ * byte 3, byte 1 becomes byte 2, byte 2 becomes byte 1, byte 3
+ * becomes byte 0.
+ */
+uint bswap( uint v );
+
+
+/**
+ * Reads I/O port at port_address.
+ */
+ubyte inp( uint port_address );
+
+
+/**
+ * ditto
+ */
+ushort inpw( uint port_address );
+
+
+/**
+ * ditto
+ */
+uint inpl( uint port_address );
+
+
+/**
+ * Writes and returns value to I/O port at port_address.
+ */
+ubyte outp( uint port_address, ubyte value );
+
+
+/**
+ * ditto
+ */
+ushort outpw( uint port_address, ushort value );
+
+
+/**
+ * ditto
+ */
+uint outpl( uint port_address, uint value );
-/**\r
- * These functions are built-in intrinsics to the compiler.\r
- *\r
- * Copyright: Public Domain\r
- * License: Public Domain\r
- * Authors: David Friedman\r
- */\r
-module std.stdarg;\r
-\r
-version( GNU )\r
-{\r
- private import gcc.builtins;\r
- alias __builtin_va_list va_list;\r
- alias __builtin_va_end va_end;\r
- alias __builtin_va_copy va_copy;\r
-}\r
-\r
-template va_start(T)\r
-{\r
- void va_start( out va_list ap, inout T parmn )\r
- {\r
-\r
- }\r
-}\r
-\r
-template va_arg(T)\r
-{\r
- T va_arg( inout va_list ap )\r
- {\r
- return T.init;\r
- }\r
-}\r
+/**
+ * These functions are built-in intrinsics to the compiler.
+ *
+ * Copyright: Public Domain
+ * License: Public Domain
+ * Authors: David Friedman
+ */
+module std.stdarg;
+
+version( GNU )
+{
+ private import gcc.builtins;
+ alias __builtin_va_list va_list;
+ alias __builtin_va_end va_end;
+ alias __builtin_va_copy va_copy;
+}
+
+template va_start(T)
+{
+ void va_start( out va_list ap, inout T parmn )
+ {
+
+ }
+}
+
+template va_arg(T)
+{
+ T va_arg( inout va_list ap )
+ {
+ return T.init;
+ }
+}
-;_ minit.asm\r
-; Written by Walter Bright\r
-; Digital Mars\r
-; http://www.digitalmars.com/d/\r
-; Placed into the Public Domain\r
-\r
-include macros.asm\r
-\r
-ifdef _WIN32\r
- DATAGRP EQU FLAT\r
-else\r
- DATAGRP EQU DGROUP\r
-endif\r
-\r
-; Provide a default resolution for weak extern records, no way in C\r
-; to define an omf symbol with a specific value\r
-public __nullext\r
-__nullext equ 0\r
-\r
- extrn __moduleinfo_array:near\r
-\r
-; This bit of assembler is needed because, from C or D, one cannot\r
-; specify the names of data segments. Why does this matter?\r
-; All the ModuleInfo pointers are placed into a segment named 'FM'.\r
-; The order in which they are placed in 'FM' is arbitrarily up to the linker.\r
-; In order to walk all the pointers, we need to be able to find the\r
-; beginning and the end of the 'FM' segment.\r
-; This is done by bracketing the 'FM' segment with two other, empty,\r
-; segments named 'FMB' and 'FME'. Since this module is the only one that\r
-; ever refers to 'FMB' and 'FME', we get to control the order in which\r
-; these segments appear relative to 'FM' by using a GROUP statement.\r
-; So, we have in memory:\r
-; FMB empty segment\r
-; FM contains all the pointers\r
-; FME empty segment\r
-; and finding the limits of FM is as easy as taking the address of FMB\r
-; and the address of FME.\r
-\r
-; These segments bracket FM, which contains the list of ModuleInfo pointers\r
-FMB segment dword use32 public 'DATA'\r
-FMB ends\r
-FM segment dword use32 public 'DATA'\r
-FM ends\r
-FME segment dword use32 public 'DATA'\r
-FME ends\r
-\r
-; This leaves room in the _fatexit() list for _moduleDtor()\r
-XOB segment dword use32 public 'BSS'\r
-XOB ends\r
-XO segment dword use32 public 'BSS'\r
- dd ?\r
-XO ends\r
-XOE segment dword use32 public 'BSS'\r
-XOE ends\r
-\r
-DGROUP group FMB,FM,FME\r
-\r
- begcode minit\r
-\r
-; extern (C) void _minit();\r
-; Converts array of ModuleInfo pointers to a D dynamic array of them,\r
-; so they can be accessed via D.\r
-; Result is written to:\r
-; extern (C) ModuleInfo[] _moduleinfo_array;\r
-\r
- public __minit\r
-__minit proc near\r
- mov EDX,offset DATAGRP:FMB\r
- mov EAX,offset DATAGRP:FME\r
- mov dword ptr __moduleinfo_array+4,EDX\r
- sub EAX,EDX ; size in bytes of FM segment\r
- shr EAX,2 ; convert to array length\r
- mov dword ptr __moduleinfo_array,EAX\r
- ret\r
-__minit endp\r
-\r
- endcode minit\r
-\r
- end\r
+;_ minit.asm
+; Written by Walter Bright
+; Digital Mars
+; http://www.digitalmars.com/d/
+; Placed into the Public Domain
+
+include macros.asm
+
+ifdef _WIN32
+ DATAGRP EQU FLAT
+else
+ DATAGRP EQU DGROUP
+endif
+
+; Provide a default resolution for weak extern records, no way in C
+; to define an omf symbol with a specific value
+public __nullext
+__nullext equ 0
+
+ extrn __moduleinfo_array:near
+
+; This bit of assembler is needed because, from C or D, one cannot
+; specify the names of data segments. Why does this matter?
+; All the ModuleInfo pointers are placed into a segment named 'FM'.
+; The order in which they are placed in 'FM' is arbitrarily up to the linker.
+; In order to walk all the pointers, we need to be able to find the
+; beginning and the end of the 'FM' segment.
+; This is done by bracketing the 'FM' segment with two other, empty,
+; segments named 'FMB' and 'FME'. Since this module is the only one that
+; ever refers to 'FMB' and 'FME', we get to control the order in which
+; these segments appear relative to 'FM' by using a GROUP statement.
+; So, we have in memory:
+; FMB empty segment
+; FM contains all the pointers
+; FME empty segment
+; and finding the limits of FM is as easy as taking the address of FMB
+; and the address of FME.
+
+; These segments bracket FM, which contains the list of ModuleInfo pointers
+FMB segment dword use32 public 'DATA'
+FMB ends
+FM segment dword use32 public 'DATA'
+FM ends
+FME segment dword use32 public 'DATA'
+FME ends
+
+; This leaves room in the _fatexit() list for _moduleDtor()
+XOB segment dword use32 public 'BSS'
+XOB ends
+XO segment dword use32 public 'BSS'
+ dd ?
+XO ends
+XOE segment dword use32 public 'BSS'
+XOE ends
+
+DGROUP group FMB,FM,FME
+
+ begcode minit
+
+; extern (C) void _minit();
+; Converts array of ModuleInfo pointers to a D dynamic array of them,
+; so they can be accessed via D.
+; Result is written to:
+; extern (C) ModuleInfo[] _moduleinfo_array;
+
+ public __minit
+__minit proc near
+ mov EDX,offset DATAGRP:FMB
+ mov EAX,offset DATAGRP:FME
+ mov dword ptr __moduleinfo_array+4,EDX
+ sub EAX,EDX ; size in bytes of FM segment
+ shr EAX,2 ; convert to array length
+ mov dword ptr __moduleinfo_array,EAX
+ ret
+__minit endp
+
+ endcode minit
+
+ end
-# 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
- arrayassign.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
- 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_TARGET=libdruntime-rt-dmd.a
+LIB_MASK=libdruntime-rt-dmd*.a
+
+CP=cp -f
+RM=rm -f
+MD=mkdir -p
+
+CFLAGS=-O $(ADD_CFLAGS)
+#CFLAGS=-g $(ADD_CFLAGS)
+
+DFLAGS=-release -O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
+#DFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
+
+TFLAGS=-O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
+#TFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
+
+DOCFLAGS=-version=DDoc -version=Posix
+
+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=
+
+######################################################
+
+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)/.
-# Makefile to build the compiler runtime D library for Win32\r
-# Designed to work with DigitalMars 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=druntime-rt-dmd.lib\r
-LIB_MASK=druntime-rt-dmd*.lib\r
-\r
-CP=xcopy /y\r
-RM=del /f\r
-MD=mkdir\r
-\r
-CFLAGS=-mn -6 -r $(ADD_CFLAGS)\r
-#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)\r
-\r
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)\r
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
-\r
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)\r
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
-\r
-DOCFLAGS=-version=DDoc\r
-\r
-CC=dmc\r
-LC=lib\r
-DC=dmd\r
-\r
-LIB_DEST=..\..\..\lib\r
-\r
-.DEFAULT: .asm .c .cpp .d .html .obj\r
-\r
-.asm.obj:\r
- $(CC) -c $<\r
-\r
-.c.obj:\r
- $(CC) -c $(CFLAGS) $< -o$@\r
-\r
-.cpp.obj:\r
- $(CC) -c $(CFLAGS) $< -o$@\r
-\r
-.d.obj:\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.obj \\r
- aApply.obj \\r
- aApplyR.obj \\r
- adi.obj \\r
- arrayassign.obj \\r
- arraybyte.obj \\r
- arraycast.obj \\r
- arraycat.obj \\r
- arraydouble.obj \\r
- arrayfloat.obj \\r
- arrayint.obj \\r
- arrayreal.obj \\r
- arrayshort.obj \\r
- cast_.obj \\r
- complex.obj \\r
- cover.obj \\r
- critical.obj \\r
- deh.obj \\r
- dmain2.obj \\r
- invariant.obj \\r
- invariant_.obj \\r
- lifetime.obj \\r
- memory.obj \\r
- memset.obj \\r
- monitor.obj \\r
- obj.obj \\r
- object_.obj \\r
- qsort.obj \\r
- switch_.obj \\r
- trace.obj\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
-\r
-OBJ_UTIL= \\r
- util\console.obj \\r
- util\cpuid.obj \\r
- util\ctype.obj \\r
- util\string.obj \\r
- util\utf.obj\r
-\r
-OBJ_TI= \\r
- typeinfo\ti_AC.obj \\r
- typeinfo\ti_Acdouble.obj \\r
- typeinfo\ti_Acfloat.obj \\r
- typeinfo\ti_Acreal.obj \\r
- typeinfo\ti_Adouble.obj \\r
- typeinfo\ti_Afloat.obj \\r
- typeinfo\ti_Ag.obj \\r
- typeinfo\ti_Aint.obj \\r
- typeinfo\ti_Along.obj \\r
- typeinfo\ti_Areal.obj \\r
- typeinfo\ti_Ashort.obj \\r
- typeinfo\ti_byte.obj \\r
- typeinfo\ti_C.obj \\r
- typeinfo\ti_cdouble.obj \\r
- typeinfo\ti_cfloat.obj \\r
- typeinfo\ti_char.obj \\r
- typeinfo\ti_creal.obj \\r
- typeinfo\ti_dchar.obj \\r
- typeinfo\ti_delegate.obj \\r
- typeinfo\ti_double.obj \\r
- typeinfo\ti_float.obj \\r
- typeinfo\ti_idouble.obj \\r
- typeinfo\ti_ifloat.obj \\r
- typeinfo\ti_int.obj \\r
- typeinfo\ti_ireal.obj \\r
- typeinfo\ti_long.obj \\r
- typeinfo\ti_ptr.obj \\r
- typeinfo\ti_real.obj \\r
- typeinfo\ti_short.obj \\r
- typeinfo\ti_ubyte.obj \\r
- typeinfo\ti_uint.obj \\r
- typeinfo\ti_ulong.obj \\r
- typeinfo\ti_ushort.obj \\r
- typeinfo\ti_void.obj \\r
- typeinfo\ti_wchar.obj\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) -c -n $@ $(ALL_OBJS) minit.obj\r
-\r
-dmd.doc : $(ALL_DOCS)\r
- @echo No documentation available.\r
-\r
-######################################################\r
-\r
-clean :\r
- $(RM) /s *.di\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 Win32
+# Designed to work with DigitalMars 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_TARGET=druntime-rt-dmd.lib
+LIB_MASK=druntime-rt-dmd*.lib
+
+CP=xcopy /y
+RM=del /f
+MD=mkdir
+
+CFLAGS=-mn -6 -r $(ADD_CFLAGS)
+#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)
+
+DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)
+#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+
+TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
+#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+
+DOCFLAGS=-version=DDoc
+
+CC=dmc
+LC=lib
+DC=dmd
+
+LIB_DEST=..\..\..\lib
+
+.DEFAULT: .asm .c .cpp .d .html .obj
+
+.asm.obj:
+ $(CC) -c $<
+
+.c.obj:
+ $(CC) -c $(CFLAGS) $< -o$@
+
+.cpp.obj:
+ $(CC) -c $(CFLAGS) $< -o$@
+
+.d.obj:
+ $(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.obj \
+ aApply.obj \
+ aApplyR.obj \
+ adi.obj \
+ arrayassign.obj \
+ arraybyte.obj \
+ arraycast.obj \
+ arraycat.obj \
+ arraydouble.obj \
+ arrayfloat.obj \
+ arrayint.obj \
+ arrayreal.obj \
+ arrayshort.obj \
+ cast_.obj \
+ complex.obj \
+ cover.obj \
+ critical.obj \
+ deh.obj \
+ dmain2.obj \
+ invariant.obj \
+ invariant_.obj \
+ lifetime.obj \
+ memory.obj \
+ memset.obj \
+ monitor.obj \
+ obj.obj \
+ object_.obj \
+ qsort.obj \
+ switch_.obj \
+ trace.obj
+# 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
+
+OBJ_UTIL= \
+ util\console.obj \
+ util\cpuid.obj \
+ util\ctype.obj \
+ util\string.obj \
+ util\utf.obj
+
+OBJ_TI= \
+ typeinfo\ti_AC.obj \
+ typeinfo\ti_Acdouble.obj \
+ typeinfo\ti_Acfloat.obj \
+ typeinfo\ti_Acreal.obj \
+ typeinfo\ti_Adouble.obj \
+ typeinfo\ti_Afloat.obj \
+ typeinfo\ti_Ag.obj \
+ typeinfo\ti_Aint.obj \
+ typeinfo\ti_Along.obj \
+ typeinfo\ti_Areal.obj \
+ typeinfo\ti_Ashort.obj \
+ typeinfo\ti_byte.obj \
+ typeinfo\ti_C.obj \
+ typeinfo\ti_cdouble.obj \
+ typeinfo\ti_cfloat.obj \
+ typeinfo\ti_char.obj \
+ typeinfo\ti_creal.obj \
+ typeinfo\ti_dchar.obj \
+ typeinfo\ti_delegate.obj \
+ typeinfo\ti_double.obj \
+ typeinfo\ti_float.obj \
+ typeinfo\ti_idouble.obj \
+ typeinfo\ti_ifloat.obj \
+ typeinfo\ti_int.obj \
+ typeinfo\ti_ireal.obj \
+ typeinfo\ti_long.obj \
+ typeinfo\ti_ptr.obj \
+ typeinfo\ti_real.obj \
+ typeinfo\ti_short.obj \
+ typeinfo\ti_ubyte.obj \
+ typeinfo\ti_uint.obj \
+ typeinfo\ti_ulong.obj \
+ typeinfo\ti_ushort.obj \
+ typeinfo\ti_void.obj \
+ typeinfo\ti_wchar.obj
+
+ALL_OBJS= \
+ $(OBJ_BASE) \
+ $(OBJ_UTIL) \
+ $(OBJ_TI)
+
+######################################################
+
+ALL_DOCS=
+
+######################################################
+
+dmd.lib : $(LIB_TARGET)
+
+$(LIB_TARGET) : $(ALL_OBJS)
+ $(RM) $@
+ $(LC) -c -n $@ $(ALL_OBJS) minit.obj
+
+dmd.doc : $(ALL_DOCS)
+ @echo No documentation available.
+
+######################################################
+
+clean :
+ $(RM) /s *.di
+ $(RM) $(ALL_OBJS)
+ $(RM) $(ALL_DOCS)
+ $(RM) $(LIB_MASK)
+
+install :
+ $(MD) $(LIB_DEST)
+ $(CP) $(LIB_MASK) $(LIB_DEST)\.
-# Makefile to build the D runtime library core components for Posix\r
-# Designed to work with GNU make\r
-# Targets:\r
-# make\r
-# Same as make all\r
-# make lib\r
-# Build the common library\r
-# make doc\r
-# Generate documentation\r
-# make clean\r
-# Delete unneeded files created by build process\r
-\r
-LIB_TARGET=libdruntime-core.a\r
-LIB_MASK=libdruntime-core*.a\r
-\r
-CP=cp -f\r
-RM=rm -f\r
-MD=mkdir -p\r
-\r
-ADD_CFLAGS=\r
-ADD_DFLAGS=\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
-INC_DEST=../../import\r
-LIB_DEST=../../lib\r
-DOC_DEST=../../doc\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) -Hf$*.di $< -of$@\r
-# $(DC) -c $(DFLAGS) $< -of$@\r
-\r
-.d.html:\r
- $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<\r
-\r
-targets : lib doc\r
-all : lib doc\r
-core : lib\r
-lib : core.lib\r
-doc : core.doc\r
-\r
-######################################################\r
-\r
-OBJ_CORE= \\r
- bitmanip.o \\r
- exception.o \\r
- memory.o \\r
- runtime.o \\r
- thread.o\r
-\r
-OBJ_STDC= \\r
- stdc.o\r
-\r
-ALL_OBJS= \\r
- $(OBJ_CORE) \\r
- $(OBJ_STDC)\r
-\r
-######################################################\r
-\r
-DOC_CORE= \\r
- bitmanip.html \\r
- exception.html \\r
- memory.html \\r
- runtime.html \\r
- thread.html\r
-\r
-\r
-ALL_DOCS=\r
-\r
-######################################################\r
-\r
-core.lib : $(LIB_TARGET)\r
-\r
-$(LIB_TARGET) : $(ALL_OBJS)\r
- $(RM) $@\r
- $(LC) $@ $(ALL_OBJS)\r
-\r
-core.doc : $(ALL_DOCS)\r
- echo Documentation generated.\r
-\r
-######################################################\r
-\r
-### bitmanip\r
-\r
-bitmanip.o : bitmanip.d\r
- $(DC) -c $(DFLAGS) bitmanip.d -of$@\r
-\r
-### thread\r
-\r
-thread.o : thread.d\r
- $(DC) -c $(DFLAGS) -d -Hf$*.di thread.d -of$@\r
-\r
-######################################################\r
-\r
-clean :\r
- find . -name "*.di" | xargs $(RM)\r
- $(RM) $(ALL_OBJS)\r
- $(RM) $(ALL_DOCS)\r
- find . -name "$(LIB_MASK)" | xargs $(RM)\r
-\r
-install :\r
- $(MD) $(INC_DEST)\r
- find . -name "*.di" -exec cp -f {} $(INC_DEST)/{} \;\r
- $(MD) $(DOC_DEST)\r
- find . -name "*.html" -exec cp -f {} $(DOC_DEST)/{} \;\r
- $(MD) $(LIB_DEST)\r
- find . -name "$(LIB_MASK)" -exec cp -f {} $(LIB_DEST)/{} \;\r
+# Makefile to build the D runtime library core components for Posix
+# Designed to work with GNU make
+# Targets:
+# make
+# Same as make all
+# make lib
+# Build the common library
+# make doc
+# Generate documentation
+# make clean
+# Delete unneeded files created by build process
+
+LIB_TARGET=libdruntime-core.a
+LIB_MASK=libdruntime-core*.a
+
+CP=cp -f
+RM=rm -f
+MD=mkdir -p
+
+ADD_CFLAGS=
+ADD_DFLAGS=
+
+CFLAGS=-O $(ADD_CFLAGS)
+#CFLAGS=-g $(ADD_CFLAGS)
+
+DFLAGS=-release -O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
+#DFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
+
+TFLAGS=-O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
+#TFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
+
+DOCFLAGS=-version=DDoc -version=Posix
+
+CC=gcc
+LC=$(AR) -qsv
+DC=dmd
+
+INC_DEST=../../import
+LIB_DEST=../../lib
+DOC_DEST=../../doc
+
+.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) -Hf$*.di $< -of$@
+# $(DC) -c $(DFLAGS) $< -of$@
+
+.d.html:
+ $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
+
+targets : lib doc
+all : lib doc
+core : lib
+lib : core.lib
+doc : core.doc
+
+######################################################
+
+OBJ_CORE= \
+ bitmanip.o \
+ exception.o \
+ memory.o \
+ runtime.o \
+ thread.o
+
+OBJ_STDC= \
+ stdc.o
+
+ALL_OBJS= \
+ $(OBJ_CORE) \
+ $(OBJ_STDC)
+
+######################################################
+
+DOC_CORE= \
+ bitmanip.html \
+ exception.html \
+ memory.html \
+ runtime.html \
+ thread.html
+
+
+ALL_DOCS=
+
+######################################################
+
+core.lib : $(LIB_TARGET)
+
+$(LIB_TARGET) : $(ALL_OBJS)
+ $(RM) $@
+ $(LC) $@ $(ALL_OBJS)
+
+core.doc : $(ALL_DOCS)
+ echo Documentation generated.
+
+######################################################
+
+### bitmanip
+
+bitmanip.o : bitmanip.d
+ $(DC) -c $(DFLAGS) bitmanip.d -of$@
+
+### thread
+
+thread.o : thread.d
+ $(DC) -c $(DFLAGS) -d -Hf$*.di thread.d -of$@
+
+######################################################
+
+clean :
+ find . -name "*.di" | xargs $(RM)
+ $(RM) $(ALL_OBJS)
+ $(RM) $(ALL_DOCS)
+ find . -name "$(LIB_MASK)" | xargs $(RM)
+
+install :
+ $(MD) $(INC_DEST)
+ find . -name "*.di" -exec cp -f {} $(INC_DEST)/{} \;
+ $(MD) $(DOC_DEST)
+ find . -name "*.html" -exec cp -f {} $(DOC_DEST)/{} \;
+ $(MD) $(LIB_DEST)
+ find . -name "$(LIB_MASK)" -exec cp -f {} $(LIB_DEST)/{} \;
-# Makefile to build the D runtime library core components for Win32\r
-# Designed to work with DigitalMars make\r
-# Targets:\r
-# make\r
-# Same as make all\r
-# make lib\r
-# Build the common library\r
-# make doc\r
-# Generate documentation\r
-# make clean\r
-# Delete unneeded files created by build process\r
-\r
-LIB_TARGET=druntime-core.lib\r
-LIB_MASK=druntime-core*.lib\r
-\r
-CP=xcopy /y\r
-RM=del /f\r
-MD=mkdir\r
-\r
-ADD_CFLAGS=\r
-ADD_DFLAGS=\r
-\r
-CFLAGS=-mn -6 -r $(ADD_CFLAGS)\r
-#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)\r
-\r
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)\r
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
-\r
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)\r
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
-\r
-DOCFLAGS=-version=DDoc\r
-\r
-CC=dmc\r
-LC=lib\r
-DC=dmd\r
-\r
-INC_DEST=..\..\import\r
-LIB_DEST=..\..\lib\r
-DOC_DEST=..\..\doc\r
-\r
-.DEFAULT: .asm .c .cpp .d .html .obj\r
-\r
-.asm.obj:\r
- $(CC) -c $<\r
-\r
-.c.obj:\r
- $(CC) -c $(CFLAGS) $< -o$@\r
-\r
-.cpp.obj:\r
- $(CC) -c $(CFLAGS) $< -o$@\r
-\r
-.d.obj:\r
- $(DC) -c $(DFLAGS) -Hf$*.di $< -of$@\r
-# $(DC) -c $(DFLAGS) $< -of$@\r
-\r
-.d.html:\r
- $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<\r
-\r
-targets : lib doc\r
-all : lib doc\r
-core : lib\r
-lib : core.lib\r
-doc : core.doc\r
-\r
-######################################################\r
-\r
-OBJ_CORE= \\r
- bitmanip.obj \\r
- exception.obj \\r
- memory.obj \\r
- runtime.obj \\r
- thread.obj\r
-\r
-OBJ_STDC= \\r
- stdc.obj\r
-\r
-ALL_OBJS= \\r
- $(OBJ_CORE) \\r
- $(OBJ_STDC)\r
-\r
-######################################################\r
-\r
-DOC_CORE= \\r
- bitmanip.html \\r
- exception.html \\r
- memory.html \\r
- runtime.html \\r
- thread.html\r
-\r
-ALL_DOCS=\r
-\r
-######################################################\r
-\r
-core.lib : $(LIB_TARGET)\r
-\r
-$(LIB_TARGET) : $(ALL_OBJS)\r
- $(RM) $@\r
- $(LC) -c -n $@ $(ALL_OBJS)\r
-\r
-core.doc : $(ALL_DOCS)\r
- @echo Documentation generated.\r
-\r
-######################################################\r
-\r
-### bitmanip\r
-\r
-bitmanip.obj : bitmanip.d\r
- $(DC) -c $(DFLAGS) bitmanip.d -of$@\r
-\r
-### thread\r
-\r
-thread.obj : thread.d\r
- $(DC) -c $(DFLAGS) -d -Hf$*.di thread.d -of$@\r
-\r
-######################################################\r
-\r
-clean :\r
- $(RM) /s .\*.di\r
- $(RM) $(ALL_OBJS)\r
- $(RM) $(ALL_DOCS)\r
- $(RM) $(LIB_MASK)\r
-\r
-install :\r
- $(MD) $(INC_DEST)\r
- $(CP) /s *.di $(INC_DEST)\.\r
- $(MD) $(DOC_DEST)\r
- $(CP) /s *.html $(DOC_DEST)\.\r
- $(MD) $(LIB_DEST)\r
- $(CP) $(LIB_MASK) $(LIB_DEST)\.\r
+# Makefile to build the D runtime library core components for Win32
+# Designed to work with DigitalMars make
+# Targets:
+# make
+# Same as make all
+# make lib
+# Build the common library
+# make doc
+# Generate documentation
+# make clean
+# Delete unneeded files created by build process
+
+LIB_TARGET=druntime-core.lib
+LIB_MASK=druntime-core*.lib
+
+CP=xcopy /y
+RM=del /f
+MD=mkdir
+
+ADD_CFLAGS=
+ADD_DFLAGS=
+
+CFLAGS=-mn -6 -r $(ADD_CFLAGS)
+#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)
+
+DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)
+#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+
+TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
+#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+
+DOCFLAGS=-version=DDoc
+
+CC=dmc
+LC=lib
+DC=dmd
+
+INC_DEST=..\..\import
+LIB_DEST=..\..\lib
+DOC_DEST=..\..\doc
+
+.DEFAULT: .asm .c .cpp .d .html .obj
+
+.asm.obj:
+ $(CC) -c $<
+
+.c.obj:
+ $(CC) -c $(CFLAGS) $< -o$@
+
+.cpp.obj:
+ $(CC) -c $(CFLAGS) $< -o$@
+
+.d.obj:
+ $(DC) -c $(DFLAGS) -Hf$*.di $< -of$@
+# $(DC) -c $(DFLAGS) $< -of$@
+
+.d.html:
+ $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
+
+targets : lib doc
+all : lib doc
+core : lib
+lib : core.lib
+doc : core.doc
+
+######################################################
+
+OBJ_CORE= \
+ bitmanip.obj \
+ exception.obj \
+ memory.obj \
+ runtime.obj \
+ thread.obj
+
+OBJ_STDC= \
+ stdc.obj
+
+ALL_OBJS= \
+ $(OBJ_CORE) \
+ $(OBJ_STDC)
+
+######################################################
+
+DOC_CORE= \
+ bitmanip.html \
+ exception.html \
+ memory.html \
+ runtime.html \
+ thread.html
+
+ALL_DOCS=
+
+######################################################
+
+core.lib : $(LIB_TARGET)
+
+$(LIB_TARGET) : $(ALL_OBJS)
+ $(RM) $@
+ $(LC) -c -n $@ $(ALL_OBJS)
+
+core.doc : $(ALL_DOCS)
+ @echo Documentation generated.
+
+######################################################
+
+### bitmanip
+
+bitmanip.obj : bitmanip.d
+ $(DC) -c $(DFLAGS) bitmanip.d -of$@
+
+### thread
+
+thread.obj : thread.d
+ $(DC) -c $(DFLAGS) -d -Hf$*.di thread.d -of$@
+
+######################################################
+
+clean :
+ $(RM) /s .\*.di
+ $(RM) $(ALL_OBJS)
+ $(RM) $(ALL_DOCS)
+ $(RM) $(LIB_MASK)
+
+install :
+ $(MD) $(INC_DEST)
+ $(CP) /s *.di $(INC_DEST)\.
+ $(MD) $(DOC_DEST)
+ $(CP) /s *.html $(DOC_DEST)\.
+ $(MD) $(LIB_DEST)
+ $(CP) $(LIB_MASK) $(LIB_DEST)\.
-# Makefile to build the composite D runtime 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 runtime library\r
-# make doc\r
-# Generate documentation\r
-# make clean\r
-# Delete unneeded files created by build process\r
-\r
-LIB_TARGET=libdruntime-dmd.a\r
-LIB_MASK=libdruntime-dmd*.a\r
-\r
-DIR_CC=../src/core\r
-DIR_RT=../src/compiler/dmd\r
-DIR_GC=../src/gc/basic\r
-\r
-CP=cp -f\r
-RM=rm -f\r
-MD=mkdir -p\r
-\r
-CC=gcc\r
-LC=$(AR) -qsv\r
-DC=dmd\r
-\r
-LIB_DEST=../lib\r
-\r
-ADD_CFLAGS=-m32\r
-ADD_DFLAGS=\r
-\r
-targets : lib doc\r
-all : lib doc\r
-\r
-######################################################\r
-\r
-ALL_OBJS=\r
-\r
-######################################################\r
-\r
-ALL_DOCS=\r
-\r
-######################################################\r
-\r
-lib : $(ALL_OBJS)\r
- make -C $(DIR_CC) -fposix.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"\r
- make -C $(DIR_RT) -fposix.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"\r
- make -C $(DIR_GC) -fposix.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"\r
- find . -name "libphobos*.a" | xargs $(RM)\r
- $(LC) $(LIB_TARGET) `find $(DIR_CC) -name "*.o" | xargs echo`\r
- $(LC) $(LIB_TARGET) `find $(DIR_RT) -name "*.o" | xargs echo`\r
- $(LC) $(LIB_TARGET) `find $(DIR_GC) -name "*.o" | xargs echo`\r
-\r
-doc : $(ALL_DOCS)\r
- make -C $(DIR_CC) -fposix.mak doc DC=$(DC)\r
- make -C $(DIR_RT) -fposix.mak doc DC=$(DC)\r
- make -C $(DIR_GC) -fposix.mak doc DC=$(DC)\r
-\r
-######################################################\r
-\r
-clean :\r
- find . -name "*.di" | xargs $(RM)\r
- $(RM) $(ALL_OBJS)\r
- $(RM) $(ALL_DOCS)\r
- make -C $(DIR_CC) -fposix.mak clean\r
- make -C $(DIR_RT) -fposix.mak clean\r
- make -C $(DIR_GC) -fposix.mak clean\r
- $(RM) $(LIB_MASK)\r
-\r
-install :\r
- make -C $(DIR_CC) -fposix.mak install\r
- make -C $(DIR_RT) -fposix.mak install\r
- make -C $(DIR_GC) -fposix.mak install\r
- $(CP) $(LIB_MASK) $(LIB_DEST)/.\r
+# Makefile to build the composite D runtime library for Linux
+# Designed to work with GNU make
+# Targets:
+# make
+# Same as make all
+# make lib
+# Build the runtime library
+# make doc
+# Generate documentation
+# make clean
+# Delete unneeded files created by build process
+
+LIB_TARGET=libdruntime-dmd.a
+LIB_MASK=libdruntime-dmd*.a
+
+DIR_CC=../src/core
+DIR_RT=../src/compiler/dmd
+DIR_GC=../src/gc/basic
+
+CP=cp -f
+RM=rm -f
+MD=mkdir -p
+
+CC=gcc
+LC=$(AR) -qsv
+DC=dmd
+
+LIB_DEST=../lib
+
+ADD_CFLAGS=-m32
+ADD_DFLAGS=
+
+targets : lib doc
+all : lib doc
+
+######################################################
+
+ALL_OBJS=
+
+######################################################
+
+ALL_DOCS=
+
+######################################################
+
+lib : $(ALL_OBJS)
+ make -C $(DIR_CC) -fposix.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+ make -C $(DIR_RT) -fposix.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+ make -C $(DIR_GC) -fposix.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+ find . -name "libphobos*.a" | xargs $(RM)
+ $(LC) $(LIB_TARGET) `find $(DIR_CC) -name "*.o" | xargs echo`
+ $(LC) $(LIB_TARGET) `find $(DIR_RT) -name "*.o" | xargs echo`
+ $(LC) $(LIB_TARGET) `find $(DIR_GC) -name "*.o" | xargs echo`
+
+doc : $(ALL_DOCS)
+ make -C $(DIR_CC) -fposix.mak doc DC=$(DC)
+ make -C $(DIR_RT) -fposix.mak doc DC=$(DC)
+ make -C $(DIR_GC) -fposix.mak doc DC=$(DC)
+
+######################################################
+
+clean :
+ find . -name "*.di" | xargs $(RM)
+ $(RM) $(ALL_OBJS)
+ $(RM) $(ALL_DOCS)
+ make -C $(DIR_CC) -fposix.mak clean
+ make -C $(DIR_RT) -fposix.mak clean
+ make -C $(DIR_GC) -fposix.mak clean
+ $(RM) $(LIB_MASK)
+
+install :
+ make -C $(DIR_CC) -fposix.mak install
+ make -C $(DIR_RT) -fposix.mak install
+ make -C $(DIR_GC) -fposix.mak install
+ $(CP) $(LIB_MASK) $(LIB_DEST)/.
-# Makefile to build the composite D runtime library for Win32\r
-# Designed to work with DigitalMars make\r
-# Targets:\r
-# make\r
-# Same as make all\r
-# make lib\r
-# Build the runtime library\r
-# make doc\r
-# Generate documentation\r
-# make clean\r
-# Delete unneeded files created by build process\r
-\r
-LIB_TARGET=druntime-dmd.lib\r
-LIB_MASK=druntime-dmd*.lib\r
-\r
-DIR_CC=core\r
-DIR_RT=compiler\dmd\r
-DIR_GC=gc\basic\r
-\r
-LIB_CC=$(DIR_CC)\druntime-core.lib\r
-LIB_RT=$(DIR_RT)\druntime-rt-dmd.lib\r
-LIB_GC=$(DIR_GC)\druntime-gc-basic.lib\r
-\r
-CP=xcopy /y\r
-RM=del /f\r
-MD=mkdir\r
-\r
-CC=dmc\r
-LC=lib\r
-DC=dmd\r
-\r
-LIB_DEST=..\lib\r
-\r
-ADD_CFLAGS=\r
-ADD_DFLAGS=\r
-\r
-targets : lib doc\r
-all : lib doc\r
-\r
-######################################################\r
-\r
-ALL_OBJS=\r
-\r
-######################################################\r
-\r
-ALL_DOCS=\r
-\r
-######################################################\r
-\r
-lib : $(ALL_OBJS)\r
- cd $(DIR_CC)\r
- make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"\r
- cd ..\r
- cd $(DIR_RT)\r
- make -fwin32.mak lib\r
- cd ..\..\r
- cd $(DIR_GC)\r
- make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"\r
- cd ..\..\r
- $(RM) $(LIB_TARGET)\r
- $(LC) -c -n $(LIB_TARGET) $(LIB_CC) $(LIB_RT) $(LIB_GC)\r
-\r
-doc : $(ALL_DOCS)\r
- cd $(DIR_CC)\r
- make -fwin32.mak doc\r
- cd ..\r
- cd $(DIR_RT)\r
- make -fwin32.mak doc\r
- cd ..\..\r
- cd $(DIR_GC)\r
- make -fwin32.mak doc\r
- cd ..\..\r
-\r
-######################################################\r
-\r
-clean :\r
- $(RM) /s *.di\r
- $(RM) $(ALL_OBJS)\r
- $(RM) $(ALL_DOCS)\r
- cd $(DIR_CC)\r
- make -fwin32.mak clean\r
- cd ..\r
- cd $(DIR_RT)\r
- make -fwin32.mak clean\r
- cd ..\..\r
- cd $(DIR_GC)\r
- make -fwin32.mak clean\r
- cd ..\..\r
- $(RM) $(LIB_MASK)\r
-\r
-install :\r
- cd $(DIR_CC)\r
- make -fwin32.mak install\r
- cd ..\r
- cd $(DIR_RT)\r
- make -fwin32.mak install\r
- cd ..\..\r
- cd $(DIR_GC)\r
- make -fwin32.mak install\r
- cd ..\..\r
- $(CP) $(LIB_MASK) $(LIB_DEST)\.\r
+# Makefile to build the composite D runtime library for Win32
+# Designed to work with DigitalMars make
+# Targets:
+# make
+# Same as make all
+# make lib
+# Build the runtime library
+# make doc
+# Generate documentation
+# make clean
+# Delete unneeded files created by build process
+
+LIB_TARGET=druntime-dmd.lib
+LIB_MASK=druntime-dmd*.lib
+
+DIR_CC=core
+DIR_RT=compiler\dmd
+DIR_GC=gc\basic
+
+LIB_CC=$(DIR_CC)\druntime-core.lib
+LIB_RT=$(DIR_RT)\druntime-rt-dmd.lib
+LIB_GC=$(DIR_GC)\druntime-gc-basic.lib
+
+CP=xcopy /y
+RM=del /f
+MD=mkdir
+
+CC=dmc
+LC=lib
+DC=dmd
+
+LIB_DEST=..\lib
+
+ADD_CFLAGS=
+ADD_DFLAGS=
+
+targets : lib doc
+all : lib doc
+
+######################################################
+
+ALL_OBJS=
+
+######################################################
+
+ALL_DOCS=
+
+######################################################
+
+lib : $(ALL_OBJS)
+ cd $(DIR_CC)
+ make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+ cd ..
+ cd $(DIR_RT)
+ make -fwin32.mak lib
+ cd ..\..
+ cd $(DIR_GC)
+ make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+ cd ..\..
+ $(RM) $(LIB_TARGET)
+ $(LC) -c -n $(LIB_TARGET) $(LIB_CC) $(LIB_RT) $(LIB_GC)
+
+doc : $(ALL_DOCS)
+ cd $(DIR_CC)
+ make -fwin32.mak doc
+ cd ..
+ cd $(DIR_RT)
+ make -fwin32.mak doc
+ cd ..\..
+ cd $(DIR_GC)
+ make -fwin32.mak doc
+ cd ..\..
+
+######################################################
+
+clean :
+ $(RM) /s *.di
+ $(RM) $(ALL_OBJS)
+ $(RM) $(ALL_DOCS)
+ cd $(DIR_CC)
+ make -fwin32.mak clean
+ cd ..
+ cd $(DIR_RT)
+ make -fwin32.mak clean
+ cd ..\..
+ cd $(DIR_GC)
+ make -fwin32.mak clean
+ cd ..\..
+ $(RM) $(LIB_MASK)
+
+install :
+ cd $(DIR_CC)
+ make -fwin32.mak install
+ cd ..
+ cd $(DIR_RT)
+ make -fwin32.mak install
+ cd ..\..
+ cd $(DIR_GC)
+ make -fwin32.mak install
+ cd ..\..
+ $(CP) $(LIB_MASK) $(LIB_DEST)\.
-[Environment]\r
-DFLAGS=-version=Posix "-I%HOME%/../import"\r
+[Environment]
+DFLAGS=-version=Posix "-I%HOME%/../import"
-# Makefile to build the garbage collector D library for Posix\r
-# Designed to work with GNU make\r
-# Targets:\r
-# make\r
-# Same as make all\r
-# make lib\r
-# Build the garbage collector library\r
-# make doc\r
-# Generate documentation\r
-# make clean\r
-# Delete unneeded files created by build process\r
-\r
-LIB_TARGET=libdruntime-gc-basic.a\r
-LIB_MASK=libdruntime-gc-basic*.a\r
-\r
-CP=cp -f\r
-RM=rm -f\r
-MD=mkdir -p\r
-\r
-ADD_CFLAGS=\r
-ADD_DFLAGS=\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 $<\r
-# $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<\r
-\r
-targets : lib doc\r
-all : lib doc\r
-lib : basic.lib\r
-doc : basic.doc\r
-\r
-######################################################\r
-\r
-ALL_OBJS= \\r
- gc.o \\r
- gcalloc.o \\r
- gcbits.o \\r
- gcstats.o \\r
- gcx.o\r
-\r
-######################################################\r
-\r
-ALL_DOCS=\r
-\r
-######################################################\r
-\r
-basic.lib : $(LIB_TARGET)\r
-\r
-$(LIB_TARGET) : $(ALL_OBJS)\r
- $(RM) $@\r
- $(LC) $@ $(ALL_OBJS)\r
-\r
-basic.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 garbage collector D library for Posix
+# Designed to work with GNU make
+# Targets:
+# make
+# Same as make all
+# make lib
+# Build the garbage collector library
+# make doc
+# Generate documentation
+# make clean
+# Delete unneeded files created by build process
+
+LIB_TARGET=libdruntime-gc-basic.a
+LIB_MASK=libdruntime-gc-basic*.a
+
+CP=cp -f
+RM=rm -f
+MD=mkdir -p
+
+ADD_CFLAGS=
+ADD_DFLAGS=
+
+CFLAGS=-O $(ADD_CFLAGS)
+#CFLAGS=-g $(ADD_CFLAGS)
+
+DFLAGS=-release -O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
+#DFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
+
+TFLAGS=-O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
+#TFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
+
+DOCFLAGS=-version=DDoc -version=Posix
+
+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 $<
+# $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
+
+targets : lib doc
+all : lib doc
+lib : basic.lib
+doc : basic.doc
+
+######################################################
+
+ALL_OBJS= \
+ gc.o \
+ gcalloc.o \
+ gcbits.o \
+ gcstats.o \
+ gcx.o
+
+######################################################
+
+ALL_DOCS=
+
+######################################################
+
+basic.lib : $(LIB_TARGET)
+
+$(LIB_TARGET) : $(ALL_OBJS)
+ $(RM) $@
+ $(LC) $@ $(ALL_OBJS)
+
+basic.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)/.
-# Makefile to build the garbage collector D library for Win32\r
-# Designed to work with DigitalMars make\r
-# Targets:\r
-# make\r
-# Same as make all\r
-# make lib\r
-# Build the garbage collector library\r
-# make doc\r
-# Generate documentation\r
-# make clean\r
-# Delete unneeded files created by build process\r
-\r
-LIB_TARGET=druntime-gc-basic.lib\r
-LIB_MASK=druntime-gc-basic*.lib\r
-\r
-CP=xcopy /y\r
-RM=del /f\r
-MD=mkdir\r
-\r
-ADD_CFLAGS=\r
-ADD_DFLAGS=\r
-\r
-CFLAGS=-mn -6 -r $(ADD_CFLAGS)\r
-#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)\r
-\r
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)\r
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
-\r
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)\r
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
-\r
-DOCFLAGS=-version=DDoc\r
-\r
-CC=dmc\r
-LC=lib\r
-DC=dmd\r
-\r
-LIB_DEST=..\..\..\lib\r
-\r
-.DEFAULT: .asm .c .cpp .d .html .obj\r
-\r
-.asm.obj:\r
- $(CC) -c $<\r
-\r
-.c.obj:\r
- $(CC) -c $(CFLAGS) $< -o$@\r
-\r
-.cpp.obj:\r
- $(CC) -c $(CFLAGS) $< -o$@\r
-\r
-.d.obj:\r
- $(DC) -c $(DFLAGS) $< -of$@\r
-\r
-.d.html:\r
- $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<\r
-# $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<\r
-\r
-targets : lib doc\r
-all : lib doc\r
-lib : basic.lib\r
-doc : basic.doc\r
-\r
-######################################################\r
-\r
-ALL_OBJS= \\r
- gc.obj \\r
- gcalloc.obj \\r
- gcbits.obj \\r
- gcstats.obj \\r
- gcx.obj\r
-\r
-######################################################\r
-\r
-ALL_DOCS=\r
-\r
-######################################################\r
-\r
-basic.lib : $(LIB_TARGET)\r
-\r
-$(LIB_TARGET) : $(ALL_OBJS)\r
- $(RM) $@\r
- $(LC) -c -n $@ $(ALL_OBJS)\r
-\r
-basic.doc : $(ALL_DOCS)\r
- @echo No documentation available.\r
-\r
-######################################################\r
-\r
-clean :\r
- $(RM) /s *.di\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 garbage collector D library for Win32
+# Designed to work with DigitalMars make
+# Targets:
+# make
+# Same as make all
+# make lib
+# Build the garbage collector library
+# make doc
+# Generate documentation
+# make clean
+# Delete unneeded files created by build process
+
+LIB_TARGET=druntime-gc-basic.lib
+LIB_MASK=druntime-gc-basic*.lib
+
+CP=xcopy /y
+RM=del /f
+MD=mkdir
+
+ADD_CFLAGS=
+ADD_DFLAGS=
+
+CFLAGS=-mn -6 -r $(ADD_CFLAGS)
+#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)
+
+DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)
+#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+
+TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
+#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+
+DOCFLAGS=-version=DDoc
+
+CC=dmc
+LC=lib
+DC=dmd
+
+LIB_DEST=..\..\..\lib
+
+.DEFAULT: .asm .c .cpp .d .html .obj
+
+.asm.obj:
+ $(CC) -c $<
+
+.c.obj:
+ $(CC) -c $(CFLAGS) $< -o$@
+
+.cpp.obj:
+ $(CC) -c $(CFLAGS) $< -o$@
+
+.d.obj:
+ $(DC) -c $(DFLAGS) $< -of$@
+
+.d.html:
+ $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
+# $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
+
+targets : lib doc
+all : lib doc
+lib : basic.lib
+doc : basic.doc
+
+######################################################
+
+ALL_OBJS= \
+ gc.obj \
+ gcalloc.obj \
+ gcbits.obj \
+ gcstats.obj \
+ gcx.obj
+
+######################################################
+
+ALL_DOCS=
+
+######################################################
+
+basic.lib : $(LIB_TARGET)
+
+$(LIB_TARGET) : $(ALL_OBJS)
+ $(RM) $@
+ $(LC) -c -n $@ $(ALL_OBJS)
+
+basic.doc : $(ALL_DOCS)
+ @echo No documentation available.
+
+######################################################
+
+clean :
+ $(RM) /s *.di
+ $(RM) $(ALL_OBJS)
+ $(RM) $(ALL_DOCS)
+ $(RM) $(LIB_MASK)
+
+install :
+ $(MD) $(LIB_DEST)
+ $(CP) $(LIB_MASK) $(LIB_DEST)\.
-# Makefile to build the garbage collector D library for Posix\r
-# Designed to work with GNU make\r
-# Targets:\r
-# make\r
-# Same as make all\r
-# make lib\r
-# Build the garbage collector library\r
-# make doc\r
-# Generate documentation\r
-# make clean\r
-# Delete unneeded files created by build process\r
-\r
-LIB_TARGET=druntime-gc-stub.a\r
-LIB_MASK=druntime-gc-stub*.a\r
-\r
-CP=cp -f\r
-RM=rm -f\r
-MD=mkdir -p\r
-\r
-ADD_CFLAGS=\r
-ADD_DFLAGS=\r
-\r
-CFLAGS=-O -m32 $(ADD_CFLAGS)\r
-#CFLAGS=-g -m32 $(ADD_CFLAGS)\r
-\r
-### warnings disabled because gcx has issues ###\r
-\r
-DFLAGS=-release -O -inline -version=Posix $(ADD_DFLAGS)\r
-#DFLAGS=-g -version=Posix $(ADD_DFLAGS)\r
-\r
-TFLAGS=-O -inline -version=Posix $(ADD_DFLAGS)\r
-#TFLAGS=-g -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=..\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 $<\r
-# $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<\r
-\r
-targets : lib doc\r
-all : lib doc\r
-lib : stub.lib\r
-doc : stub.doc\r
-\r
-######################################################\r
-\r
-ALL_OBJS= \\r
- gc.o\r
-\r
-######################################################\r
-\r
-ALL_DOCS=\r
-\r
-######################################################\r
-\r
-stub.lib : $(LIB_TARGET)\r
-\r
-$(LIB_TARGET) : $(ALL_OBJS)\r
- $(RM) $@\r
- $(LC) $@ $(ALL_OBJS)\r
-\r
-stub.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 garbage collector D library for Posix
+# Designed to work with GNU make
+# Targets:
+# make
+# Same as make all
+# make lib
+# Build the garbage collector library
+# make doc
+# Generate documentation
+# make clean
+# Delete unneeded files created by build process
+
+LIB_TARGET=druntime-gc-stub.a
+LIB_MASK=druntime-gc-stub*.a
+
+CP=cp -f
+RM=rm -f
+MD=mkdir -p
+
+ADD_CFLAGS=
+ADD_DFLAGS=
+
+CFLAGS=-O -m32 $(ADD_CFLAGS)
+#CFLAGS=-g -m32 $(ADD_CFLAGS)
+
+### warnings disabled because gcx has issues ###
+
+DFLAGS=-release -O -inline -version=Posix $(ADD_DFLAGS)
+#DFLAGS=-g -version=Posix $(ADD_DFLAGS)
+
+TFLAGS=-O -inline -version=Posix $(ADD_DFLAGS)
+#TFLAGS=-g -version=Posix $(ADD_DFLAGS)
+
+DOCFLAGS=-version=DDoc -version=Posix
+
+CC=gcc
+LC=$(AR) -qsv
+DC=dmd
+
+LIB_DEST=..
+
+.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 $<
+# $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
+
+targets : lib doc
+all : lib doc
+lib : stub.lib
+doc : stub.doc
+
+######################################################
+
+ALL_OBJS= \
+ gc.o
+
+######################################################
+
+ALL_DOCS=
+
+######################################################
+
+stub.lib : $(LIB_TARGET)
+
+$(LIB_TARGET) : $(ALL_OBJS)
+ $(RM) $@
+ $(LC) $@ $(ALL_OBJS)
+
+stub.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)/.
-# Makefile to build the garbage collector D library for Win32\r
-# Designed to work with DigitalMars make\r
-# Targets:\r
-# make\r
-# Same as make all\r
-# make lib\r
-# Build the garbage collector library\r
-# make doc\r
-# Generate documentation\r
-# make clean\r
-# Delete unneeded files created by build process\r
-\r
-LIB_TARGET=tango-gc-stub.lib\r
-LIB_MASK=tango-gc-stub*.lib\r
-\r
-CP=xcopy /y\r
-RM=del /f\r
-MD=mkdir\r
-\r
-ADD_CFLAGS=\r
-ADD_DFLAGS=\r
-\r
-CFLAGS=-mn -6 -r $(ADD_CFLAGS)\r
-#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)\r
-\r
-### warnings disabled because gcx has issues ###\r
-\r
-DFLAGS=-release -O -inline $(ADD_DFLAGS)\r
-#DFLAGS=-g -release $(ADD_DFLAGS)\r
-\r
-TFLAGS=-O -inline $(ADD_DFLAGS)\r
-#TFLAGS=-g $(ADD_DFLAGS)\r
-\r
-DOCFLAGS=-version=DDoc\r
-\r
-CC=dmc\r
-LC=lib\r
-DC=dmd\r
-\r
-LIB_DEST=..\r
-\r
-.DEFAULT: .asm .c .cpp .d .html .obj\r
-\r
-.asm.obj:\r
- $(CC) -c $<\r
-\r
-.c.obj:\r
- $(CC) -c $(CFLAGS) $< -o$@\r
-\r
-.cpp.obj:\r
- $(CC) -c $(CFLAGS) $< -o$@\r
-\r
-.d.obj:\r
- $(DC) -c $(DFLAGS) $< -of$@\r
-\r
-.d.html:\r
- $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<\r
-# $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<\r
-\r
-targets : lib doc\r
-all : lib doc\r
-lib : stub.lib\r
-doc : stub.doc\r
-\r
-######################################################\r
-\r
-ALL_OBJS= \\r
- gc.obj\r
-\r
-######################################################\r
-\r
-ALL_DOCS=\r
-\r
-######################################################\r
-\r
-stub.lib : $(LIB_TARGET)\r
-\r
-$(LIB_TARGET) : $(ALL_OBJS)\r
- $(RM) $@\r
- $(LC) -c -n $@ $(ALL_OBJS)\r
-\r
-stub.doc : $(ALL_DOCS)\r
- @echo No documentation available.\r
-\r
-######################################################\r
-\r
-clean :\r
- $(RM) /s *.di\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 garbage collector D library for Win32
+# Designed to work with DigitalMars make
+# Targets:
+# make
+# Same as make all
+# make lib
+# Build the garbage collector library
+# make doc
+# Generate documentation
+# make clean
+# Delete unneeded files created by build process
+
+LIB_TARGET=tango-gc-stub.lib
+LIB_MASK=tango-gc-stub*.lib
+
+CP=xcopy /y
+RM=del /f
+MD=mkdir
+
+ADD_CFLAGS=
+ADD_DFLAGS=
+
+CFLAGS=-mn -6 -r $(ADD_CFLAGS)
+#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)
+
+### warnings disabled because gcx has issues ###
+
+DFLAGS=-release -O -inline $(ADD_DFLAGS)
+#DFLAGS=-g -release $(ADD_DFLAGS)
+
+TFLAGS=-O -inline $(ADD_DFLAGS)
+#TFLAGS=-g $(ADD_DFLAGS)
+
+DOCFLAGS=-version=DDoc
+
+CC=dmc
+LC=lib
+DC=dmd
+
+LIB_DEST=..
+
+.DEFAULT: .asm .c .cpp .d .html .obj
+
+.asm.obj:
+ $(CC) -c $<
+
+.c.obj:
+ $(CC) -c $(CFLAGS) $< -o$@
+
+.cpp.obj:
+ $(CC) -c $(CFLAGS) $< -o$@
+
+.d.obj:
+ $(DC) -c $(DFLAGS) $< -of$@
+
+.d.html:
+ $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
+# $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
+
+targets : lib doc
+all : lib doc
+lib : stub.lib
+doc : stub.doc
+
+######################################################
+
+ALL_OBJS= \
+ gc.obj
+
+######################################################
+
+ALL_DOCS=
+
+######################################################
+
+stub.lib : $(LIB_TARGET)
+
+$(LIB_TARGET) : $(ALL_OBJS)
+ $(RM) $@
+ $(LC) -c -n $@ $(ALL_OBJS)
+
+stub.doc : $(ALL_DOCS)
+ @echo No documentation available.
+
+######################################################
+
+clean :
+ $(RM) /s *.di
+ $(RM) $(ALL_OBJS)
+ $(RM) $(ALL_DOCS)
+ $(RM) $(LIB_MASK)
+
+install :
+ $(MD) $(LIB_DEST)
+ $(CP) $(LIB_MASK) $(LIB_DEST)\.
-[Version]\r
-version=7.51 Build 020\r
-\r
-[Environment]\r
-LIB=%@P%\..\lib;\dm\lib\r
-DFLAGS="-I%HOME%\..\import"\r
-LINKCMD=%@P%\..\..\dm\bin\link.exe\r
+[Version]
+version=7.51 Build 020
+
+[Environment]
+LIB=%@P%\..\lib;\dm\lib
+DFLAGS="-I%HOME%\..\import"
+LINKCMD=%@P%\..\..\dm\bin\link.exe