@if not "%1" == ""  goto START
@ECHO    /****************************************************************/
@ECHO    /**                      make_ext                              **/
@ECHO    /**                                                            **/
@ECHO    /** make_ext  creates the Dislin extension dislin.so for       **/
@ECHO    /**           Ruby 3.1                                         **/
@ECHO    /**                                                            **/
@ECHO    /** Command:  make_ext ruby                                    **/
@ECHO    /**                                                            **/
@ECHO    /** The Dislin library dismg_d.a for MinGW is required. The    **/
@ECHO    /** extension was created with gcc version 4.5.2 (tdm, 32-bit).**/
@ECHO    /****************************************************************/
@goto ENDE
:START
@if %1 == ruby goto M0
@ECHO Bad Parameter
@goto ENDE
:M0
set _ruby=c:\opt\Ruby31
set _inc=c:\opt\Ruby31\include\ruby-3.1.0

gcc -I. -I%_inc% -I%_inc%\i386-mingw32 dislin.c -shared -o dislin.so -L%_ruby%\lib -lmsvcrt-ruby310 c:\dislin\dismg_d.a -luser32 -lgdi32 -lopengl32
copy dislin.so dis_310.so
:ENDE
