From 843afa8f64ae8b84dee52d2f01792a0e69425a88 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Wed, 13 Dec 2023 21:55:29 +0100 Subject: [PATCH 1/3] Merge Makefiles --- .circleci/run.sh | 14 +- .gitignore | 1 - posix.mak => Makefile | 84 ++++--- azure-pipelines.yml | 8 +- etc/c/zlib/linux.mak | 95 ------- etc/c/zlib/osx.mak | 99 -------- etc/c/zlib/win32.mak | 97 ------- etc/c/zlib/win64.mak | 104 -------- win32.mak | 574 ------------------------------------------ win64.mak | 516 ------------------------------------- 10 files changed, 56 insertions(+), 1536 deletions(-) rename posix.mak => Makefile (92%) delete mode 100644 etc/c/zlib/linux.mak delete mode 100644 etc/c/zlib/osx.mak delete mode 100644 etc/c/zlib/win32.mak delete mode 100644 etc/c/zlib/win64.mak delete mode 100644 win32.mak delete mode 100644 win64.mak diff --git a/.circleci/run.sh b/.circleci/run.sh index 873de6f1903..b0e6946e640 100755 --- a/.circleci/run.sh +++ b/.circleci/run.sh @@ -96,17 +96,17 @@ setup_repos() # run unittest with coverage coverage() { - make -f posix.mak clean + make clean # remove all existing coverage files (just in case) find . -name "*.lst" -type f -delete # Coverage information of the test runner can be missing for some template instatiations. # https://issues.dlang.org/show_bug.cgi?id=16397 - # ENABLE_COVERAGE="1" make -j"$N" -f posix.mak MODEL=$MODEL unittest-debug + # ENABLE_COVERAGE="1" make -j"$N" MODEL=$MODEL unittest-debug # So instead we run all tests individually (hoping that that doesn't break any tests). # -cov is enabled by the %.test target itself - make -j"$N" -f posix.mak BUILD=$BUILD $(find std etc -name "*.d" | sed "s/[.]d$/.test/") + make -j"$N" BUILD=$BUILD $(find std etc -name "*.d" | sed "s/[.]d$/.test/") # Remove coverage information from lines with non-deterministic coverage. # These lines are annotated with a comment containing "nocoverage". @@ -124,12 +124,12 @@ publictests() { source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)" - make -f posix.mak -j"$N" publictests DUB="$DUB" BUILD=$BUILD - make -f posix.mak -j"$N" publictests DUB="$DUB" BUILD=$BUILD NO_BOUNDSCHECKS=1 + make -j"$N" publictests DUB="$DUB" BUILD=$BUILD + make -j"$N" publictests DUB="$DUB" BUILD=$BUILD NO_BOUNDSCHECKS=1 # run -betterC tests - make -f posix.mak test_extractor # build in single-threaded mode - make -f posix.mak -j"$N" betterc + make test_extractor # build in single-threaded mode + make -j"$N" betterc } # test stdx dub package diff --git a/.gitignore b/.gitignore index efcbaa7d841..81d7f2bb1ff 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ generated GNUmakefile .DS_Store .*.sw* -Makefile *.lst temp/ diff --git a/posix.mak b/Makefile similarity index 92% rename from posix.mak rename to Makefile index f246c0c9e60..2d6fdaadb10 100644 --- a/posix.mak +++ b/Makefile @@ -1,4 +1,9 @@ -# Makefile to build linux D runtime library libphobos2.a and its unit test +# This makefile is designed to be run by gnu make. +# - Windows: you may download a prebuilt zipped .exe from https://github.com/dlang/dmd/releases/download/nightly/gnumake-4.4-win64.zip. +# You also need a Git for Windows installation, for bash and common GNU tools like cp,mkdir,mv,rm,touch,which. +# - FreeBSD: the default make program on FreeBSD is not gnu make; to install gnu make: +# pkg install gmake +# and then run as gmake rather than make. # # make => makes release build of the library # @@ -25,7 +30,7 @@ ################################################################################ # Configurable stuff, usually from the command line # -# OS can be linux, win32, win32wine, osx, freebsd, netbsd or dragonflybsd. +# OS can be linux, windows, win32wine, osx, freebsd, netbsd or dragonflybsd. # The system will be determined by using uname QUIET:=@ @@ -36,6 +41,14 @@ DMD_DIR=../dmd include $(DMD_DIR)/compiler/src/osmodel.mak +ifeq (windows,$(OS)) + DOTEXE:=.exe + DOTOBJ:=.obj +else + DOTEXE:= + DOTOBJ:=.o +endif + ifeq (osx,$(OS)) export MACOSX_DEPLOYMENT_TARGET=10.9 endif @@ -57,7 +70,7 @@ endif # default to PIC, use PIC=1/0 to en-/disable PIC. # Note that shared libraries and C files are always compiled with PIC. ifeq ($(PIC),) - PIC:=1 + PIC:=$(if $(findstring win,$(OS)),,1) endif ifeq ($(PIC),1) override PIC:=-fPIC @@ -67,7 +80,7 @@ endif # Configurable stuff that's rarely edited INSTALL_DIR = ../install -DRUNTIME_PATH = ../dmd/druntime +DRUNTIME_PATH = $(DMD_DIR)/druntime DLANG_ORG_DIR = ../dlang.org ZIPFILE = phobos.zip ROOT_OF_THEM_ALL = generated @@ -85,7 +98,7 @@ ifeq (,$(findstring win,$(OS))) DRUNTIME = $(DRUNTIME_PATH)/../generated/$(OS)/$(BUILD)/$(MODEL)/libdruntime.a DRUNTIMESO = $(basename $(DRUNTIME)).so.a else - DRUNTIME = $(DRUNTIME_PATH)/../lib/druntime.lib + DRUNTIME = $(DRUNTIME_PATH)/../generated/$(OS)/$(BUILD)/$(MODEL)/druntime.lib endif # Set CC and DMD @@ -94,9 +107,11 @@ ifeq ($(OS),win32wine) DMD = wine dmd.exe RUN = wine else - DMD = $(DMD_DIR)/generated/$(OS)/$(BUILD)/$(MODEL)/dmd - ifeq ($(OS),win32) + DMD = $(DMD_DIR)/generated/$(OS)/$(BUILD)/$(MODEL)/dmd$(DOTEXE) + ifeq ($(MODEL),32omf) CC = dmc + else ifeq ($(OS),windows) + CC = cl.exe else CC = cc endif @@ -118,7 +133,7 @@ ifeq (,$(findstring win,$(OS))) CFLAGS += -O3 endif else - ifeq ($(OS),win32) + ifeq ($(MODEL),32omf) CFLAGS=-DNO_snprintf ifeq ($(BUILD),debug) CFLAGS += -g @@ -127,11 +142,11 @@ else endif else # win64/win32coff OUTFILEFLAG = /Fo - NODEFAULTLIB=-L/NOD:phobos$(MODEL).lib -L/OPT:NOICF + CFLAGS += /nologo /Zl /GS- ifeq ($(BUILD),debug) CFLAGS += /Z7 else - CFLAGS += /Ox + CFLAGS += /O2 endif endif endif @@ -165,17 +180,6 @@ endif UDFLAGS=-unittest -version=StdUnittest -# Set DOTOBJ and DOTEXE -ifeq (,$(findstring win,$(OS))) - DOTOBJ:=.o - DOTEXE:= - PATHSEP:=/ -else - DOTOBJ:=.obj - DOTEXE:=.exe - PATHSEP:=$(shell echo "\\") -endif - LINKDL:=$(if $(findstring $(OS),linux),-L-ldl,) # use timelimit to avoid deadlocks if available @@ -197,7 +201,13 @@ ifeq (,$(findstring win,$(OS))) SONAME:=libphobos2.so.$(MAJOR).$(MINOR) LIBSO:=$(ROOT)/$(SONAME).$(PATCH) else - LIB:=$(ROOT)/phobos.lib + ifeq ($(MODEL),32omf) + LIB:=phobos.lib + else ifeq ($(MODEL),32) + LIB:=phobos32mscoff.lib + else + LIB:=phobos$(MODEL).lib + endif endif ################################################################################ @@ -299,7 +309,7 @@ MAKEFILE = $(firstword $(MAKEFILE_LIST)) # build with shared library support (defaults to true on supported platforms) SHARED=$(if $(findstring $(OS),linux freebsd),1,) -TESTS_EXTRACTOR=$(ROOT)/tests_extractor +TESTS_EXTRACTOR=$(ROOT)/tests_extractor$(DOTEXE) PUBLICTESTS_DIR=$(ROOT)/publictests BETTERCTESTS_DIR=$(ROOT)/betterctests @@ -396,7 +406,7 @@ ifneq (1,$(SHARED)) $(UT_D_OBJS): $(DRUNTIME) -$(ROOT)/unittest/test_runner: $(DRUNTIME_PATH)/src/test_runner.d $(UT_D_OBJS) $(OBJS) $(DRUNTIME) +$(ROOT)/unittest/test_runner$(DOTEXE): $(DRUNTIME_PATH)/src/test_runner.d $(UT_D_OBJS) $(OBJS) $(DRUNTIME) $(DMD) $(DFLAGS) $(UDFLAGS) -of$@ $(DRUNTIME_PATH)/src/test_runner.d $(UT_D_OBJS) $(OBJS) $(DRUNTIME) $(LINKDL) $(NODEFAULTLIB) else @@ -409,7 +419,7 @@ $(UT_LIBSO): override PIC:=-fPIC $(UT_LIBSO): $(UT_D_OBJS) $(OBJS) $(DRUNTIMESO) $(DMD) $(DFLAGS) -shared $(UDFLAGS) -of$@ $(UT_D_OBJS) $(OBJS) $(DRUNTIMESO) $(LINKDL) $(NODEFAULTLIB) -$(ROOT)/unittest/test_runner: $(DRUNTIME_PATH)/src/test_runner.d $(UT_LIBSO) +$(ROOT)/unittest/test_runner$(DOTEXE): $(DRUNTIME_PATH)/src/test_runner.d $(UT_LIBSO) $(DMD) $(DFLAGS) -of$@ $< -L$(UT_LIBSO) $(NODEFAULTLIB) endif @@ -418,7 +428,7 @@ endif moduleName=$(subst /,.,$(1)) # target for batch unittests (using shared phobos library and test_runner) -unittest/%.run : $(ROOT)/unittest/test_runner +unittest/%.run : $(ROOT)/unittest/test_runner$(DOTEXE) $(QUIET)$(TIMELIMIT)$(RUN) $< $(call moduleName,$*) # Target for quickly running a single unittest (using static phobos library). @@ -447,7 +457,7 @@ unittest/%.run : $(ROOT)/unittest/test_runner $(DEBUGGER) ./$(basename $(notdir $<)) # Target for quickly debugging a single module -# For example: make -f posix.mak DEBUGGER=ddd std/format.debug +# For example: make DEBUGGER=ddd std/format.debug # ddd in this case is a graphical frontend to gdb %.debug : %.d BUILD=debug $(MAKE) -f $(MAKEFILE) $(basename $<).debug_with_debugger @@ -464,7 +474,7 @@ unittest/%.run : $(ROOT)/unittest/test_runner touch $@ clean : - rm -rf $(ROOT_OF_THEM_ALL) $(ZIPFILE) + rm -rf $(ROOT_OF_THEM_ALL) $(ZIPFILE) $(LIB) gitzip: git archive --format=zip HEAD > $(ZIPFILE) @@ -495,7 +505,7 @@ else # to always invoke druntime's make. Use FORCE instead of .PHONY to # avoid rebuilding phobos when $(DRUNTIME) didn't change. $(DRUNTIME): FORCE - $(MAKE) -C $(DRUNTIME_PATH) -f posix.mak MODEL=$(MODEL) DMD=$(abspath $(DMD)) OS=$(OS) BUILD=$(BUILD) + $(MAKE) -C $(DRUNTIME_PATH) MODEL=$(MODEL) DMD=$(abspath $(DMD)) OS=$(OS) BUILD=$(BUILD) ifeq (,$(findstring win,$(OS))) $(DRUNTIMESO): $(DRUNTIME) @@ -553,7 +563,7 @@ $(TOOLS_DIR)/checkwhitespace.d: | $(TOOLS_DIR) $(TOOLS_DIR)/tests_extractor.d: | $(TOOLS_DIR) #################### test for undesired white spaces ########################## -CWS_TOCHECK = posix.mak win32.mak win64.mak +CWS_TOCHECK = Makefile CWS_TOCHECK += $(ALL_D_FILES) index.dd checkwhitespace: $(LIB) $(TOOLS_DIR)/checkwhitespace.d @@ -582,7 +592,7 @@ style: style_lint publictests dscanner: $(LIB) @# The dscanner target is without dependencies to avoid constant rebuilds of Phobos (`make` always rebuilds order-only dependencies) @# However, we still need to ensure that the DScanner binary is built once - @[ -f $(DSCANNER_DIR)/dsc ] || ${MAKE} -f posix.mak $(DSCANNER_DIR)/dsc + @[ -f $(DSCANNER_DIR)/dsc ] || ${MAKE} $(DSCANNER_DIR)/dsc @echo "Running DScanner" $(DSCANNER_DIR)/dsc --config .dscanner.ini -I $(DRUNTIME_PATH)/src/ --styleCheck etc std -I. @@ -641,15 +651,15 @@ style_lint: style_lint_shellcmds dscanner ################################################################################ $(TESTS_EXTRACTOR): $(TOOLS_DIR)/tests_extractor.d | $(LIB) - DFLAGS="$(DFLAGS) $(LIB) $(NODEFAULTLIB) $(LINKDL)" $(DUB) build --force --compiler=$${PWD}/$(DMD) --single $< - mv $(TOOLS_DIR)/tests_extractor $@ + DFLAGS="$(DFLAGS) $(LIB) $(NODEFAULTLIB) $(LINKDL)" $(DUB) build --force --compiler=$(abspath $(DMD)) --single $< + mv $(TOOLS_DIR)/tests_extractor$(DOTEXE) $@ test_extractor: $(TESTS_EXTRACTOR) ################################################################################ # Extract public tests of a module and test them in an separate file (i.e. without its module) # This is done to check for potentially missing imports in the examples, e.g. -# make -f posix.mak std/format.publictests +# make std/format.publictests ################################################################################ publictests: $(addsuffix .publictests,$(D_MODULES)) @@ -664,7 +674,7 @@ publictests: $(addsuffix .publictests,$(D_MODULES)) # # Extract @betterC tests of a module and run them in -betterC # -# make -f posix.mak std/format.betterc +# make std/format.betterc ################################################################################ betterc-phobos-tests: $(addsuffix .betterc,$(D_MODULES)) @@ -673,7 +683,7 @@ betterc: betterc-phobos-tests %.betterc: %.d | $(BETTERCTESTS_DIR)/.directory @# Due to the FORCE rule on druntime, make will always try to rebuild Phobos (even as an order-only dependency) @# However, we still need to ensure that the test_extractor is built once - @[ -f "$(TESTS_EXTRACTOR)" ] || ${MAKE} -f posix.mak "$(TESTS_EXTRACTOR)" + @[ -f "$(TESTS_EXTRACTOR)" ] || ${MAKE} "$(TESTS_EXTRACTOR)" $(TESTS_EXTRACTOR) --betterC --attributes betterC \ --inputdir $< --outputdir $(BETTERCTESTS_DIR) $(DMD) $(DFLAGS) $(NODEFAULTLIB) -betterC -unittest -run $(BETTERCTESTS_DIR)/$(subst /,_,$<) @@ -686,7 +696,7 @@ betterc: betterc-phobos-tests # Test full modules with -betterC. Edit BETTERC_MODULES and # test/betterc_module_tests.d to add new modules to the list. # -# make -f posix.mak betterc-module-tests +# make betterc-module-tests ################################################################################ BETTERC_MODULES=std/sumtype diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b85fdb494f7..1bb435d4931 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,11 +15,9 @@ jobs: strategy: matrix: x64: - OS: Win_64 MODEL: 64 ARCH: x64 x86-OMF: - OS: Win_32 MODEL: 32omf ARCH: x86 steps: @@ -52,12 +50,10 @@ jobs: strategy: matrix: x86-mscoff: - OS: Win_32 - MODEL: 32mscoff + MODEL: 32 ARCH: x86 x86-mscoff_MinGW: - OS: Win_32 - MODEL: 32mscoff + MODEL: 32 ARCH: x86 C_RUNTIME: mingw steps: diff --git a/etc/c/zlib/linux.mak b/etc/c/zlib/linux.mak deleted file mode 100644 index d6d5a77d0db..00000000000 --- a/etc/c/zlib/linux.mak +++ /dev/null @@ -1,95 +0,0 @@ -# Makefile for zlib - -CC=gcc -LD=link -CFLAGS=-I. -O -g -DHAVE_UNISTD_H -DHAVE_STDARG_H -LDFLAGS= -O=.o - -.c.o: - "$(CC)" -c $(CFLAGS) $* - -.d.o: - "$(DMD)" -c $(DFLAGS) $* - -# variables -OBJS = adler32$(O) compress$(O) crc32$(O) deflate$(O) gzclose$(O) gzlib$(O) gzread$(O) \ - gzwrite$(O) infback$(O) inffast$(O) inflate$(O) inftrees$(O) trees$(O) uncompr$(O) zutil$(O) - -all: zlib.a example infcover minigzip - -adler32.o: zutil.h zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -zutil.o: zutil.h zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -gzclose.o: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -gzlib.o: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -gzread.o: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -gzwrite.o: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -compress.o: zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -uncompr.o: zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -crc32.o: zutil.h zlib.h zconf.h crc32.h - "$(CC)" -c $(CFLAGS) $*.c - -deflate.o: deflate.h zutil.h zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h - "$(CC)" -c $(CFLAGS) $*.c - -inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h - "$(CC)" -c $(CFLAGS) $*.c - -inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h - "$(CC)" -c $(CFLAGS) $*.c - -inftrees.o: zutil.h zlib.h zconf.h inftrees.h - "$(CC)" -c $(CFLAGS) $*.c - -trees.o: deflate.h zutil.h zlib.h zconf.h trees.h - "$(CC)" -c $(CFLAGS) $*.c - - -example.o: test/example.c zlib.h zconf.h - "$(CC)" -c $(cvarsdll) $(CFLAGS) test/$*.c - -infcover.o: test/infcover.c zlib.h zconf.h - "$(CC)" -c $(cvarsdll) $(CFLAGS) test/$*.c - -minigzip.o: test/minigzip.c zlib.h zconf.h - "$(CC)" -c $(cvarsdll) $(CFLAGS) test/$*.c - -zlib.a: $(OBJS) - ar -r $@ $(OBJS) - -example: example.o zlib.a - "$(CC)" $(LDFLAGS) -o $@ example.o zlib.a - -infcover: infcover.o zlib.a - "$(CC)" $(LDFLAGS) -o $@ infcover.o zlib.a - -minigzip: minigzip.o zlib.a - "$(CC)" $(LDFLAGS) -o $@ minigzip.o zlib.a - -test: example infcover minigzip - ./example - ./infcover - echo hello world | ./minigzip | ./minigzip -d - -clean: - $(RM) $(OBJS) zlib.a example.o example infcover.o infcover minigzip.o minigzip foo.gz - diff --git a/etc/c/zlib/osx.mak b/etc/c/zlib/osx.mak deleted file mode 100644 index cee494754a6..00000000000 --- a/etc/c/zlib/osx.mak +++ /dev/null @@ -1,99 +0,0 @@ -# Makefile for zlib - -CC=gcc -LD=link -CFLAGS=-I. -O -g -DHAVE_UNISTD_H -DHAVE_STDARG_H -ifeq (64,$(MODEL)) - CFLAGS+=--target=x86_64-darwin-apple # ARM cpu is not supported by dmd -endif - -LDFLAGS= -O=.o - -.c.o: - "$(CC)" -c $(CFLAGS) $* - -.d.o: - "$(DMD)" -c $(DFLAGS) $* - -# variables -OBJS = adler32$(O) compress$(O) crc32$(O) deflate$(O) gzclose$(O) gzlib$(O) gzread$(O) \ - gzwrite$(O) infback$(O) inffast$(O) inflate$(O) inftrees$(O) trees$(O) uncompr$(O) zutil$(O) - -all: zlib.a example infcover minigzip - -adler32.o: zutil.h zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -zutil.o: zutil.h zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -gzclose.o: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -gzlib.o: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -gzread.o: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -gzwrite.o: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -compress.o: zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -uncompr.o: zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -crc32.o: zutil.h zlib.h zconf.h crc32.h - "$(CC)" -c $(CFLAGS) $*.c - -deflate.o: deflate.h zutil.h zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h - "$(CC)" -c $(CFLAGS) $*.c - -inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h - "$(CC)" -c $(CFLAGS) $*.c - -inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h - "$(CC)" -c $(CFLAGS) $*.c - -inftrees.o: zutil.h zlib.h zconf.h inftrees.h - "$(CC)" -c $(CFLAGS) $*.c - -trees.o: deflate.h zutil.h zlib.h zconf.h trees.h - "$(CC)" -c $(CFLAGS) $*.c - - -example.o: test/example.c zlib.h zconf.h - "$(CC)" -c $(cvarsdll) $(CFLAGS) test/$*.c - -infcover.o: test/infcover.c zlib.h zconf.h - "$(CC)" -c $(cvarsdll) $(CFLAGS) test/$*.c - -minigzip.o: test/minigzip.c zlib.h zconf.h - "$(CC)" -c $(cvarsdll) $(CFLAGS) test/$*.c - -zlib.a: $(OBJS) - ar -r $@ $(OBJS) - -example: example.o zlib.a - "$(CC)" $(LDFLAGS) -o $@ example.o zlib.a - -infcover: infcover.o zlib.a - "$(CC)" $(LDFLAGS) -o $@ infcover.o zlib.a - -minigzip: minigzip.o zlib.a - "$(CC)" $(LDFLAGS) -o $@ minigzip.o zlib.a - -test: example infcover minigzip - ./example - ./infcover - echo hello world | ./minigzip | ./minigzip -d - -clean: - $(RM) $(OBJS) zlib.a example.o example infcover.o infcover minigzip.o minigzip foo.gz - diff --git a/etc/c/zlib/win32.mak b/etc/c/zlib/win32.mak deleted file mode 100644 index 60dbe1c3dbf..00000000000 --- a/etc/c/zlib/win32.mak +++ /dev/null @@ -1,97 +0,0 @@ -# Makefile for zlib - -CC=dmc -LD=link -LIB=lib -CFLAGS=-I. -o -DNO_snprintf -LDFLAGS= -O=.obj - -# variables - -OBJS = adler32$(O) compress$(O) crc32$(O) deflate$(O) gzclose$(O) gzlib$(O) gzread$(O) \ - gzwrite$(O) infback$(O) inffast$(O) inflate$(O) inftrees$(O) trees$(O) uncompr$(O) zutil$(O) - - -all: zlib.lib example.exe infcover.exe minigzip.exe - -adler32.obj: zutil.h zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -zutil.obj: zutil.h zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -gzclose.obj: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -gzlib.obj: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -gzread.obj: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -gzwrite.obj: zlib.h zconf.h gzguts.h - "$(CC)" -c $(CFLAGS) $*.c - -compress.obj: zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -uncompr.obj: zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -crc32.obj: zutil.h zlib.h zconf.h crc32.h - "$(CC)" -c $(CFLAGS) $*.c - -deflate.obj: deflate.h zutil.h zlib.h zconf.h - "$(CC)" -c $(CFLAGS) $*.c - -infback.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h - "$(CC)" -c $(CFLAGS) $*.c - -inflate.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h - "$(CC)" -c $(CFLAGS) $*.c - -inffast.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h - "$(CC)" -c $(CFLAGS) $*.c - -inftrees.obj: zutil.h zlib.h zconf.h inftrees.h - "$(CC)" -c $(CFLAGS) $*.c - -trees.obj: deflate.h zutil.h zlib.h zconf.h trees.h - "$(CC)" -c $(CFLAGS) $*.c - - - -example.obj: test\example.c zlib.h zconf.h - "$(CC)" -c $(cvarsdll) $(CFLAGS) test\$*.c - -infcover.obj: test\infcover.c zlib.h zconf.h - "$(CC)" -c $(cvarsdll) $(CFLAGS) test\$*.c - -minigzip.obj: test\minigzip.c zlib.h zconf.h - "$(CC)" -c $(cvarsdll) $(CFLAGS) test\$*.c - -zlib.lib: $(OBJS) - "$(LIB)" -c zlib.lib $(OBJS) - -example.exe: example.obj zlib.lib - "$(LD)" $(LDFLAGS) example.obj zlib.lib - -infcover.exe: infcover.obj zlib.lib - "$(LD)" $(LDFLAGS) infcover.obj zlib.lib - -minigzip.exe: minigzip.obj zlib.lib - "$(LD)" $(LDFLAGS) minigzip.obj zlib.lib - -test: example.exe infcover.exe minigzip.exe - example - infcover - echo hello world | minigzip | minigzip -d - -clean: - del *.obj - del *.exe - del *.dll - del *.lib - del *.lst - del foo.gz diff --git a/etc/c/zlib/win64.mak b/etc/c/zlib/win64.mak deleted file mode 100644 index 4c19d3d0553..00000000000 --- a/etc/c/zlib/win64.mak +++ /dev/null @@ -1,104 +0,0 @@ -# Makefile for zlib64 - -MODEL=64 - -CC=cl -LD=link -AR=lib - -CFLAGS=/O2 /nologo -LIBFLAGS=/nologo -LDFLAGS=/nologo -O=.obj - -# do not preselect a C runtime (extracted from the line above to make the auto tester happy) -CFLAGS=$(CFLAGS) /Zl /GS- - -# variables - -OBJS = adler32$(O) compress$(O) crc32$(O) deflate$(O) gzclose$(O) gzlib$(O) gzread$(O) \ - gzwrite$(O) infback$(O) inffast$(O) inflate$(O) inftrees$(O) trees$(O) uncompr$(O) zutil$(O) - - -all: zlib$(MODEL).lib example.exe infcover.exe minigzip.exe - -adler32.obj: zutil.h zlib.h zconf.h - "$(CC)" /c $(CFLAGS) $*.c - -zutil.obj: zutil.h zlib.h zconf.h - "$(CC)" /c $(CFLAGS) $*.c - -gzclose.obj: zlib.h zconf.h gzguts.h - "$(CC)" /c $(CFLAGS) $*.c - -gzlib.obj: zlib.h zconf.h gzguts.h - "$(CC)" /c $(CFLAGS) $*.c - -gzread.obj: zlib.h zconf.h gzguts.h - "$(CC)" /c $(CFLAGS) $*.c - -gzwrite.obj: zlib.h zconf.h gzguts.h - "$(CC)" /c $(CFLAGS) $*.c - -compress.obj: zlib.h zconf.h - "$(CC)" /c $(CFLAGS) $*.c - -uncompr.obj: zlib.h zconf.h - "$(CC)" /c $(CFLAGS) $*.c - -crc32.obj: zutil.h zlib.h zconf.h crc32.h - "$(CC)" /c $(CFLAGS) $*.c - -deflate.obj: deflate.h zutil.h zlib.h zconf.h - "$(CC)" /c $(CFLAGS) $*.c - -infback.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h - "$(CC)" /c $(CFLAGS) $*.c - -inflate.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h - "$(CC)" /c $(CFLAGS) $*.c - -inffast.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h - "$(CC)" /c $(CFLAGS) $*.c - -inftrees.obj: zutil.h zlib.h zconf.h inftrees.h - "$(CC)" /c $(CFLAGS) $*.c - -trees.obj: deflate.h zutil.h zlib.h zconf.h trees.h - "$(CC)" /c $(CFLAGS) $*.c - - - -example.obj: test\example.c zlib.h zconf.h - "$(CC)" /c $(cvarsdll) $(CFLAGS) test\$*.c - -infcover.obj: test\infcover.c zlib.h zconf.h - "$(CC)" /c $(cvarsdll) $(CFLAGS) test\$*.c - -minigzip.obj: test\minigzip.c zlib.h zconf.h - "$(CC)" /c $(cvarsdll) $(CFLAGS) test\$*.c - -zlib$(MODEL).lib: $(OBJS) - "$(AR)" $(LIBFLAGS) /OUT:zlib$(MODEL).lib $(OBJS) - -example.exe: example.obj zlib$(MODEL).lib - "$(LD)" $(LDFLAGS) example.obj zlib$(MODEL).lib - -infcover.exe: infcover.obj zlib$(MODEL).lib - "$(LD)" $(LDFLAGS) infcover.obj zlib$(MODEL).lib - -minigzip.exe: minigzip.obj zlib$(MODEL).lib - "$(LD)" $(LDFLAGS) minigzip.obj zlib$(MODEL).lib - -test: example.exe infcover.exe minigzip.exe - example - infcover - echo hello world | minigzip | minigzip -d - -clean: - del *.obj - del *.exe - del *.dll - del *.lib - del *.lst - del foo.gz diff --git a/win32.mak b/win32.mak deleted file mode 100644 index b29fad7589e..00000000000 --- a/win32.mak +++ /dev/null @@ -1,574 +0,0 @@ -# Makefile to build D runtime library phobos.lib for Win32 OMF -# MS COFF builds use win64.mak for 32 and 64 bit -# -# Prerequisites: -# Digital Mars dmc, lib, and make that are unzipped from Digital Mars C: -# http://ftp.digitalmars.com/Digital_Mars_C++/Patch/dm850c.zip -# and are in the \dm\bin directory. -# Targets: -# make -# Same as make unittest -# make phobos.lib -# Build phobos.lib -# make clean -# Delete unneeded files created by build process -# make unittest -# Build phobos.lib, build and run unit tests -# make cov -# Build for coverage tests, run coverage tests -# Notes: -# minit.obj requires Microsoft MASM386.EXE to build from minit.asm, -# or just use the supplied minit.obj - -# Ignored, only the default value is supported -# MODEL=32omf - -## Copy command - -CP=cp - -## Directory where dmd has been installed - -DIR=\dmd2 - -## Flags for dmc C compiler - -CFLAGS=-mn -6 -r -#CFLAGS=-g -mn -6 -r - -## Location of druntime tree - -DRUNTIME=../dmd/druntime -DRUNTIMELIB=$(DRUNTIME)/lib/druntime.lib - -## Flags for dmd D compiler - -DFLAGS=-m32omf -conf= -O -release -w -de -preview=dip1000 -preview=dtorfields -preview=fieldwise -I$(DRUNTIME)\import -#DFLAGS=-unittest -g -#DFLAGS=-unittest -cov -g - -## Flags for compiling unittests - -UDFLAGS=-m32omf -unittest -version=StdUnittest -version=CoreUnittest -conf= -O -w -preview=dip1000 -preview=fieldwise -I$(DRUNTIME)\import - -## C compiler - -CC=dmc -AR=lib -MAKE=make - -## D compiler - -DMD_DIR=../dmd -BUILD=release -OS=windows -DMD=$(DMD_DIR)/generated/$(OS)/$(BUILD)/32/dmd - -## Zlib library - -ZLIB=etc\c\zlib\zlib.lib - -.c.obj: -# $(CC) -c $(CFLAGS) $* - $(DMD) -c $(DFLAGS) -I. -v $* - -.cpp.obj: - $(CC) -c $(CFLAGS) $* - -.d.obj: - $(DMD) -c $(DFLAGS) $* - -.asm.obj: - $(CC) -c $* - -LIB=phobos.lib - -targets : $(LIB) - -test : test.exe - -test.obj : test.d - $(DMD) -conf= -c test -g $(UDFLAGS) - -test.exe : test.obj $(LIB) - $(DMD) -conf= test.obj -g -L/map - -# ti_bit.obj ti_Abit.obj - -SRC= \ - unittest.d \ - index.dd - -# The separation is a workaround for bug 4904 (optlink bug 3372). -SRC_STD_1= \ - std\stdio.d \ - std\string.d \ - std\file.d - -SRC_STD_2a= \ - std\array.d \ - std\functional.d \ - std\path.d \ - std\outbuffer.d \ - std\utf.d - -SRC_STD_3= \ - std\csv.d \ - std\complex.d \ - std\numeric.d \ - std\bigint.d \ - std\bitmanip.d \ - std\typecons.d \ - std\base64.d \ - std\ascii.d \ - std\demangle.d \ - std\uri.d \ - std\mmfile.d \ - std\getopt.d - -SRC_STD_3a= \ - std\signals.d \ - std\meta.d \ - std\typetuple.d \ - std\traits.d \ - std\encoding.d \ - std\random.d \ - std\exception.d \ - std\compiler.d \ - std\system.d \ - std\concurrency.d - -SRC_STD_4= \ - std\int128.d \ - std\uuid.d - -SRC_STD_6= \ - std\variant.d \ - std\zlib.d \ - std\socket.d \ - std\conv.d \ - std\zip.d - -SRC_STD_7= \ - std\stdint.d \ - std\json.d \ - std\parallelism.d \ - std\mathspecial.d \ - std\process.d \ - std\package.d - -SRC_STD_7a= \ - std\sumtype.d - -SRC_STD= \ - $(SRC_STD_1) \ - $(SRC_STD_2a) \ - $(SRC_STD_3) \ - $(SRC_STD_3a) \ - $(SRC_STD_4) \ - $(SRC_STD_6) \ - $(SRC_STD_7) \ - $(SRC_STD_7a) - -SRC_STD_ALGO= \ - std\algorithm\package.d \ - std\algorithm\comparison.d \ - std\algorithm\iteration.d \ - std\algorithm\mutation.d \ - std\algorithm\searching.d \ - std\algorithm\setops.d \ - std\algorithm\sorting.d \ - std\algorithm\internal.d - -SRC_STD_CONTAINER= \ - std\container\array.d \ - std\container\binaryheap.d \ - std\container\dlist.d \ - std\container\rbtree.d \ - std\container\slist.d \ - std\container\util.d \ - std\container\package.d - -SRC_STD_DATETIME= \ - std\datetime\date.d \ - std\datetime\interval.d \ - std\datetime\package.d \ - std\datetime\stopwatch.d \ - std\datetime\systime.d \ - std\datetime\timezone.d - -SRC_STD_DIGEST= \ - std\digest\crc.d \ - std\digest\sha.d \ - std\digest\md.d \ - std\digest\ripemd.d \ - std\digest\hmac.d \ - std\digest\murmurhash.d \ - std\digest\package.d - -SRC_STD_FORMAT= \ - std\format\package.d \ - std\format\read.d \ - std\format\spec.d \ - std\format\write.d \ - std\format\internal\floats.d \ - std\format\internal\read.d \ - std\format\internal\write.d - -SRC_STD_MATH= \ - std\math\algebraic.d \ - std\math\constants.d \ - std\math\exponential.d \ - std\math\operations.d \ - std\math\hardware.d \ - std\math\package.d \ - std\math\remainder.d \ - std\math\rounding.d \ - std\math\traits.d \ - std\math\trigonometry.d - -SRC_STD_NET= \ - std\net\isemail.d \ - std\net\curl.d - -SRC_STD_RANGE= \ - std\range\package.d \ - std\range\primitives.d \ - std\range\interfaces.d - -SRC_STD_REGEX= \ - std\regex\internal\ir.d \ - std\regex\package.d \ - std\regex\internal\parser.d \ - std\regex\internal\tests.d \ - std\regex\internal\tests2.d \ - std\regex\internal\backtracking.d \ - std\regex\internal\thompson.d \ - std\regex\internal\kickstart.d \ - std\regex\internal\generator.d - -SRC_STD_WIN= \ - std\windows\registry.d \ - std\windows\syserror.d \ - std\windows\charset.d - -SRC_STD_INTERNAL= \ - std\internal\cstring.d \ - std\internal\memory.d \ - std\internal\unicode_tables.d \ - std\internal\unicode_comp.d \ - std\internal\unicode_decomp.d \ - std\internal\unicode_grapheme.d \ - std\internal\unicode_norm.d \ - std\internal\scopebuffer.d \ - std\internal\test\dummyrange.d \ - std\internal\test\range.d - -SRC_STD_INTERNAL_DIGEST= \ - std\internal\digest\sha_SSSE3.d - -SRC_STD_INTERNAL_MATH= \ - std\internal\math\biguintcore.d \ - std\internal\math\biguintnoasm.d \ - std\internal\math\biguintx86.d \ - std\internal\math\gammafunction.d \ - std\internal\math\errorfunction.d - -SRC_STD_INTERNAL_WINDOWS= \ - std\internal\windows\advapi32.d - -SRC_STD_EXP= \ - std\checkedint.d std\experimental\checkedint.d - -SRC_STD_UNI = std\uni\package.d \ - -SRC_STD_EXP_ALLOC_BB= \ - std\experimental\allocator\building_blocks\affix_allocator.d \ - std\experimental\allocator\building_blocks\aligned_block_list.d \ - std\experimental\allocator\building_blocks\allocator_list.d \ - std\experimental\allocator\building_blocks\ascending_page_allocator.d \ - std\experimental\allocator\building_blocks\bitmapped_block.d \ - std\experimental\allocator\building_blocks\bucketizer.d \ - std\experimental\allocator\building_blocks\fallback_allocator.d \ - std\experimental\allocator\building_blocks\free_list.d \ - std\experimental\allocator\building_blocks\free_tree.d \ - std\experimental\allocator\building_blocks\kernighan_ritchie.d \ - std\experimental\allocator\building_blocks\null_allocator.d \ - std\experimental\allocator\building_blocks\quantizer.d \ - std\experimental\allocator\building_blocks\region.d \ - std\experimental\allocator\building_blocks\scoped_allocator.d \ - std\experimental\allocator\building_blocks\segregator.d \ - std\experimental\allocator\building_blocks\stats_collector.d \ - std\experimental\allocator\building_blocks\package.d - -SRC_STD_EXP_ALLOC= \ - std\experimental\allocator\common.d \ - std\experimental\allocator\gc_allocator.d \ - std\experimental\allocator\mallocator.d \ - std\experimental\allocator\mmap_allocator.d \ - std\experimental\allocator\showcase.d \ - std\experimental\allocator\typed.d \ - std\experimental\allocator\package.d \ - $(SRC_STD_EXP_ALLOC_BB) - -SRC_STD_EXP_LOGGER= \ - std\experimental\logger\core.d \ - std\experimental\logger\filelogger.d \ - std\experimental\logger\multilogger.d \ - std\experimental\logger\nulllogger.d \ - std\experimental\logger\package.d - -SRC_STD_LOGGER= \ - std\logger\core.d \ - std\logger\filelogger.d \ - std\logger\multilogger.d \ - std\logger\nulllogger.d \ - std\logger\package.d - -SRC_ETC= - -SRC_ETC_C= \ - etc\c\zlib.d \ - etc\c\curl.d \ - etc\c\sqlite3.d \ - etc\c\odbc\sql.d \ - etc\c\odbc\sqlext.d \ - etc\c\odbc\sqltypes.d \ - etc\c\odbc\sqlucode.d - -SRC_TO_COMPILE= \ - $(SRC_STD) \ - $(SRC_STD_ALGO) \ - $(SRC_STD_CONTAINER) \ - $(SRC_STD_DATETIME) \ - $(SRC_STD_DIGEST) \ - $(SRC_STD_FORMAT) \ - $(SRC_STD_MATH) \ - $(SRC_STD_NET) \ - $(SRC_STD_RANGE) \ - $(SRC_STD_REGEX) \ - $(SRC_STD_C) \ - $(SRC_STD_WIN) \ - $(SRC_STD_C_WIN) \ - $(SRC_STD_INTERNAL) \ - $(SRC_STD_INTERNAL_DIGEST) \ - $(SRC_STD_INTERNAL_MATH) \ - $(SRC_STD_INTERNAL_WINDOWS) \ - $(SRC_STD_EXP) \ - $(SRC_STD_UNI) \ - $(SRC_STD_EXP_ALLOC) \ - $(SRC_STD_EXP_LOGGER) \ - $(SRC_STD_LOGGER) \ - $(SRC_ETC) \ - $(SRC_ETC_C) - -SRC_ZLIB= \ - etc\c\zlib\crc32.h \ - etc\c\zlib\deflate.h \ - etc\c\zlib\gzguts.h \ - etc\c\zlib\inffixed.h \ - etc\c\zlib\inffast.h \ - etc\c\zlib\inftrees.h \ - etc\c\zlib\inflate.h \ - etc\c\zlib\trees.h \ - etc\c\zlib\zconf.h \ - etc\c\zlib\zlib.h \ - etc\c\zlib\zutil.h \ - etc\c\zlib\adler32.c \ - etc\c\zlib\compress.c \ - etc\c\zlib\crc32.c \ - etc\c\zlib\deflate.c \ - etc\c\zlib\gzclose.c \ - etc\c\zlib\gzlib.c \ - etc\c\zlib\gzread.c \ - etc\c\zlib\gzwrite.c \ - etc\c\zlib\infback.c \ - etc\c\zlib\inffast.c \ - etc\c\zlib\inflate.c \ - etc\c\zlib\inftrees.c \ - etc\c\zlib\trees.c \ - etc\c\zlib\uncompr.c \ - etc\c\zlib\zutil.c - -$(LIB) : $(SRC_TO_COMPILE) \ - $(ZLIB) $(DRUNTIMELIB) win32.mak win64.mak - $(DMD) -lib -of$(LIB) -Xfphobos.json $(DFLAGS) $(SRC_TO_COMPILE) \ - $(ZLIB) $(DRUNTIMELIB) - -UNITTEST_OBJS= \ - unittest1.obj \ - unittest2.obj \ - unittest2a.obj \ - unittest3.obj \ - unittest3a.obj \ - unittest3b.obj \ - unittest4.obj \ - unittest5.obj \ - unittest5a.obj \ - unittest5b.obj \ - unittest6.obj \ - unittest6a.obj \ - unittest6b.obj \ - unittest7.obj \ - unittest7a.obj \ - unittest8a.obj \ - unittest8b.obj \ - unittest8c.obj \ - unittest8d.obj \ - unittest8e.obj \ - unittest8f.obj - -unittest : $(LIB) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest1.obj $(SRC_STD_1) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest2.obj $(SRC_STD_RANGE) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest2a.obj $(SRC_STD_2a) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest3.obj $(SRC_STD_3) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest3a.obj $(SRC_STD_3a) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest3b.obj $(SRC_STD_DATETIME) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest4.obj $(SRC_STD_4) $(SRC_STD_DIGEST) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest5.obj $(SRC_STD_ALGO) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest5a.obj $(SRC_STD_FORMAT) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest5b.obj $(SRC_STD_MATH) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest6.obj $(SRC_STD_6) $(SRC_STD_CONTAINER) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest6a.obj $(SRC_STD_EXP_ALLOC) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest6b.obj $(SRC_STD_LOGGER) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest7.obj $(SRC_STD_7) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest7a.obj $(SRC_STD_7a) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest8a.obj $(SRC_STD_REGEX) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest8b.obj $(SRC_STD_NET) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest8c.obj $(SRC_STD_C) $(SRC_STD_WIN) $(SRC_STD_C_WIN) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest8d.obj $(SRC_STD_INTERNAL) $(SRC_STD_INTERNAL_DIGEST) $(SRC_STD_INTERNAL_MATH) $(SRC_STD_INTERNAL_WINDOWS) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest8e.obj $(SRC_ETC) $(SRC_ETC_C) - $(DMD) $(UDFLAGS) -L/co -c -ofunittest8f.obj $(SRC_STD_EXP) - $(DMD) $(UDFLAGS) -L/co unittest.d $(UNITTEST_OBJS) \ - $(ZLIB) $(DRUNTIMELIB) - .\unittest.exe - -#unittest : unittest.exe -# unittest -# -#unittest.exe : unittest.d $(LIB) -# $(DMD) -conf= unittest -g -# dmc unittest.obj -g - -cov : $(SRC_TO_COMPILE) $(LIB) -# $(DMD) -conf= -cov=ctfe -cov $(UDFLAGS) -ofcov.exe -main $(SRC_TO_COMPILE) $(LIB) -# cov - del *.lst - $(DMD) -conf= -cov=ctfe -cov=83 $(UDFLAGS) -main -run std\stdio.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\string.d - $(DMD) -conf= -cov=ctfe -cov=83 $(UDFLAGS) -main -run std\file.d - $(DMD) -conf= -cov=ctfe -cov=86 $(UDFLAGS) -main -run std\range\package.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\array.d - $(DMD) -conf= -cov=ctfe -cov=100 $(UDFLAGS) -main -run std\functional.d - $(DMD) -conf= -cov=ctfe -cov=96 $(UDFLAGS) -main -run std\path.d - $(DMD) -conf= -cov=ctfe -cov=41 $(UDFLAGS) -main -run std\outbuffer.d - $(DMD) -conf= -cov=ctfe -cov=89 $(UDFLAGS) -main -run std\utf.d - $(DMD) -conf= -cov=ctfe -cov=93 $(UDFLAGS) -main -run std\csv.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\complex.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\int128.d - $(DMD) -conf= -cov=ctfe -cov=70 $(UDFLAGS) -main -run std\numeric.d - $(DMD) -conf= -cov=ctfe -cov=94 $(UDFLAGS) -main -run std\bigint.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\bitmanip.d - $(DMD) -conf= -cov=ctfe -cov=82 $(UDFLAGS) -main -run std\typecons.d - $(DMD) -conf= -cov=ctfe -cov=44 $(UDFLAGS) -main -run std\uni\package.d - $(DMD) -conf= -cov=ctfe -cov=91 $(UDFLAGS) -main -run std\base64.d - $(DMD) -conf= -cov=ctfe -cov=100 $(UDFLAGS) -main -run std\ascii.d - $(DMD) -conf= -cov=ctfe -cov=0 $(UDFLAGS) -main -run std\demangle.d - $(DMD) -conf= -cov=ctfe -cov=57 $(UDFLAGS) -main -run std\uri.d - $(DMD) -conf= -cov=ctfe -cov=51 $(UDFLAGS) -main -run std\mmfile.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\getopt.d - $(DMD) -conf= -cov=ctfe -cov=92 $(UDFLAGS) -main -run std\signals.d - $(DMD) -conf= -cov=ctfe -cov=100 $(UDFLAGS) -main -run std\meta.d - $(DMD) -conf= -cov=ctfe -cov=100 $(UDFLAGS) -main -run std\typetuple.d - $(DMD) -conf= -cov=ctfe -cov=85 $(UDFLAGS) -main -run std\traits.d - $(DMD) -conf= -cov=ctfe -cov=62 $(UDFLAGS) -main -run std\encoding.d - $(DMD) -conf= -cov=ctfe -cov=79 $(UDFLAGS) -main -run std\random.d - $(DMD) -conf= -cov=ctfe -cov=92 $(UDFLAGS) -main -run std\exception.d - $(DMD) -conf= -cov=ctfe -cov=73 $(UDFLAGS) -main -run std\concurrency.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\datetime\date.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\datetime\interval.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\datetime\package.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\datetime\stopwatch.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\datetime\systime.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\datetime\timezone.d - $(DMD) -conf= -cov=ctfe -cov=96 $(UDFLAGS) -main -run std\uuid.d - $(DMD) -conf= -cov=ctfe -cov=100 $(UDFLAGS) -main -run std\digest\crc.d - $(DMD) -conf= -cov=ctfe -cov=55 $(UDFLAGS) -main -run std\digest\sha.d - $(DMD) -conf= -cov=ctfe -cov=100 $(UDFLAGS) -main -run std\digest\md.d - $(DMD) -conf= -cov=ctfe -cov=100 $(UDFLAGS) -main -run std\digest\ripemd.d - $(DMD) -conf= -cov=ctfe -cov=100 $(UDFLAGS) -main -run std\digest\hmac.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\algorithm\package.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\algorithm\comparison.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\algorithm\iteration.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\algorithm\mutation.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\algorithm\searching.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\algorithm\setops.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\algorithm\sorting.d - $(DMD) -conf= -cov=ctfe -cov=71 $(UDFLAGS) -main -run std\format\package.d - $(DMD) -conf= -cov=ctfe -cov=71 $(UDFLAGS) -main -run std\math\package.d - $(DMD) -conf= -cov=ctfe -cov=83 $(UDFLAGS) -main -run std\variant.d - $(DMD) -conf= -cov=ctfe -cov=58 $(UDFLAGS) -main -run std\zlib.d - $(DMD) -conf= -cov=ctfe -cov=53 $(UDFLAGS) -main -run std\socket.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\container\array.d - $(DMD) -conf= -cov=ctfe -cov=68 $(UDFLAGS) -main -run std\container\binaryheap.d - $(DMD) -conf= -cov=ctfe -cov=91 $(UDFLAGS) -main -run std\container\dlist.d - $(DMD) -conf= -cov=ctfe -cov=93 $(UDFLAGS) -main -run std\container\rbtree.d - $(DMD) -conf= -cov=ctfe -cov=92 $(UDFLAGS) -main -run std\container\slist.d - $(DMD) -conf= -cov=ctfe -cov=100 $(UDFLAGS) -main -run std\container\util.d - $(DMD) -conf= -cov=ctfe -cov=100 $(UDFLAGS) -main -run std\container\package.d - $(DMD) -conf= -cov=ctfe -cov=90 $(UDFLAGS) -main -run std\conv.d - $(DMD) -conf= -cov=ctfe -cov=0 $(UDFLAGS) -main -run std\zip.d - $(DMD) -conf= -cov=ctfe -cov=77 $(UDFLAGS) -main -run std\regex\tests.d - $(DMD) -conf= -cov=ctfe -cov=77 $(UDFLAGS) -main -run std\regex\tests2.d - $(DMD) -conf= -cov=ctfe -cov=92 $(UDFLAGS) -main -run std\json.d - $(DMD) -conf= -cov=ctfe -cov=87 $(UDFLAGS) -main -run std\parallelism.d - $(DMD) -conf= -cov=ctfe -cov=50 $(UDFLAGS) -main -run std\mathspecial.d - $(DMD) -conf= -cov=ctfe -cov=71 $(UDFLAGS) -main -run std\process.d - $(DMD) -conf= -cov=ctfe -cov=70 $(UDFLAGS) -main -run std\net\isemail.d - $(DMD) -conf= -cov=ctfe -cov=2 $(UDFLAGS) -main -run std\net\curl.d - $(DMD) -conf= -cov=ctfe -cov=60 $(UDFLAGS) -main -run std\windows\registry.d - $(DMD) -conf= -cov=ctfe -cov=0 $(UDFLAGS) -main -run std\internal\digest\sha_SSSE3.d - $(DMD) -conf= -cov=ctfe -cov=50 $(UDFLAGS) -main -run std\internal\math\biguintcore.d - $(DMD) -conf= -cov=ctfe -cov=75 $(UDFLAGS) -main -run std\internal\math\biguintnoasm.d -# $(DMD) -conf= -cov=ctfe -cov $(UDFLAGS) -main -run std\internal\math\biguintx86.d - $(DMD) -conf= -cov=ctfe -cov=94 $(UDFLAGS) -main -run std\internal\math\gammafunction.d - $(DMD) -conf= -cov=ctfe -cov=92 $(UDFLAGS) -main -run std\internal\math\errorfunction.d - $(DMD) -conf= -cov=ctfe -cov=31 $(UDFLAGS) -main -run std\internal\windows\advapi32.d - $(DMD) -conf= -cov=ctfe -cov=58 $(UDFLAGS) -main -run etc\c\zlib.d - $(DMD) -conf= -cov=ctfe -cov=95 $(UDFLAGS) -main -run std\sumtype.d - -###################################################### - -$(ZLIB): $(SRC_ZLIB) - cd etc\c\zlib - $(MAKE) -f win32.mak zlib.lib CC=$(CC) LIB=$(AR) - cd ..\..\.. - -###################################################### - -zip: - del phobos.zip - zip32 -r phobos.zip . -x .git\* -x \*.lib -x \*.obj - -phobos.zip : zip - -clean: - cd etc\c\zlib - $(MAKE) -f win32.mak clean - cd ..\..\.. - del $(DOCS) - del $(UNITTEST_OBJS) unittest.obj unittest.exe - del $(LIB) - del phobos.json - -install: phobos.zip - $(CP) phobos.lib phobos64.lib $(DIR)\windows\lib - +rd/s/q $(DIR)\src\phobos - unzip -o phobos.zip -d $(DIR)\src\phobos - -auto-tester-build: - echo "Auto-Tester has been disabled" - -auto-tester-test: - echo "Auto-Tester has been disabled" diff --git a/win64.mak b/win64.mak deleted file mode 100644 index f094ab12170..00000000000 --- a/win64.mak +++ /dev/null @@ -1,516 +0,0 @@ -# Makefile to build D runtime library phobos{64,32mscoff}.lib for Windows MSVC -# Prerequisites: -# Microsoft Visual Studio -# Targets: -# make -# Same as make unittest -# make phobos64.lib -# Build phobos64.lib -# make clean -# Delete unneeded files created by build process -# make unittest -# Build phobos64.lib, build and run unit tests -# make cov -# Build for coverage tests, run coverage tests -# make MODEL=32mscoff phobos32mscoff.lib -# Build phobos32mscoff.lib (with x86 cl.exe in PATH, otherwise set CC & AR manually) - -## Memory model (32mscoff or 64) -MODEL=64 - -## Assume MSVC cl.exe & lib.exe in PATH are set up for the target MODEL. -## Otherwise set them explicitly, e.g., to `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x86\cl.exe`. -CC=cl -AR=lib - -MAKE=make - -## Directory where dmd has been installed - -DIR=\dmd2 - -## Flags for VC compiler - -CFLAGS=/O2 /nologo - -## Location of druntime tree - -DRUNTIME=../dmd/druntime -DRUNTIMELIB=$(DRUNTIME)/lib/druntime$(MODEL).lib - -## Flags for dmd D compiler - -DFLAGS=-conf= -m$(MODEL) -O -release -w -de -preview=dip1000 -preview=dtorfields -preview=fieldwise -I$(DRUNTIME)\import - -## Flags for compiling unittests - -UDFLAGS=-conf= -g -m$(MODEL) -O -w -preview=dip1000 -preview=fieldwise -I$(DRUNTIME)\import -unittest -version=StdUnittest -version=CoreUnittest - -## D compiler - -DMD_DIR=../dmd -BUILD=release -OS=windows -DMD=$(DMD_DIR)/generated/$(OS)/$(BUILD)/$(MODEL)/dmd - -## Zlib library - -ZLIB=etc\c\zlib\zlib$(MODEL).lib - -.c.obj: -# "$(CC)" -c $(CFLAGS) $*.c - $(DMD) -c $(DFLAGS) -I. -v $*.c - -.cpp.obj: - "$(CC)" -c $(CFLAGS) $*.cpp - -.d.obj: - "$(DMD)" -c $(DFLAGS) $* - -.asm.obj: - "$(CC)" -c $* - -LIB=phobos$(MODEL).lib - -targets : $(LIB) - -test : test.exe - -test.obj : test.d - "$(DMD)" -conf= -c -m$(MODEL) test -g $(UDFLAGS) - -test.exe : test.obj $(LIB) - "$(DMD)" -conf= test.obj -m$(MODEL) -g -L/map - -# ti_bit.obj ti_Abit.obj - -SRC= \ - unittest.d \ - index.dd - -# The separation is a workaround for bug 4904 (optlink bug 3372). -SRC_STD_1= \ - std\stdio.d \ - std\string.d \ - std\file.d - -SRC_STD_2a= \ - std\array.d \ - std\functional.d \ - std\path.d \ - std\outbuffer.d \ - std\utf.d - -SRC_STD_3= \ - std\csv.d \ - std\complex.d \ - std\numeric.d \ - std\bigint.d - -SRC_STD_3b= \ - std\base64.d \ - std\ascii.d \ - std\demangle.d \ - std\uri.d \ - std\mmfile.d \ - std\getopt.d - -SRC_STD_3c= \ - std\signals.d \ - std\meta.d \ - std\typetuple.d \ - std\traits.d \ - std\encoding.d \ - std\random.d \ - std\exception.d \ - std\compiler.d \ - std\system.d \ - std\concurrency.d - -SRC_STD_3d= \ - std\bitmanip.d \ - std\typecons.d - -SRC_STD_4= \ - std\int128.d \ - std\uuid.d - -SRC_STD_6a=std\variant.d -SRC_STD_6c=std\zlib.d -SRC_STD_6e=std\socket.d -SRC_STD_6h=std\conv.d -SRC_STD_6i=std\zip.d - -SRC_STD_7= \ - std\stdint.d \ - std\json.d \ - std\parallelism.d \ - std\mathspecial.d \ - std\process.d \ - std\package.d - -SRC_STD_7a= \ - std\sumtype.d - -SRC_STD= \ - $(SRC_STD_1) \ - $(SRC_STD_2a) \ - $(SRC_STD_3) \ - $(SRC_STD_3a) \ - $(SRC_STD_3b) \ - $(SRC_STD_3c) \ - $(SRC_STD_3d) \ - $(SRC_STD_4) \ - $(SRC_STD_6a) \ - $(SRC_STD_6c) \ - $(SRC_STD_6e) \ - $(SRC_STD_6h) \ - $(SRC_STD_6i) \ - $(SRC_STD_7) \ - $(SRC_STD_7a) - -SRC_STD_ALGO_1= \ - std\algorithm\package.d \ - std\algorithm\comparison.d \ - std\algorithm\iteration.d \ - std\algorithm\mutation.d - -SRC_STD_ALGO_2= \ - std\algorithm\searching.d \ - std\algorithm\setops.d - -SRC_STD_ALGO_3= \ - std\algorithm\sorting.d \ - std\algorithm\internal.d - -SRC_STD_ALGO= \ - $(SRC_STD_ALGO_1) \ - $(SRC_STD_ALGO_2) \ - $(SRC_STD_ALGO_3) - -SRC_STD_FORMAT= \ - std\format\package.d \ - std\format\read.d \ - std\format\spec.d \ - std\format\write.d \ - std\format\internal\floats.d \ - std\format\internal\read.d \ - std\format\internal\write.d - -SRC_STD_MATH = \ - std\math\algebraic.d \ - std\math\constants.d \ - std\math\exponential.d \ - std\math\operations.d \ - std\math\hardware.d \ - std\math\package.d \ - std\math\remainder.d \ - std\math\rounding.d \ - std\math\traits.d \ - std\math\trigonometry.d - -SRC_STD_CONTAINER= \ - std\container\array.d \ - std\container\binaryheap.d \ - std\container\dlist.d \ - std\container\rbtree.d \ - std\container\slist.d \ - std\container\util.d \ - std\container\package.d - -SRC_STD_DATETIME= \ - std\datetime\date.d \ - std\datetime\interval.d \ - std\datetime\package.d \ - std\datetime\stopwatch.d \ - std\datetime\systime.d \ - std\datetime\timezone.d - -SRC_STD_DIGEST= \ - std\digest\crc.d \ - std\digest\sha.d \ - std\digest\md.d \ - std\digest\ripemd.d \ - std\digest\hmac.d \ - std\digest\murmurhash.d \ - std\digest\package.d - -SRC_STD_NET= \ - std\net\isemail.d \ - std\net\curl.d - -SRC_STD_RANGE= \ - std\range\package.d \ - std\range\primitives.d \ - std\range\interfaces.d - -SRC_STD_REGEX= \ - std\regex\internal\ir.d \ - std\regex\package.d \ - std\regex\internal\parser.d \ - std\regex\internal\tests.d \ - std\regex\internal\tests2.d \ - std\regex\internal\backtracking.d \ - std\regex\internal\thompson.d \ - std\regex\internal\kickstart.d \ - std\regex\internal\generator.d - -SRC_STD_WIN= \ - std\windows\registry.d \ - std\windows\syserror.d \ - std\windows\charset.d - -SRC_STD_INTERNAL= \ - std\internal\cstring.d \ - std\internal\memory.d \ - std\internal\unicode_tables.d \ - std\internal\unicode_comp.d \ - std\internal\unicode_decomp.d \ - std\internal\unicode_grapheme.d \ - std\internal\unicode_norm.d \ - std\internal\scopebuffer.d \ - std\internal\test\dummyrange.d \ - std\internal\test\range.d - -SRC_STD_INTERNAL_DIGEST= \ - std\internal\digest\sha_SSSE3.d - -SRC_STD_INTERNAL_MATH= \ - std\internal\math\biguintcore.d \ - std\internal\math\biguintnoasm.d \ - std\internal\math\biguintx86.d \ - std\internal\math\gammafunction.d \ - std\internal\math\errorfunction.d - -SRC_STD_INTERNAL_WINDOWS= \ - std\internal\windows\advapi32.d - -SRC_STD_EXP= \ - std\checkedint.d std\experimental\checkedint.d - -SRC_STD_UNI = std\uni\package.d - -SRC_STD_EXP_ALLOC_BB= \ - std\experimental\allocator\building_blocks\affix_allocator.d \ - std\experimental\allocator\building_blocks\aligned_block_list.d \ - std\experimental\allocator\building_blocks\allocator_list.d \ - std\experimental\allocator\building_blocks\ascending_page_allocator.d \ - std\experimental\allocator\building_blocks\bitmapped_block.d \ - std\experimental\allocator\building_blocks\bucketizer.d \ - std\experimental\allocator\building_blocks\fallback_allocator.d \ - std\experimental\allocator\building_blocks\free_list.d \ - std\experimental\allocator\building_blocks\free_tree.d \ - std\experimental\allocator\building_blocks\kernighan_ritchie.d \ - std\experimental\allocator\building_blocks\null_allocator.d \ - std\experimental\allocator\building_blocks\quantizer.d \ - std\experimental\allocator\building_blocks\region.d \ - std\experimental\allocator\building_blocks\scoped_allocator.d \ - std\experimental\allocator\building_blocks\segregator.d \ - std\experimental\allocator\building_blocks\stats_collector.d \ - std\experimental\allocator\building_blocks\package.d - -SRC_STD_EXP_ALLOC= \ - std\experimental\allocator\common.d \ - std\experimental\allocator\gc_allocator.d \ - std\experimental\allocator\mallocator.d \ - std\experimental\allocator\mmap_allocator.d \ - std\experimental\allocator\showcase.d \ - std\experimental\allocator\typed.d \ - std\experimental\allocator\package.d \ - $(SRC_STD_EXP_ALLOC_BB) - -SRC_STD_EXP_LOGGER= \ - std\experimental\logger\core.d \ - std\experimental\logger\filelogger.d \ - std\experimental\logger\multilogger.d \ - std\experimental\logger\nulllogger.d \ - std\experimental\logger\package.d - -SRC_STD_LOGGER= \ - std\logger\core.d \ - std\logger\filelogger.d \ - std\logger\multilogger.d \ - std\logger\nulllogger.d \ - std\logger\package.d - -SRC_ETC= - -SRC_ETC_C= \ - etc\c\zlib.d \ - etc\c\curl.d \ - etc\c\sqlite3.d \ - etc\c\odbc\sql.d \ - etc\c\odbc\sqlext.d \ - etc\c\odbc\sqltypes.d \ - etc\c\odbc\sqlucode.d - -SRC_TO_COMPILE= \ - $(SRC_STD) \ - $(SRC_STD_ALGO) \ - $(SRC_STD_CONTAINER) \ - $(SRC_STD_DATETIME) \ - $(SRC_STD_DIGEST) \ - $(SRC_STD_FORMAT) \ - $(SRC_STD_MATH) \ - $(SRC_STD_NET) \ - $(SRC_STD_RANGE) \ - $(SRC_STD_REGEX) \ - $(SRC_STD_C) \ - $(SRC_STD_WIN) \ - $(SRC_STD_C_WIN) \ - $(SRC_STD_INTERNAL) \ - $(SRC_STD_INTERNAL_DIGEST) \ - $(SRC_STD_INTERNAL_MATH) \ - $(SRC_STD_INTERNAL_WINDOWS) \ - $(SRC_STD_UNI) \ - $(SRC_STD_EXP) \ - $(SRC_STD_EXP_ALLOC) \ - $(SRC_STD_EXP_LOGGER) \ - $(SRC_STD_LOGGER) \ - $(SRC_ETC) \ - $(SRC_ETC_C) - -SRC_ZLIB= \ - etc\c\zlib\crc32.h \ - etc\c\zlib\deflate.h \ - etc\c\zlib\gzguts.h \ - etc\c\zlib\inffixed.h \ - etc\c\zlib\inffast.h \ - etc\c\zlib\inftrees.h \ - etc\c\zlib\inflate.h \ - etc\c\zlib\trees.h \ - etc\c\zlib\zconf.h \ - etc\c\zlib\zlib.h \ - etc\c\zlib\zutil.h \ - etc\c\zlib\adler32.c \ - etc\c\zlib\compress.c \ - etc\c\zlib\crc32.c \ - etc\c\zlib\deflate.c \ - etc\c\zlib\gzclose.c \ - etc\c\zlib\gzlib.c \ - etc\c\zlib\gzread.c \ - etc\c\zlib\gzwrite.c \ - etc\c\zlib\infback.c \ - etc\c\zlib\inffast.c \ - etc\c\zlib\inflate.c \ - etc\c\zlib\inftrees.c \ - etc\c\zlib\trees.c \ - etc\c\zlib\uncompr.c \ - etc\c\zlib\zutil.c - -$(LIB) : $(SRC_TO_COMPILE) \ - $(ZLIB) $(DRUNTIMELIB) win32.mak win64.mak - "$(DMD)" -lib -of$(LIB) -Xfphobos.json $(DFLAGS) $(SRC_TO_COMPILE) \ - $(ZLIB) $(DRUNTIMELIB) - -UNITTEST_OBJS= \ - unittest1.obj \ - unittest2.obj \ - unittest2a.obj \ - unittest3.obj \ - unittest3b.obj \ - unittest3c.obj \ - unittest3d.obj \ - unittest4.obj \ - unittest5a.obj \ - unittest5b.obj \ - unittest5c.obj \ - unittest5d.obj \ - unittest5e.obj \ - unittest6a.obj \ - unittest6c.obj \ - unittest6e.obj \ - unittest6g.obj \ - unittest6h.obj \ - unittest6i.obj \ - unittest7.obj \ - unittest7a.obj \ - unittest8a.obj \ - unittest8b.obj \ - unittest8c.obj \ - unittest8d.obj \ - unittest8e.obj \ - unittest8f.obj \ - unittest9.obj - -unittest : $(LIB) - "$(DMD)" $(UDFLAGS) -c -ofunittest1.obj $(SRC_STD_1) - "$(DMD)" $(UDFLAGS) -c -ofunittest2.obj $(SRC_STD_RANGE) - "$(DMD)" $(UDFLAGS) -c -ofunittest2a.obj $(SRC_STD_2a) - "$(DMD)" $(UDFLAGS) -c -ofunittest3.obj $(SRC_STD_3) - "$(DMD)" $(UDFLAGS) -c -ofunittest3b.obj $(SRC_STD_3b) - "$(DMD)" $(UDFLAGS) -c -ofunittest3c.obj $(SRC_STD_3c) - "$(DMD)" $(UDFLAGS) -c -ofunittest3d.obj $(SRC_STD_3d) $(SRC_STD_DATETIME) - "$(DMD)" $(UDFLAGS) -c -ofunittest4.obj $(SRC_STD_4) $(SRC_STD_DIGEST) - "$(DMD)" $(UDFLAGS) -c -ofunittest5a.obj $(SRC_STD_ALGO_1) - "$(DMD)" $(UDFLAGS) -c -ofunittest5b.obj $(SRC_STD_ALGO_2) - "$(DMD)" $(UDFLAGS) -c -ofunittest5c.obj $(SRC_STD_ALGO_3) - "$(DMD)" $(UDFLAGS) -c -ofunittest5d.obj $(SRC_STD_FORMAT) - "$(DMD)" $(UDFLAGS) -c -ofunittest5e.obj $(SRC_STD_MATH) - "$(DMD)" $(UDFLAGS) -c -ofunittest6a.obj $(SRC_STD_6a) - "$(DMD)" $(UDFLAGS) -c -ofunittest6c.obj $(SRC_STD_6c) - "$(DMD)" $(UDFLAGS) -c -ofunittest6e.obj $(SRC_STD_6e) - "$(DMD)" $(UDFLAGS) -c -ofunittest6g.obj $(SRC_STD_CONTAINER) - "$(DMD)" $(UDFLAGS) -c -ofunittest6h.obj $(SRC_STD_6h) - "$(DMD)" $(UDFLAGS) -c -ofunittest6i.obj $(SRC_STD_6i) - "$(DMD)" $(UDFLAGS) -c -ofunittest7.obj $(SRC_STD_7) $(SRC_STD_LOGGER) - "$(DMD)" $(UDFLAGS) -c -ofunittest7a.obj $(SRC_STD_7a) - "$(DMD)" $(UDFLAGS) -c -ofunittest8a.obj $(SRC_STD_REGEX) - "$(DMD)" $(UDFLAGS) -c -ofunittest8b.obj $(SRC_STD_NET) - "$(DMD)" $(UDFLAGS) -c -ofunittest8c.obj $(SRC_STD_C) $(SRC_STD_WIN) $(SRC_STD_C_WIN) - "$(DMD)" $(UDFLAGS) -c -ofunittest8d.obj $(SRC_STD_INTERNAL) $(SRC_STD_INTERNAL_DIGEST) $(SRC_STD_INTERNAL_MATH) $(SRC_STD_INTERNAL_WINDOWS) - "$(DMD)" $(UDFLAGS) -c -ofunittest8e.obj $(SRC_ETC) $(SRC_ETC_C) - "$(DMD)" $(UDFLAGS) -c -ofunittest8f.obj $(SRC_STD_EXP) - "$(DMD)" $(UDFLAGS) -c -ofunittest9.obj $(SRC_STD_EXP_ALLOC) - "$(DMD)" $(UDFLAGS) unittest.d $(UNITTEST_OBJS) \ - $(ZLIB) $(DRUNTIMELIB) - .\unittest.exe - -#unittest : unittest.exe -# unittest -# -#unittest.exe : unittest.d $(LIB) -# $(DMD) -conf= unittest -g -# dmc unittest.obj -g - -cov : $(SRC_TO_COMPILE) $(LIB) - "$(DMD)" -conf= -m$(MODEL) -cov $(UDFLAGS) -ofcov.exe unittest.d $(SRC_TO_COMPILE) $(LIB) - cov - -###################################################### - -$(ZLIB): $(SRC_ZLIB) - cd etc\c\zlib - "$(MAKE)" -f win64.mak MODEL=$(MODEL) "CC=$(CC)" "AR=$(AR)" zlib$(MODEL).lib - cd ..\..\.. - -###################################################### - -zip: - del phobos.zip - zip32 -r phobos.zip . -x .git\* -x \*.lib -x \*.obj - -phobos.zip : zip - -clean: - cd etc\c\zlib - "$(MAKE)" -f win64.mak MODEL=$(MODEL) clean - cd ..\..\.. - del $(DOCS) - del $(UNITTEST_OBJS) unittest.obj unittest.exe - del $(LIB) - del phobos.json - -install: phobos.zip $(LIB) - copy /y /b $(LIB) $(DIR)\windows\lib - +rd/s/q $(DIR)\src\phobos - unzip -o phobos.zip -d $(DIR)\src\phobos - -auto-tester-build: - echo "Auto-Tester has been disabled" - -JOBS=$(NUMBER_OF_PROCESSORS) -GMAKE=gmake - -auto-tester-test: - echo "Auto-Tester has been disabled" From c444d08fa1646f5c5aad02b3b8b51c632aee991c Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sat, 16 Dec 2023 19:43:55 +0100 Subject: [PATCH 2/3] Restore posix.mak, forwarding to generic Makefile --- posix.mak | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 posix.mak diff --git a/posix.mak b/posix.mak new file mode 100644 index 00000000000..bc94e485f0e --- /dev/null +++ b/posix.mak @@ -0,0 +1,11 @@ +$(warning ===== DEPRECATION NOTICE ===== ) +$(warning ===== DEPRECATION: posix.mak is deprecated. Please use generic Makefile instead.) +$(warning ============================== ) + +# forward everything to Makefile + +all: + $(MAKE) -f Makefile $@ + +%: + $(MAKE) -f Makefile $@ From 5b9a497a670d6ae5d2786f0c30d1914e3292bb02 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sat, 16 Dec 2023 19:44:16 +0100 Subject: [PATCH 3/3] Add changelog entry --- changelog/makefiles.dd | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/makefiles.dd diff --git a/changelog/makefiles.dd b/changelog/makefiles.dd new file mode 100644 index 00000000000..6fb38d7f4e1 --- /dev/null +++ b/changelog/makefiles.dd @@ -0,0 +1,5 @@ +Makefiles cleanup + +The `{posix,win32,win64}.mak` Makefiles have been merged to a generic `Makefile`. `posix.mak` is kept as a deprecated forwarder for now. + +On Windows, you can/need to use the generic Makefile too - with a GNU make (and a git installation providing bash and GNU tools). Windows devs can finally exploit parallelism via `-j`! You may download a prebuilt zipped .exe from https://github.com/dlang/dmd/releases/download/nightly/gnumake-4.4-win64.zip.