X-Git-Url: https://git.llucax.com/software/druntime.git/blobdiff_plain/4926e6ef8c37680c8e5ce47d9cddd03819ae84af..b4e307abd5e0e6f29d5726ac65878db14c4f07ae:/src/common/posix.mak diff --git a/src/common/posix.mak b/src/common/posix.mak index c2e8e8a..22bb3a9 100644 --- a/src/common/posix.mak +++ b/src/common/posix.mak @@ -10,8 +10,10 @@ # make clean # Delete unneeded files created by build process -LIB_TARGET=libdruntime-core.a -LIB_MASK=libdruntime-core*.a +LIB_BASE=libdruntime-core +LIB_BUILD= +LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).a +LIB_MASK=$(LIB_BASE)*.a CP=cp -f RM=rm -f @@ -20,16 +22,19 @@ MD=mkdir -p ADD_CFLAGS= ADD_DFLAGS= -CFLAGS=-O $(ADD_CFLAGS) -#CFLAGS=-g $(ADD_CFLAGS) +CFLAGS_RELEASE=-O $(ADD_CFLAGS) +CFLAGS_DEBUG=-g $(ADD_CFLAGS) +CFLAGS=$(CFLAGS_RELEASE) -DFLAGS=-release -O -inline -w -nofloat -version=Posix $(ADD_DFLAGS) -#DFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS) +DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS) +DFLAGS_DEBUG=-g -w -nofloat $(ADD_DFLAGS) +DFLAGS=$(DFLAGS_RELEASE) -TFLAGS=-O -inline -w -nofloat -version=Posix $(ADD_DFLAGS) -#TFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS) +TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS) +TFLAGS_DEBUG=-g -w -nofloat $(ADD_DFLAGS) +TFLAGS=$(TFLAGS_RELEASE) -DOCFLAGS=-version=DDoc -version=Posix +DOCFLAGS=-version=DDoc CC=gcc LC=$(AR) -qsv @@ -71,12 +76,12 @@ doc : core.doc OBJ_CORE= \ core/bitmanip.o \ core/exception.o \ - core/memory.o \ + core/memory_.o \ core/runtime.o \ core/thread.o OBJ_STDC= \ - stdc/errno.o + core/stdc/errno.o ALL_OBJS= \ $(OBJ_CORE) \ @@ -91,11 +96,23 @@ DOC_CORE= \ core/runtime.html \ core/thread.html +###################################################### ALL_DOCS= ###################################################### +unittest : + make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest" + +release : + make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)" + +debug : + make -fposix.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)" + +###################################################### + core.lib : $(LIB_TARGET) $(LIB_TARGET) : $(ALL_OBJS) @@ -110,12 +127,17 @@ core.doc : $(ALL_DOCS) ### bitmanip core/bitmanip.o : core/bitmanip.d - $(DC) -c $(DFLAGS) bitmanip.d -of$@ + $(DC) -c $(DFLAGS) core/bitmanip.d -of$@ + +### memory + +core/memory_.o : core/memory.d + $(DC) -c $(DFLAGS) -Hf$*.di $< -of$@ ### thread core/thread.o : core/thread.d - $(DC) -c $(DFLAGS) -d -Hf$*.di thread.d -of$@ + $(DC) -c $(DFLAGS) -d -Hf$*.di core/thread.d -of$@ ######################################################