set OLDHOME=%HOME%
set HOME=%CD%
make clean -fdmd-win32.mak
-make lib install -fdmd-win32.mak
+make release install -fdmd-win32.mak
+make clean -fdmd-win32.mak
+make debug install -fdmd-win32.mak
make clean -fdmd-win32.mak
set HOME=%OLDHOME%
\ No newline at end of file
# make clean\r
# Delete unneeded files created by build process\r
\r
-LIB_TARGET=libdruntime-core.a\r
-LIB_MASK=libdruntime-core*.a\r
+LIB_BASE=libdruntime-core\r
+LIB_BUILD=\r
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).a\r
+LIB_MASK=$(LIB_BASE)*.a\r
\r
CP=cp -f\r
RM=rm -f\r
ADD_CFLAGS=\r
ADD_DFLAGS=\r
\r
-CFLAGS=-O $(ADD_CFLAGS)\r
-#CFLAGS=-g $(ADD_CFLAGS)\r
+CFLAGS_RELEASE=-O $(ADD_CFLAGS)\r
+CFLAGS_DEBUG=-g $(ADD_CFLAGS)\r
+CFLAGS=$(CFLAGS_RELEASE)\r
\r
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)\r
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
+DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)\r
+DFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)\r
+DFLAGS=$(DFLAGS_RELEASE)\r
\r
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)\r
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
+TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)\r
+TFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)\r
+TFLAGS=$(TFLAGS_RELEASE)\r
\r
DOCFLAGS=-version=DDoc\r
\r
core/runtime.html \\r
core/thread.html\r
\r
+######################################################\r
\r
ALL_DOCS=\r
\r
######################################################\r
\r
+unittest :\r
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"\r
+\r
+release :\r
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"\r
+\r
+debug :\r
+ make -fposix.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"\r
+\r
+######################################################\r
+\r
core.lib : $(LIB_TARGET)\r
\r
$(LIB_TARGET) : $(ALL_OBJS)\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
+LIB_BASE=druntime-core\r
+LIB_BUILD=\r
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).lib\r
+LIB_MASK=$(LIB_BASE)*.lib\r
\r
CP=xcopy /y\r
RM=del /f\r
ADD_CFLAGS=\r
ADD_DFLAGS=\r
\r
-CFLAGS=-mn -6 -r $(ADD_CFLAGS)\r
-#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)\r
+CFLAGS_RELEASE=-mn -6 -r $(ADD_CFLAGS)\r
+CFLAGS_DEBUG=-D -g -mn -6 -r $(ADD_CFLAGS)\r
+CFLAGS=$(CFLAGS_RELEASE)\r
\r
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)\r
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
+DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)\r
+DFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)\r
+DFLAGS=$(DFLAGS_RELEASE)\r
\r
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)\r
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
+TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)\r
+TFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)\r
+TFLAGS=$(TFLAGS_RELEASE)\r
\r
DOCFLAGS=-version=DDoc\r
\r
core\runtime.html \\r
core\thread.html\r
\r
+######################################################\r
+\r
ALL_DOCS=\r
\r
######################################################\r
\r
+unittest :\r
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"\r
+\r
+release :\r
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"\r
+\r
+debug :\r
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"\r
+\r
+######################################################\r
+\r
core.lib : $(LIB_TARGET)\r
\r
$(LIB_TARGET) : $(ALL_OBJS)\r
{
debug(apply) printf("_aApplyRcd1.unittest\n");
- auto s = "hello"c;
+ auto s = "hello"c[];
int i;
foreach_reverse(dchar d; s)
{
debug(apply) printf("_aApplyRwd1.unittest\n");
- auto s = "hello"w;
+ auto s = "hello"w[];
int i;
foreach_reverse(dchar d; s)
{
debug(apply) printf("_aApplyRcw1.unittest\n");
- auto s = "hello"c;
+ auto s = "hello"c[];
int i;
foreach_reverse(wchar d; s)
{
debug(apply) printf("_aApplyRwc1.unittest\n");
- auto s = "hello"w;
+ auto s = "hello"w[];
int i;
foreach_reverse(char d; s)
{
debug(apply) printf("_aApplyRdc1.unittest\n");
- auto s = "hello"d;
+ auto s = "hello"d[];
int i;
foreach_reverse(char d; s)
{
debug(apply) printf("_aApplyRdw1.unittest\n");
- auto s = "hello"d;
+ auto s = "hello"d[];
int i;
foreach_reverse(wchar d; s)
{
debug(apply) printf("_aApplyRcd2.unittest\n");
- auto s = "hello"c;
+ auto s = "hello"c[];
int i;
foreach_reverse(k, dchar d; s)
{
debug(apply) printf("_aApplyRwd2.unittest\n");
- auto s = "hello"w;
+ auto s = "hello"w[];
int i;
foreach_reverse(k, dchar d; s)
{
debug(apply) printf("_aApplyRcw2.unittest\n");
- auto s = "hello"c;
+ auto s = "hello"c[];
int i;
foreach_reverse(k, wchar d; s)
{
debug(apply) printf("_aApplyRwc2.unittest\n");
- auto s = "hello"w;
+ auto s = "hello"w[];
int i;
foreach_reverse(k, char d; s)
{
debug(apply) printf("_aApplyRdc2.unittest\n");
- auto s = "hello"d;
+ auto s = "hello"d[];
int i;
foreach_reverse(k, char d; s)
{
debug(apply) printf("_aApplyRdw2.unittest\n");
- auto s = "hello"d;
+ auto s = "hello"d[];
int i;
foreach_reverse(k, wchar d; s)
unittest
{
- auto a = "abcd"c;
+ auto a = "abcd"c[];
auto r = a.dup.reverse;
//writefln(r);
import util.cpuid;
-version (Unittest)
+version (unittest)
{
+ private import core.stdc.stdio : printf;
/* This is so unit tests will test every CPU variant
*/
int cpuid;
private import util.cpuid;
-version (Unittest)
+version (unittest)
{
+ private import core.stdc.stdio : printf;
/* This is so unit tests will test every CPU variant
*/
int cpuid;
private import util.cpuid;
-version (Unittest)
+version (unittest)
{
+ private import core.stdc.stdio : printf;
/* This is so unit tests will test every CPU variant
*/
int cpuid;
private import util.cpuid;
-version (Unittest)
+version (unittest)
{
+ private import core.stdc.stdio : printf;
/* This is so unit tests will test every CPU variant
*/
int cpuid;
import util.cpuid;
-version (Unittest)
+version (unittest)
{
+ private import core.stdc.stdio : printf;
/* This is so unit tests will test every CPU variant
*/
int cpuid;
private import util.cpuid;
-version (Unittest)
+version (unittest)
{
+ private import core.stdc.stdio : printf;
/* This is so unit tests will test every CPU variant
*/
int cpuid;
# make clean
# Delete unneeded files created by build process
-LIB_TARGET=libdruntime-rt-dmd.a
-LIB_MASK=libdruntime-rt-dmd*.a
+LIB_BASE=libdruntime-rt-dmd
+LIB_BUILD=
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).a
+LIB_MASK=$(LIB_BASE)*.a
CP=cp -f
RM=rm -f
MD=mkdir -p
-CFLAGS=-O $(ADD_CFLAGS)
-#CFLAGS=-g $(ADD_CFLAGS)
+ADD_CFLAGS=
+ADD_DFLAGS=
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+CFLAGS_RELEASE=-O $(ADD_CFLAGS)
+CFLAGS_DEBUG=-g $(ADD_CFLAGS)
+CFLAGS=$(CFLAGS_RELEASE)
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)
+DFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+DFLAGS=$(DFLAGS_RELEASE)
+
+TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)
+TFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+TFLAGS=$(TFLAGS_RELEASE)
DOCFLAGS=-version=DDoc
######################################################
+unittest :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
+
+release :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
+
+debug :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
+
+######################################################
+
dmd.lib : $(LIB_TARGET)
$(LIB_TARGET) : $(ALL_OBJS)
assert(i == 3);
static s4 =
- [ "\xE2\x89"c, // too short
+ [ "\xE2\x89"c[], // too short
"\xC0\x8A",
"\xE0\x80\x8A",
"\xF0\x80\x80\x8A",
{
debug(utf) printf("utf.toUTF.unittest\n");
- auto c = "hello"c;
+ auto c = "hello"c[];
auto w = toUTF16(c);
assert(w == "hello");
auto d = toUTF32(c);
# make clean
# Delete unneeded files created by build process
-LIB_TARGET=druntime-rt-dmd.lib
-LIB_MASK=druntime-rt-dmd*.lib
+LIB_BASE=druntime-rt-dmd
+LIB_BUILD=
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).lib
+LIB_MASK=$(LIB_BASE)*.lib
CP=xcopy /y
RM=del /f
MD=mkdir
-CFLAGS=-mn -6 -r $(ADD_CFLAGS)
-#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)
+ADD_CFLAGS=
+ADD_DFLAGS=
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+CFLAGS_RELEASE=-mn -6 -r $(ADD_CFLAGS)
+CFLAGS_DEBUG=-D -g -mn -6 -r $(ADD_CFLAGS)
+CFLAGS=$(CFLAGS_RELEASE)
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)
+DFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+DFLAGS=$(DFLAGS_RELEASE)
+
+TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)
+TFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+TFLAGS=$(TFLAGS_RELEASE)
DOCFLAGS=-version=DDoc
######################################################
+unittest :
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
+
+release :
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
+
+debug :
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
+
+######################################################
+
dmd.lib : $(LIB_TARGET)
$(LIB_TARGET) : $(ALL_OBJS)
# make clean
# Delete unneeded files created by build process
-LIB_TARGET=libdruntime-dmd.a
-DUP_TARGET=libdruntime.a
-LIB_MASK=libdruntime*.a
+LIB_BASE=libdruntime-dmd
+LIB_BUILD=
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).a
+LIB_MASK=$(LIB_BASE)*.a
+DUP_TARGET=libdruntime$(LIB_BUILD).a
+DUP_MASK=libdruntime*.a
+MAKE_LIB=lib
DIR_CC=common
DIR_RT=compiler/dmd
######################################################
+unittest :
+ make -fdmd-posix.mak lib MAKE_LIB="unittest"
+ dmd -unittest main ../import/core/stdc/stdarg -defaultlib="$(DUP_TARGET)" -debuglib="$(DUP_TARGET)"
+ $(RM) stdarg.o
+ main
+
+release :
+ make -fdmd-posix.mak lib MAKE_LIB="release"
+
+debug :
+ make -fdmd-posix.mak lib MAKE_LIB="debug" LIB_BUILD="-d"
+
+######################################################
+
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)"
+ make -C $(DIR_CC) -fposix.mak $(MAKE_LIB) DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+ make -C $(DIR_RT) -fposix.mak $(MAKE_LIB) DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+ make -C $(DIR_GC) -fposix.mak $(MAKE_LIB) DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
$(RM) $(LIB_TARGET)
$(LC) $(LIB_TARGET) `find $(DIR_CC) -name "*.o" | xargs echo`
$(LC) $(LIB_TARGET) `find $(DIR_RT) -name "*.o" | xargs echo`
make -C $(DIR_RT) -fposix.mak clean
make -C $(DIR_GC) -fposix.mak clean
$(RM) $(LIB_MASK)
+ $(RM) $(DUP_MASK)
+ $(RM) main main.o
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)/.
+ $(CP) $(DUP_MASK) $(LIB_DEST)/.
# make clean
# Delete unneeded files created by build process
-LIB_TARGET=druntime-dmd.lib
-DUP_TARGET=druntime.lib
-LIB_MASK=druntime*.lib
+LIB_BASE=druntime-dmd
+LIB_BUILD=
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).lib
+LIB_MASK=$(LIB_BASE)*.lib
+DUP_TARGET=druntime$(LIB_BUILD).lib
+DUP_MASK=druntime*.lib
+MAKE_LIB=lib
DIR_CC=common
DIR_RT=compiler\dmd
DIR_GC=gc\basic
DIR_GC_STUB=gc\stub
-LIB_CC=$(DIR_CC)\druntime-core.lib
-LIB_RT=$(DIR_RT)\druntime-rt-dmd.lib
-LIB_GC=$(DIR_GC)\druntime-gc-basic.lib
+LIB_CC=$(DIR_CC)\druntime-core$(LIB_BUILD).lib
+LIB_RT=$(DIR_RT)\druntime-rt-dmd$(LIB_BUILD).lib
+LIB_GC=$(DIR_GC)\druntime-gc-basic$(LIB_BUILD).lib
CP=xcopy /y
RM=del /f
######################################################
+unittest :
+ make -fdmd-win32.mak lib MAKE_LIB="unittest"
+ dmd -unittest main ..\import\core\stdc\stdarg -defaultlib="$(DUP_TARGET)" -debuglib="$(DUP_TARGET)"
+ $(RM) stdarg.obj
+ main
+
+release :
+ make -fdmd-win32.mak lib MAKE_LIB="release"
+
+debug :
+ make -fdmd-win32.mak lib MAKE_LIB="debug" LIB_BUILD="-d"
+
+######################################################
+
lib : $(ALL_OBJS)
cd $(DIR_CC)
- make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+ make -fwin32.mak $(MAKE_LIB) DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
cd ..
cd $(DIR_RT)
- make -fwin32.mak lib DC=$(DC)
+ make -fwin32.mak $(MAKE_LIB) DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
cd ..\..
cd $(DIR_GC)
- make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+ make -fwin32.mak $(MAKE_LIB) DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
cd ..\..
cd $(DIR_GC_STUB)
- make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+ make -fwin32.mak $(MAKE_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)
make -fwin32.mak clean
cd ..\..
$(RM) $(LIB_MASK)
+ $(RM) $(DUP_MASK)
+ $(RM) main.exe main.obj main.map
install :
cd $(DIR_CC)
make -fwin32.mak install
cd ..\..
$(CP) $(LIB_MASK) $(LIB_DEST)\.
+ $(CP) $(DUP_MASK) $(LIB_DEST)\.
# make clean
# Delete unneeded files created by build process
-LIB_TARGET=libdruntime-gc-basic.a
-LIB_MASK=libdruntime-gc-basic*.a
+LIB_BASE=libdruntime-gc-basic
+LIB_BUILD=
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).a
+LIB_MASK=$(LIB_BASE)*.a
CP=cp -f
RM=rm -f
ADD_CFLAGS=
ADD_DFLAGS=
-CFLAGS=-O $(ADD_CFLAGS)
-#CFLAGS=-g $(ADD_CFLAGS)
+CFLAGS_RELEASE=-O $(ADD_CFLAGS)
+CFLAGS_DEBUG=-g $(ADD_CFLAGS)
+CFLAGS=$(CFLAGS_RELEASE)
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)
+DFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+DFLAGS=$(DFLAGS_RELEASE)
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)
+TFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+TFLAGS=$(TFLAGS_RELEASE)
DOCFLAGS=-version=DDoc
######################################################
+unittest :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
+
+release :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
+
+debug :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
+
+######################################################
+
basic.lib : $(LIB_TARGET)
$(LIB_TARGET) : $(ALL_OBJS)
# make clean
# Delete unneeded files created by build process
-LIB_TARGET=druntime-gc-basic.lib
-LIB_MASK=druntime-gc-basic*.lib
+LIB_BASE=druntime-gc-basic
+LIB_BUILD=
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).lib
+LIB_MASK=$(LIB_BASE)*.lib
CP=xcopy /y
RM=del /f
ADD_CFLAGS=
ADD_DFLAGS=
-CFLAGS=-mn -6 -r $(ADD_CFLAGS)
-#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)
+CFLAGS_RELEASE=-mn -6 -r $(ADD_CFLAGS)
+CFLAGS_DEBUG=-D -g -mn -6 -r $(ADD_CFLAGS)
+CFLAGS=$(CFLAGS_RELEASE)
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)
+DFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+DFLAGS=$(DFLAGS_RELEASE)
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)
+TFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+TFLAGS=$(TFLAGS_RELEASE)
DOCFLAGS=-version=DDoc
######################################################
+unittest :
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
+
+release :
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
+
+debug :
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
+
+######################################################
+
basic.lib : $(LIB_TARGET)
$(LIB_TARGET) : $(ALL_OBJS)
# make clean
# Delete unneeded files created by build process
-LIB_TARGET=libdruntime-gc-stub.a
-LIB_MASK=libdruntime-gc-stub*.a
+LIB_BASE=libdruntime-gc-stub
+LIB_BUILD=
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).a
+LIB_MASK=$(LIB_BASE)*.a
CP=cp -f
RM=rm -f
ADD_CFLAGS=
ADD_DFLAGS=
-CFLAGS=-O $(ADD_CFLAGS)
-#CFLAGS=-g $(ADD_CFLAGS)
+CFLAGS_RELEASE=-O $(ADD_CFLAGS)
+CFLAGS_DEBUG=-g $(ADD_CFLAGS)
+CFLAGS=$(CFLAGS_RELEASE)
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)
+DFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+DFLAGS=$(DFLAGS_RELEASE)
-
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)
+TFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+TFLAGS=$(TFLAGS_RELEASE)
DOCFLAGS=-version=DDoc
######################################################
+unittest :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
+
+release :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
+
+debug :
+ make -fposix.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
+
+######################################################
+
stub.lib : $(LIB_TARGET)
$(LIB_TARGET) : $(ALL_OBJS)
# make clean
# Delete unneeded files created by build process
-LIB_TARGET=druntime-gc-stub.lib
-LIB_MASK=druntime-gc-stub*.lib
+LIB_BASE=druntime-gc-stub
+LIB_BUILD=
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).lib
+LIB_MASK=$(LIB_BASE)*.lib
CP=xcopy /y
RM=del /f
ADD_CFLAGS=
ADD_DFLAGS=
-CFLAGS=-mn -6 -r $(ADD_CFLAGS)
-#CFLAGS=-g -mn -6 -r $(ADD_CFLAGS)
+CFLAGS_RELEASE=-mn -6 -r $(ADD_CFLAGS)
+CFLAGS_DEBUG=-D -g -mn -6 -r $(ADD_CFLAGS)
+CFLAGS=$(CFLAGS_RELEASE)
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)
+DFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+DFLAGS=$(DFLAGS_RELEASE)
-
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
+TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)
+TFLAGS_DEBUG=-debug -g -w -nofloat $(ADD_DFLAGS)
+TFLAGS=$(TFLAGS_RELEASE)
DOCFLAGS=-version=DDoc
######################################################
+unittest :
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"
+
+release :
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"
+
+debug :
+ make -fwin32.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"
+
+######################################################
+
stub.lib : $(LIB_TARGET)
$(LIB_TARGET) : $(ALL_OBJS)
--- /dev/null
+@echo off
+set OLDHOME=%HOME%
+set HOME=%CD%
+make clean -fdmd-win32.mak
+make unittest -fdmd-win32.mak
+make clean -fdmd-win32.mak
+set HOME=%OLDHOME%
\ No newline at end of file
--- /dev/null
+void main()
+{
+
+}