# make clean\r
# Delete unneeded files created by build process\r
\r
-LIB_TARGET=libdruntime-core.a\r
-LIB_MASK=libdruntime-core*.a\r
+LIB_BASE=libdruntime-core\r
+LIB_BUILD=\r
+LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).a\r
+LIB_MASK=$(LIB_BASE)*.a\r
\r
CP=cp -f\r
RM=rm -f\r
ADD_CFLAGS=\r
ADD_DFLAGS=\r
\r
-CFLAGS=-O $(ADD_CFLAGS)\r
-#CFLAGS=-g $(ADD_CFLAGS)\r
+CFLAGS_RELEASE=-O $(ADD_CFLAGS)\r
+CFLAGS_DEBUG=-g $(ADD_CFLAGS)\r
+CFLAGS=$(CFLAGS_RELEASE)\r
\r
-DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS)\r
-#DFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
+DFLAGS_RELEASE=-release -O -inline -w -nofloat $(ADD_DFLAGS)\r
+DFLAGS_DEBUG=-g -w -nofloat $(ADD_DFLAGS)\r
+DFLAGS=$(DFLAGS_RELEASE)\r
\r
-TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS)\r
-#TFLAGS=-g -w -nofloat $(ADD_DFLAGS)\r
+TFLAGS_RELEASE=-O -inline -w -nofloat $(ADD_DFLAGS)\r
+TFLAGS_DEBUG=-g -w -nofloat $(ADD_DFLAGS)\r
+TFLAGS=$(TFLAGS_RELEASE)\r
\r
DOCFLAGS=-version=DDoc\r
\r
core/thread.o\r
\r
OBJ_STDC= \\r
- stdc/errno.o\r
+ core/stdc/errno.o\r
\r
ALL_OBJS= \\r
$(OBJ_CORE) \\r
core/runtime.html \\r
core/thread.html\r
\r
+######################################################\r
\r
ALL_DOCS=\r
\r
######################################################\r
\r
+unittest :\r
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE) -unittest"\r
+\r
+release :\r
+ make -fposix.mak DC="$(DC)" LIB_BUILD="" DFLAGS="$(DFLAGS_RELEASE)"\r
+\r
+debug :\r
+ make -fposix.mak DC="$(DC)" LIB_BUILD="-d" DFLAGS="$(DFLAGS_DEBUG)"\r
+\r
+######################################################\r
+\r
core.lib : $(LIB_TARGET)\r
\r
$(LIB_TARGET) : $(ALL_OBJS)\r