From e0289159505fc0ddeb7e2a4c48c328a8d7cc1174 Mon Sep 17 00:00:00 2001 From: sean Date: Wed, 8 Oct 2008 05:49:34 +0000 Subject: [PATCH] Fixed eol-style for all source files. This closes #1 git-svn-id: http://svn.dsource.org/projects/druntime/trunk@16 4a9d5153-6564-4b3f-b5e1-7e8e9dac548f --- import/bitmanip.di | 524 ++++++++++++++++++------------------- import/object.di | 458 ++++++++++++++++---------------- import/std/c/stdarg.di | 64 ++--- import/std/intrinsic.di | 352 ++++++++++++------------- import/std/stdarg.di | 64 ++--- src/compiler/dmd/minit.asm | 158 +++++------ src/compiler/dmd/posix.mak | 356 ++++++++++++------------- src/compiler/dmd/win32.mak | 342 ++++++++++++------------ src/core/posix.mak | 268 +++++++++---------- src/core/win32.mak | 260 +++++++++--------- src/dmd-posix.mak | 150 +++++------ src/dmd-win32.mak | 202 +++++++------- src/dmd.conf | 4 +- src/gc/basic/posix.mak | 200 +++++++------- src/gc/basic/win32.mak | 194 +++++++------- src/gc/stub/posix.mak | 196 +++++++------- src/gc/stub/win32.mak | 190 +++++++------- src/sc.ini | 14 +- 18 files changed, 1998 insertions(+), 1998 deletions(-) diff --git a/import/bitmanip.di b/import/bitmanip.di index ab2c3ec..2e1496d 100644 --- a/import/bitmanip.di +++ b/import/bitmanip.di @@ -1,262 +1,262 @@ -/** - * 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
- * 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", btc(array, 35)); - printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); - - printf("btc(array, 35) = %d\n", btc(array, 35)); - printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); - - printf("bts(array, 35) = %d\n", bts(array, 35)); - printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); - - printf("btr(array, 35) = %d\n", btr(array, 35)); - printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); - - printf("bt(array, 1) = %d\n", bt(array, 1)); - printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); - - return 0; - } - * --- - * Output: -
-    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
-    
- */ - 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; - - } -} +/** + * 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
+ * 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", btc(array, 35)); + printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); + + printf("btc(array, 35) = %d\n", btc(array, 35)); + printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); + + printf("bts(array, 35) = %d\n", bts(array, 35)); + printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); + + printf("btr(array, 35) = %d\n", btr(array, 35)); + printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); + + printf("bt(array, 1) = %d\n", bt(array, 1)); + printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); + + return 0; + } + * --- + * Output: +
+    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
+    
+ */ + 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; + + } +} diff --git a/import/object.di b/import/object.di index 2ad7413..1745bbb 100644 --- a/import/object.di +++ b/import/object.di @@ -1,229 +1,229 @@ -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(); -} +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(); +} diff --git a/import/std/c/stdarg.di b/import/std/c/stdarg.di index 29f4f1e..e0bf799 100644 --- a/import/std/c/stdarg.di +++ b/import/std/c/stdarg.di @@ -1,32 +1,32 @@ -/** - * 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; - } -} +/** + * 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; + } +} diff --git a/import/std/intrinsic.di b/import/std/intrinsic.di index c5c8110..3102204 100644 --- a/import/std/intrinsic.di +++ b/import/std/intrinsic.di @@ -1,176 +1,176 @@ -/** - * 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
- * 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", btc(array, 35)); - printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); - - printf("btc(array, 35) = %d\n", btc(array, 35)); - printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); - - printf("bts(array, 35) = %d\n", bts(array, 35)); - printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); - - printf("btr(array, 35) = %d\n", btr(array, 35)); - printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); - - printf("bt(array, 1) = %d\n", bt(array, 1)); - printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); - - return 0; -} - * --- - * Output: -
-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
-
- */ -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 ); +/** + * 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
+ * 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", btc(array, 35)); + printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); + + printf("btc(array, 35) = %d\n", btc(array, 35)); + printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); + + printf("bts(array, 35) = %d\n", bts(array, 35)); + printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); + + printf("btr(array, 35) = %d\n", btr(array, 35)); + printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); + + printf("bt(array, 1) = %d\n", bt(array, 1)); + printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]); + + return 0; +} + * --- + * Output: +
+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
+
+ */ +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 ); diff --git a/import/std/stdarg.di b/import/std/stdarg.di index 8fccb13..5255627 100644 --- a/import/std/stdarg.di +++ b/import/std/stdarg.di @@ -1,32 +1,32 @@ -/** - * 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; - } -} +/** + * 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; + } +} diff --git a/src/compiler/dmd/minit.asm b/src/compiler/dmd/minit.asm index 4bf977d..c43bde9 100644 --- a/src/compiler/dmd/minit.asm +++ b/src/compiler/dmd/minit.asm @@ -1,79 +1,79 @@ -;_ 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 +;_ 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 diff --git a/src/compiler/dmd/posix.mak b/src/compiler/dmd/posix.mak index 7d3f660..3ecdacb 100644 --- a/src/compiler/dmd/posix.mak +++ b/src/compiler/dmd/posix.mak @@ -1,178 +1,178 @@ -# 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 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)/. diff --git a/src/compiler/dmd/win32.mak b/src/compiler/dmd/win32.mak index 0c2ea1e..6343eb5 100644 --- a/src/compiler/dmd/win32.mak +++ b/src/compiler/dmd/win32.mak @@ -1,171 +1,171 @@ -# 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 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)\. diff --git a/src/core/posix.mak b/src/core/posix.mak index 2571e8c..adf6763 100644 --- a/src/core/posix.mak +++ b/src/core/posix.mak @@ -1,134 +1,134 @@ -# 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 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)/{} \; diff --git a/src/core/win32.mak b/src/core/win32.mak index 1c0eece..3e80307 100644 --- a/src/core/win32.mak +++ b/src/core/win32.mak @@ -1,130 +1,130 @@ -# 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 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)\. diff --git a/src/dmd-posix.mak b/src/dmd-posix.mak index da9cb9d..dce94e2 100644 --- a/src/dmd-posix.mak +++ b/src/dmd-posix.mak @@ -1,75 +1,75 @@ -# 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 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)/. diff --git a/src/dmd-win32.mak b/src/dmd-win32.mak index 3a637b8..e2798f5 100644 --- a/src/dmd-win32.mak +++ b/src/dmd-win32.mak @@ -1,101 +1,101 @@ -# 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)\. +# 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)\. diff --git a/src/dmd.conf b/src/dmd.conf index 198aed3..0509183 100644 --- a/src/dmd.conf +++ b/src/dmd.conf @@ -1,2 +1,2 @@ -[Environment] -DFLAGS=-version=Posix "-I%HOME%/../import" +[Environment] +DFLAGS=-version=Posix "-I%HOME%/../import" diff --git a/src/gc/basic/posix.mak b/src/gc/basic/posix.mak index 432deb3..c0696c6 100644 --- a/src/gc/basic/posix.mak +++ b/src/gc/basic/posix.mak @@ -1,100 +1,100 @@ -# 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 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)/. diff --git a/src/gc/basic/win32.mak b/src/gc/basic/win32.mak index dd6b72f..ba4d66e 100644 --- a/src/gc/basic/win32.mak +++ b/src/gc/basic/win32.mak @@ -1,97 +1,97 @@ -# 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 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)\. diff --git a/src/gc/stub/posix.mak b/src/gc/stub/posix.mak index 038233e..c499b19 100644 --- a/src/gc/stub/posix.mak +++ b/src/gc/stub/posix.mak @@ -1,98 +1,98 @@ -# 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 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)/. diff --git a/src/gc/stub/win32.mak b/src/gc/stub/win32.mak index 9fc4e1a..44a8fe1 100644 --- a/src/gc/stub/win32.mak +++ b/src/gc/stub/win32.mak @@ -1,95 +1,95 @@ -# 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)\. +# 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)\. diff --git a/src/sc.ini b/src/sc.ini index caca7eb..fc134b3 100644 --- a/src/sc.ini +++ b/src/sc.ini @@ -1,7 +1,7 @@ -[Version] -version=7.51 Build 020 - -[Environment] -LIB=%@P%\..\lib;\dm\lib -DFLAGS="-I%HOME%\..\import" -LINKCMD=%@P%\..\..\dm\bin\link.exe +[Version] +version=7.51 Build 020 + +[Environment] +LIB=%@P%\..\lib;\dm\lib +DFLAGS="-I%HOME%\..\import" +LINKCMD=%@P%\..\..\dm\bin\link.exe -- 2.43.0