X-Git-Url: https://git.llucax.com/software/druntime.git/blobdiff_plain/06df0cbad0c518989750f59ebc17d7eba2a2aec5..14babdacbde141401ef82ccced25e24ec201344b:/src/dmd-win32.mak diff --git a/src/dmd-win32.mak b/src/dmd-win32.mak index 2647819..f79f02f 100644 --- a/src/dmd-win32.mak +++ b/src/dmd-win32.mak @@ -10,18 +10,22 @@ # 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)\.