Code Search for Developers
 
 
  

fix.bat from Allegro game programming library at Krugle


Show fix.bat syntax highlighted

@echo off

rem Sets up the Allegro package for building with the specified compiler,
rem and if possible converting text files from LF to CR/LF format.

rem Test if there are too many args.
if [%3] == []        goto arg2
goto help

:arg2
rem Test if second arg is ok.
if [%2] == [--quick] goto arg1
if [%2] == []        goto arg1
goto help

:arg1
rem Test if first arg is ok.
if [%1] == [bcc32]   goto head
if [%1] == [djgpp]   goto head
if [%1] == [mingw32] goto head
if [%1] == [msvc]    goto head
if [%1] == [watcom]  goto head
goto help

:head
rem Generate header of makefile and alplatf.h,
rem then go to platform specific function.
echo # generated by fix.bat > makefile
echo /* generated by fix.bat */ > include\allegro\platform\alplatf.h

if [%1] == [bcc32]   goto bcc32
if [%1] == [djgpp]   goto djgpp
if [%1] == [mingw32] goto mingw32
if [%1] == [msvc]    goto msvc
if [%1] == [watcom]  goto watcom

echo fix.bat internal error: not reached
goto help

:bcc32
echo Configuring Allegro for Windows/BCC32...
echo MAKEFILE_INC = makefile.bcc >> makefile
echo #define ALLEGRO_BCC32 >> include\allegro\platform\alplatf.h
goto tail

:djgpp
echo Configuring Allegro for DOS/djgpp...
echo MAKEFILE_INC = makefile.dj >> makefile
echo #define ALLEGRO_DJGPP >> include\allegro\platform\alplatf.h
goto tail

:mingw32
echo Configuring Allegro for Windows/Mingw32...
echo MAKEFILE_INC = makefile.mgw >> makefile
echo #define ALLEGRO_MINGW32 >> include\allegro\platform\alplatf.h
goto tail

:msvc
echo Configuring Allegro for Windows/MSVC...
echo MAKEFILE_INC = makefile.vc >> makefile
echo #define ALLEGRO_MSVC >> include\allegro\platform\alplatf.h
goto tail

:watcom
echo Configuring Allegro for DOS/Watcom...
echo MAKEFILE_INC = makefile.wat >> makefile
echo #define ALLEGRO_WATCOM >> include\allegro\platform\alplatf.h
goto tail

:help
echo.
echo Usage: fix platform [--quick]
echo.
echo Where platform is one of: bcc32, djgpp, mingw32, msvc or watcom.
echo The --quick parameter is used to turn off LF to CR/LF conversion.
echo.
goto end

:tail
rem Generate last line of makefile and optionally convert CR/LF.
echo include makefile.all >> makefile

if [%2] == [--quick] goto done
if [%1] == [bcc32]   goto done
if [%1] == [mingw32] goto done

echo Converting Allegro files to DOS CR/LF format...
utod *.bat .../*.c *.cfg .../*.h .../*.inc .../*.rc
utod .../*.inl .../*.s .../*.txt .../*._tx makefile.*

:done
echo Done!

:end




See more files for this project here

Allegro game programming library

Allegro is a cross-platform library intended for use in computer games and other types of multimedia programming.

Project homepage: http://sourceforge.net/projects/alleg
Programming language(s): Assembly,C,Shell Script
License: other

  demo/
    demo.c
    demo.h
    music.txt
  docs/
    build/
      bcc32.txt
      beos.txt
      djgpp.txt
      linux.txt
      macos.txt
      mingw32.txt
      msvc.txt
      qnx.txt
      unix.txt
      watcom.txt
    html/
      tmpfile.txt
    info/
      tmpfile.txt
    man/
      tmpfile.txt
    rtf/
      tmpfile.txt
    src/
      abi._tx
      ahack._tx
      allegro._tx
      changes._tx
      const._tx
      faq._tx
      help._tx
      thanks._tx
    texi/
      tmpfile.txt
    txt/
    makedoc.c
  examples/
    allegro.pcx
    ex12bit.c
    ex3buf.c
    ex3d.c
    exaccel.c
    exalpha.c
    example.dat
    example.h
    examples.txt
    exbitmap.c
    exblend.c
    excamera.c
    excolmap.c
    excustom.c
    exdata.c
    exdbuf.c
    exdodgy.c
    exexedat.c
    exfixed.c
    exflame.c
    exflip.c
    exgui.c
    exhello.c
    exjoy.c
    exkeys.c
    exlights.c
    exmem.c
    exmidi.c
    exmouse.c
    expal.c
    expat.c
    exquat.c
    exrgbhsv.c
    exsample.c
    exscale.c
    exscn3d.c
    exscroll.c
    exshade.c
    exspline.c
    exsprite.c
    exstars.c
    exstream.c
    exswitch.c
    extimer.c
    extrans.c
    extruec.c
    exunicod.c
    exupdate.c
    exxfade.c
    exzbuf.c
    mysha.pcx
    planet.pcx
    running.dat
    running.h
    unifont.dat
  include/
    allegro/
    allegro.h
    bealleg.h
    linalleg.h
    macalleg.h
    qnxalleg.h
    winalleg.h
    xalleg.h
  lib/
    bcc32/
    beos/
    djgpp/
    mingw32/
    msvc/
    qnx/
    unix/
    watcom/
  misc/
    alex.xpm
    allegro-config-qnx.sh
    allegro-config.in
    allegro.spec
    askq.c
  obj/
  resource/
  setup/
  src/
  tests/
  tools/
  acconfig.h
  aclocal.m4
  allegro.cfg
  configure.in
  fix.bat
  fix.sh
  fixmpw.sh
  indent.pro
  makefile.all
  makefile.bcc
  makefile.be
  makefile.dj
  makefile.in
  makefile.lst
  makefile.mgw
  makefile.mpw
  makefile.qnx
  makefile.tst
  makefile.vc
  makefile.ver
  makefile.wat
  modules.lst
  readme.txt
  stamp-h.in
  todo.txt
  xmake.sh