This fixes grx enough for "make test" to work with DOS / BCC. I can't help with "make bgitest", as it seems to need some grx-to-bgi library. bin2c has only been tested under DOS / BCC, and I may be _wrong_ to presume that it needs <unistd.h> for the SEEK_XXX defines only. Apply vesaif16.dif first.
diff -Nru3 grx244/src/makefile.bcc grx/src/makefile.bcc --- grx244/src/makefile.bcc Tue Jun 11 16:29:28 2002 +++ grx/src/makefile.bcc Tue Jun 11 16:31:52 2002 @@ -85,7 +85,13 @@ LOBJ3=$(STD_9:/=) $(STD_10:/=) LOBJ4=$(STD_11:/=) $(BCCOBJ) $(DBG_O)
-all: config.bcc $(GRX20ST) ..\bin\vesaif16.exe +UTILP = \ + ..\bin\vesaif16.exe \ + ..\bin\fnt2c16.exe \ + ..\bin\modtst16.exe \ + ..\bin\bin2c16.exe + +all: config.bcc $(GRX20ST) $(UTILP)
clean: if exist bgi*.obj del bgi*.obj @@ -93,8 +99,10 @@ if exist fdrivers*.obj del fdrivers*.obj if exist fonts*.obj del fonts*.obj if exist image*.obj del image*.obj + if exist gformats*.o del gformats*.o if exist pnm*.obj del pnm*.obj if exist mouse*.obj del mouse*.obj + if exist misc*.obj del misc*.obj if exist pattern*.obj del pattern*.obj if exist setup*.obj del setup*.obj if exist shape*.obj del shape*.obj @@ -107,6 +115,9 @@ if exist ..\addons\print*.obj del ..\addons\print*.obj if exist ..\addons\bmp*.obj del ..\addons\bmp*.obj if exist ..\bin\vesaif16.exe del ..\bin\vesaif16.exe + if exist ..\bin\fnt2c16.exe del ..\bin\fnt2c16.exe + if exist ..\bin\modtst16.exe del ..\bin\modtst16.exe + if exist ..\bin\bin2c16.exe del ..\bin\bin2c16.exe if exist config.bcc del config.bcc if exist *.asm del *.asm if exist *.obj del *.obj @@ -146,6 +157,21 @@ ..\bin\vesaif16.exe: utilprog\vesainfo.c $(GRX20ST) config.bcc $(BCC) +config.bcc -e..\bin\vesaif16 @&&! utilprog\vesainfo.c $(GRX20ST) +! + +..\bin\fnt2c16.exe: utilprog\fnt2c.c $(GRX20ST) config.bcc + $(BCC) +config.bcc -e..\bin\fnt2c16 @&&! + utilprog\fnt2c.c $(GRX20ST) +! + +..\bin\modtst16.exe: utilprog\modetest.c $(GRX20ST) config.bcc + $(BCC) +config.bcc -I..\test -e..\bin\modtst16 @&&! + utilprog\modetest.c $(GRX20ST) +! + +..\bin\bin2c16.exe: utilprog\bin2c.c $(GRX20ST) config.bcc + $(BCC) +config.bcc -e..\bin\bin2c16 @&&! + utilprog\bin2c.c $(GRX20ST) !
.c.obj: diff -Nru3 grx244/src/utilprog/bin2c.c grx/src/utilprog/bin2c.c --- grx244/src/utilprog/bin2c.c Wed Jun 27 18:11:00 2001 +++ grx/src/utilprog/bin2c.c Tue Jun 11 16:10:38 2002 @@ -24,10 +24,17 @@
#include <stdlib.h> #include <stdio.h> -#include <unistd.h> #include <string.h> #include <time.h> #include <malloc.h> + +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif + +#ifndef SEEK_END +#define SEEK_END 2 +#endif
#define TRUE (1==1) #define FALSE (!TRUE) diff -Nru3 grx244/test/makefile.bcc grx/test/makefile.bcc --- grx244/test/makefile.bcc Thu Jan 25 05:23:26 2001 +++ grx/test/makefile.bcc Tue Jun 11 15:41:24 2002 @@ -17,12 +17,10 @@ cliptest.exe \ colorops.exe \ curstest.exe \ - fnt2c.exe \ fonttest.exe \ imgtest.exe \ life.exe \ linetest.exe \ - modtst16.exe \ mousetst.exe \ pcirctst.exe \ pnmtest.exe \ @@ -35,28 +33,14 @@ winclip.exe \ wintest.exe
-all: $(PROGS) ..\bin\modtst16.exe ..\bin\fnt2c16.exe +all: $(PROGS)
clean: if exist *.obj del *.obj if exist *.exe del *.exe
-..\bin\modtst16.exe: modtst16.exe - copy modtst16.exe ..\bin - -$(STRIP) ..\bin\modtst16.exe - -..\bin\fnt2c16.exe: fnt2c16.exe - copy fnt2c16.exe ..\bin - -$(STRIP) ..\bin\fnt2c16.exe - -modtst16.exe: modetest.obj - $(BCC) $(LIBDIR) $(LDOPT) -n. -emodtst16 modetest.obj $(GRX20ST) - spdtst16.exe: speedtst.obj $(BCC) $(LIBDIR) $(LDOPT) -n. -espdtst16 speedtst.obj $(GRX20ST) - -fnt2c16.exe: fnt2c.obj - $(BCC) $(LIBDIR) $(LDOPT) -n. -efnt2c16 fnt2c.obj $(GRX20ST)
.obj.exe: $(BCC) $(LIBDIR) $(LDOPT) -n. -e$* $*.obj $(GRX20ST)
Dimitar Zhekov escribió:
This fixes grx enough for "make test" to work with DOS / BCC. I can't help with "make bgitest", as it seems to need some grx-to-bgi library. bin2c has only been tested under DOS / BCC, and I may be _wrong_ to presume that it needs <unistd.h> for the SEEK_XXX defines only. Apply vesaif16.dif first.
Thanks Dimitar.
GRX includes now the grx-to-bgi library (bccbgi). I think if you check makedefs.grx and src/makefile.dj2 (by example) you will understand how it works. But probably bccbgi doesn't have sense for a Borland compiler, because bgi graphics are native for it (and I think the bccbgi library is not 16 bit clean).
The bin2c patch is not acceptable, a construction like:
#ifdef __BORLANDC__ #include <whoknows.h> #else #include <unistd.h> #endif
will be ok.
Greetings, M.Alvarez