Hello Jim,

Can you also share your command line to build with IA-16 GCC and
Libi86? I'm planning to remove the Makefile and instead create a
BUILD.BAT file that builds everything from source. It's a small
project; it doesn't need a Makefile. A simple BAT file will do the job
just fine and will be easier for others to read.

Here is what I did:

if "%DJGPP%"=="" if "%DJDIR%"=="" set DJDIR=%DOSDIR%\..\devel\djgpp
echo -Os -v -I..\include >senet.rsp
echo senet.c board.c play.c sticks.c win.c >>senet.rsp
echo -o senet.exe -li86 >>senet.rsp
call i16gcc @senet.rsp

This should output a tiny-model senet.exe.  (The -v option just makes
the compiler passes more verbose and is not really needed.)

Some notes:

(1)  I am cheating a bit with the `set DJDIR=...' here.  i16gcc.exe
really expects the DJGPP base environment to be properly installed
(http://www.delorie.com/pub/djgpp/current/v2/readme.1st).  It will still
work correctly even if DJGPP base is not there though, as long as
%DJDIR% points to where the DJGPP base should really be.

(2)  I pass options to GCC using a `@' switch: one reason is that the
complete GCC command line might generally be longer than what DOS could
handle.  A more important reason is that --- at least under fdnpkg <
0.99.6 --- i16gcc on %PATH% might be a batch file which might not
properly pass all options to the actual i16gcc.exe.  (fdnpkg 0.99.6 and
above fixes this.)

Another note:

(3)  GCC distinguishes between the .C and .c file extensions, at least
on its command line.  Files that are named with an capital .C extension
are considered to be C++ source files (just like .cc, .cpp, .cxx files).

Thank you!

--
https://gitlab.com/tkchia :: https://github.com/tkchia


_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to