Created
June 24, 2011 17:02
-
-
Save 9rnsr/1045205 to your computer and use it in GitHub Desktop.
D programming language build makefile in Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# reqire DigitalMars make, and cp command in MSYS. | |
######## MAKE PARAMETERS ######## | |
#DMCDIR=c:\dm | |
#DMDDIR=c:\dmd2 | |
## INTERNAL VARIABLES ## | |
DMC=$(DMCDIR)\bin\dmc.exe | |
DMD=$(DMDDIR)\windows\bin\dmd.exe | |
MAKEFILE=win32.mak | |
######## RULES ######## | |
all: build-dmd build-lib | |
full: clean-dmd build-dmd clean-lib build-lib | |
clean: clean-dmd clean-lib | |
#install: install-dmd install-lib | |
######## SUB-RULES ######## | |
## dmd ## | |
dmd: build-dmd | |
fulldmd: clean-dmd build-dmd | |
clean-dmd: | |
cd dmd\src | |
make clean -f $(MAKEFILE) | |
cd ..\.. | |
build-dmd: | |
cd dmd\src | |
make dmd SCROOT=$(DMCDIR) -f $(MAKEFILE) | |
copy dmd.exe $(DMDDIR)\windows\bin\ | |
cd ..\.. | |
## lib = druntime + phobos ## | |
lib: build-lib | |
fulllib: clean-lib build-lib | |
clean-lib: clean-druntime clean-phobos | |
build-lib: build-druntime build-phobos | |
clean-druntime: | |
cd druntime | |
make clean -f $(MAKEFILE) | |
cd .. | |
clean-phobos: | |
cd phobos | |
make clean -f $(MAKEFILE) | |
cd .. | |
build-druntime: | |
cd druntime | |
make CC=$(DMC) DMD=$(DMD) -f $(MAKEFILE) | |
copy lib\gcstub.obj $(DMDDIR)\windows\lib | |
cd .. | |
build-phobos: | |
cd phobos | |
make CC=$(DMC) DMD=$(DMD) -f $(MAKEFILE) | |
copy phobos.lib $(DMDDIR)\windows\lib\ | |
cd .. | |
## document ## | |
gendoc: | |
cd phobos | |
make html DOC=..\html\d\phobos DMD=$(DMD) -f $(MAKEFILE) | |
cd .. | |
## test ## | |
test: libtest dmdtest | |
dmdtest: | |
cd dmd\test | |
c:\cygwin\bin\make | |
cd ..\.. | |
libtest: druntimetest phobostest | |
druntimetest: | |
cd druntime | |
#make unittest -f win32.mak | |
cd .. | |
phobostest: | |
cd phobos | |
make unittest -f win32.mak | |
cd .. | |
######## UNUSED ######## | |
checkout: checkout-dmd checkout-druntime checkout-phobos checkout-docsrc | |
checkout-dmd: | |
git clone git://github.com/D-Programming-Language/dmd.git dmd | |
checkout-druntime: | |
git clone git://github.com/D-Programming-Language/druntime.git druntime | |
checkout-phobos: | |
git clone git://github.com/D-Programming-Language/phobos.git phobos | |
checkout-docsrc: | |
git clone git://github.com/D-Programming-Language/d-programming-language.org.git docsrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment