@echo off
rem *--------------------------------------------------------------------------*
rem * This batch file should be run to create gpp.a, gpp_p.a and gpp290xx.a
rem * libraries. Because GNU C++ compiler with frame-unwind-info exceptions
rem * requires a slightly different initialization, it has its own gcc-specific
rem * runtime. If you link with gcc rather than with g++ you will get slightly
rem * smaller (5-10K) executables because no extra data and code will be linked
rem * against code that do not require stack frame unwind info.
rem *--------------------------------------------------------------------------*

 if not exist gcc.a   goto nogcclib
 if not exist gcc_p.a goto nogcclib

 copy gcc.a gpp.a >nul
 copy gcc_p.a gpp_p.a >nul

 gcc -s  -c -O6 -D__NO_CPLUSPLUS__ emx-ctordtor.c
 ar r gcc.a emx-ctordtor.o
 gcc -pg -c -O6 -D__NO_CPLUSPLUS__ emx-ctordtor.c
 ar r gcc_p.a emx-ctordtor.o

exit

:nogcclib
 echo You should put gcc.a and gcc_p.a into current directory
 echo prior to running this batch file!
