# Makefile to build D runtime library ares.lib for Win32 # Designed to work with DigitalMars make # Targets: # make # Same as make all # make lib # Build ares.lib # make doc # Generate documentation # make clean # Delete unneeded files created by build process CP=xcopy /y RM=del /f MD=mkdir CFLAGS=-mn -6 -r #CFLAGS=-g -mn -6 -r DFLAGS=-release -O -inline #DFLAGS=-g -release TFLAGS=-O -inline #TFLAGS=-g DOCFLAGS=-version=DDoc CC=dmc LC=lib DC=dmd ARES_DEST=..\.. INC_DEST=$(ARES_DEST)\include\ares LIB_DEST=$(ARES_DEST)\lib DOC_DEST=$(ARES_DEST)\doc\ares .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$@ # $(DC) -c $(DFLAGS) -Hf$*.di $< -of$@ .d.html: $(DC) -c -o- $(DOCFLAGS) -Df$*.html ares.ddoc $< targets : lib doc all : lib doc ares : lib lib : ares.lib doc : ares.doc ###################################################### OBJ_STD= \ std\array.obj \ std\atomic.obj \ std\bitarray.obj \ std\exception.obj \ std\intrinsic.obj \ std\memory.obj \ std\regexp.obj \ std\vararg.obj \ std\thread.obj \ std\traits.obj \ std\unicode.obj OBJ_STD_C= \ std\c\complex.obj \ std\c\config.obj \ std\c\ctype.obj \ std\c\errno.obj \ std\c\fenv.obj \ std\c\inttypes.obj \ std\c\math.obj \ std\c\signal.obj \ std\c\stdarg.obj \ std\c\stdbool.obj \ std\c\stddef.obj \ std\c\stdint.obj \ std\c\stdio.obj \ std\c\stdlib.obj \ std\c\string.obj \ std\c\time.obj \ std\c\wctype.obj \ std\c\wrap.obj OBJ_STD_IO= \ std\io\ArrayAllocator.obj \ std\io\Buffer.obj \ std\io\Conduit.obj \ std\io\Console.obj \ std\io\DeviceConduit.obj \ std\io\Exception.obj \ std\io\FileConduit.obj \ std\io\FileConst.obj \ std\io\FilePath.obj \ std\io\FileProxy.obj \ std\io\Reader.obj \ std\io\Writer.obj OBJ_STD_IO_CONVERT= \ std\io\convert\Type.obj \ std\io\convert\Unicode.obj OBJ_STD_IO_MODEL= \ std\io\model\IBuffer.obj \ std\io\model\IConduit.obj \ std\io\model\IReader.obj \ std\io\model\IWriter.obj OBJ_STD_IO_SYS= \ std\io\sys\OS.obj OBJ_STD_IO_UTILS= \ std\io\utils\HeapSlice.obj OBJ_STD_MATH= \ std\math\core.obj \ std\math\ieee.obj \ std\math\special.obj OBJ_SYS_WIN_C= \ sys\windows\c\com.obj \ sys\windows\c\process.obj \ sys\windows\c\windows.obj ALL_OBJS= \ $(OBJ_STD) \ $(OBJ_STD_C) \ $(OBJ_STD_IO)\ $(OBJ_STD_IO_CONVERT) \ $(OBJ_STD_IO_MODEL) \ $(OBJ_STD_IO_SYS) \ $(OBJ_STD_IO_UTILS) \ $(OBJ_STD_MATH) \ $(OBJ_SYS_WIN_C) ###################################################### DOC_STD= \ std\array.html \ std\atomic.html \ std\bitarray.html \ std\exception.html \ std\intrinsic.html \ std\memory.html \ std\regexp.html \ std\thread.html \ std\traits.html \ std\unicode.html \ std\vararg.html DOC_STD_MATH= \ std\math\core.html \ std\math\ieee.html \ std\math\special.html ALL_DOCS= \ $(DOC_STD) \ $(DOC_STD_MATH) ###################################################### ares.lib : $(ALL_OBJS) $(RM) $@ $(LC) -c -n $@ $(ALL_OBJS) ares.doc : $(ALL_DOCS) @echo Documentation generated. ###################################################### ### std std\array.obj : std\array.d $(DC) -c $(TFLAGS) std\array.d -of$@ std\atomic.obj : std\atomic.d $(DC) -c $(TFLAGS) std\atomic.d -of$@ std\traits.obj : std\traits.d $(DC) -c $(TFLAGS) std\traits.d -of$@ std\vararg.obj : std\vararg.d $(DC) -c $(TFLAGS) std\vararg.d -of$@ ### std\c std\c\stdarg.obj : std\c\stdarg.d $(DC) -c $(TFLAGS) std\c\stdarg.d -of$@ ###################################################### clean : $(RM) /s *.di $(RM) $(ALL_OBJS) $(RM) ares*.lib $(RM) $(ALL_DOCS) install : $(MD) $(INC_DEST) $(CP) /s *.di $(INC_DEST)\. $(MD) $(LIB_DEST) $(CP) ares*.lib $(LIB_DEST)\. $(MD) $(DOC_DEST) $(CP) /s *.html $(DOC_DEST)\.