]> git.llucax.com Git - software/druntime.git/blobdiff - src/dmd-win32.mak
* Auto type determination was broken in some unit tests. This has been fixed.
[software/druntime.git] / src / dmd-win32.mak
index 2647819b1788621b2e6f684055de4911242d4c11..f79f02fa47c57af603bd4f4b38ca9cc924d096c7 100644 (file)
 #   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
@@ -49,18 +53,32 @@ ALL_DOCS=
 
 ######################################################
 
+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)
@@ -101,6 +119,8 @@ clean :
        make -fwin32.mak clean
        cd ..\..
        $(RM) $(LIB_MASK)
+       $(RM) $(DUP_MASK)
+       $(RM) main.exe main.obj main.map
 
 install :
        cd $(DIR_CC)
@@ -116,3 +136,4 @@ install :
        make -fwin32.mak install
        cd ..\..
        $(CP) $(LIB_MASK) $(LIB_DEST)\.
+       $(CP) $(DUP_MASK) $(LIB_DEST)\.