makeos2.cmd
changeset 819 03217bdae0c2
parent 785 1ea0f6549eb2
child 871 7d9a26213980
equal deleted inserted replaced
818:e36f23f49042 819:03217bdae0c2
     1 @echo off
     1 @echo off
     2 rem this is a simple batch file to build PhysicsFS on OS/2. You need to have
     2 rem this is a simple batch file to build PhysicsFS on OS/2. You need to have
     3 rem  the EMX development tools installed for this to work.
     3 rem  the Innotek libc and GCC (or "kLIBC") installed for this to work:
       
     4 rem
       
     5 rem     http://svn.netlabs.org/libc
     4 rem
     6 rem
     5 rem This script (and, indeed, our OS/2 support) could use some tweaking.
     7 rem This script (and, indeed, our OS/2 support) could use some tweaking.
     6 rem  Patches go to icculus@icculus.org ...
     8 rem  Patches go to icculus@icculus.org ...
     7 
     9 
     8 set PHYSFSLANG=PHYSFS_LANG_ENGLISH
    10 set PHYSFSLANG=PHYSFS_LANG_ENGLISH
     9 set DEBUGFLAGS=-D_NDEBUG -O2 -s
    11 set DEBUGFLAGS=-D_NDEBUG -O2 -s
    10 rem set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib123 -c -D__ST_MT_ERRNO__ -DOS2 -DZ_PREFIX -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_WAD -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_SUPPORTS_HOG -DPHYSFS_SUPPORTS_MVL -DPHYSFS_LANG=%PHYSFSLANG% -DHAVE_ASSERT_H
    12 rem set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib123 -c -D__ST_MT_ERRNO__ -DOS2 -DZ_PREFIX -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_7Z -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_WAD -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_SUPPORTS_HOG -DPHYSFS_SUPPORTS_MVL -DPHYSFS_LANG=%PHYSFSLANG% -DHAVE_ASSERT_H
    11 set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib123 -c -D__ST_MT_ERRNO__ -DOS2 -DZ_PREFIX -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_WAD -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_SUPPORTS_HOG -DPHYSFS_SUPPORTS_MVL -DHAVE_ASSERT_H
    13 set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -I. -Iz -c -D__ST_MT_ERRNO__ -DOS2 -DZ_PREFIX -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_7Z -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_WAD -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_SUPPORTS_HOG -DPHYSFS_SUPPORTS_MVL -DHAVE_ASSERT_H
    12 
    14 
    13 rem goto :dolinking
    15 rem goto :dolinking
    14 
    16 
    15 @echo cleaning up any previous build...
    17 @echo cleaning up any previous build...
    16 @mkdir bin 2>NUL
    18 @mkdir bin 2>NUL
    29 @echo STACKSIZE 0x10000 >> bin\physfs.def
    31 @echo STACKSIZE 0x10000 >> bin\physfs.def
    30 @echo CODE LOADONCALL >> bin\physfs.def
    32 @echo CODE LOADONCALL >> bin\physfs.def
    31 @echo DATA LOADONCALL NONSHARED MULTIPLE >> bin\physfs.def
    33 @echo DATA LOADONCALL NONSHARED MULTIPLE >> bin\physfs.def
    32 @echo DESCRIPTION 'PhysicsFS: http://icculus.org/physfs/' >> bin\physfs.def
    34 @echo DESCRIPTION 'PhysicsFS: http://icculus.org/physfs/' >> bin\physfs.def
    33 @echo EXPORTS >> bin\physfs.def
    35 @echo EXPORTS >> bin\physfs.def
    34 @echo  "PHYSFS_getLinkedVersion" >> bin\physfs.def
    36 @echo "_PHYSFS_getLinkedVersion" >> bin\physfs.def
    35 @echo  "PHYSFS_init" >> bin\physfs.def
    37 @echo "_PHYSFS_init" >> bin\physfs.def
    36 @echo  "PHYSFS_deinit" >> bin\physfs.def
    38 @echo "_PHYSFS_deinit" >> bin\physfs.def
    37 @echo  "PHYSFS_supportedArchiveTypes" >> bin\physfs.def
    39 @echo "_PHYSFS_supportedArchiveTypes" >> bin\physfs.def
    38 @echo  "PHYSFS_freeList" >> bin\physfs.def
    40 @echo "_PHYSFS_freeList" >> bin\physfs.def
    39 @echo  "PHYSFS_getLastError" >> bin\physfs.def
    41 @echo "_PHYSFS_getLastError" >> bin\physfs.def
    40 @echo  "PHYSFS_getDirSeparator" >> bin\physfs.def
    42 @echo "_PHYSFS_getDirSeparator" >> bin\physfs.def
    41 @echo  "PHYSFS_permitSymbolicLinks" >> bin\physfs.def
    43 @echo "_PHYSFS_permitSymbolicLinks" >> bin\physfs.def
    42 @echo  "PHYSFS_getCdRomDirs" >> bin\physfs.def
    44 @echo "_PHYSFS_getCdRomDirs" >> bin\physfs.def
    43 @echo  "PHYSFS_getBaseDir" >> bin\physfs.def
    45 @echo "_PHYSFS_getBaseDir" >> bin\physfs.def
    44 @echo  "PHYSFS_getUserDir" >> bin\physfs.def
    46 @echo "_PHYSFS_getUserDir" >> bin\physfs.def
    45 @echo  "PHYSFS_getWriteDir" >> bin\physfs.def
    47 @echo "_PHYSFS_getWriteDir" >> bin\physfs.def
    46 @echo  "PHYSFS_setWriteDir" >> bin\physfs.def
    48 @echo "_PHYSFS_setWriteDir" >> bin\physfs.def
    47 @echo  "PHYSFS_addToSearchPath" >> bin\physfs.def
    49 @echo "_PHYSFS_addToSearchPath" >> bin\physfs.def
    48 @echo  "PHYSFS_removeFromSearchPath" >> bin\physfs.def
    50 @echo "_PHYSFS_removeFromSearchPath" >> bin\physfs.def
    49 @echo  "PHYSFS_getSearchPath" >> bin\physfs.def
    51 @echo "_PHYSFS_getSearchPath" >> bin\physfs.def
    50 @echo  "PHYSFS_setSaneConfig" >> bin\physfs.def
    52 @echo "_PHYSFS_setSaneConfig" >> bin\physfs.def
    51 @echo  "PHYSFS_mkdir" >> bin\physfs.def
    53 @echo "_PHYSFS_mkdir" >> bin\physfs.def
    52 @echo  "PHYSFS_delete" >> bin\physfs.def
    54 @echo "_PHYSFS_delete" >> bin\physfs.def
    53 @echo  "PHYSFS_getRealDir" >> bin\physfs.def
    55 @echo "_PHYSFS_getRealDir" >> bin\physfs.def
    54 @echo  "PHYSFS_enumerateFiles" >> bin\physfs.def
    56 @echo "_PHYSFS_enumerateFiles" >> bin\physfs.def
    55 @echo  "PHYSFS_exists" >> bin\physfs.def
    57 @echo "_PHYSFS_exists" >> bin\physfs.def
    56 @echo  "PHYSFS_isDirectory" >> bin\physfs.def
    58 @echo "_PHYSFS_isDirectory" >> bin\physfs.def
    57 @echo  "PHYSFS_isSymbolicLink" >> bin\physfs.def
    59 @echo "_PHYSFS_isSymbolicLink" >> bin\physfs.def
    58 @echo  "PHYSFS_openWrite" >> bin\physfs.def
    60 @echo "_PHYSFS_openWrite" >> bin\physfs.def
    59 @echo  "PHYSFS_openAppend" >> bin\physfs.def
    61 @echo "_PHYSFS_openAppend" >> bin\physfs.def
    60 @echo  "PHYSFS_openRead" >> bin\physfs.def
    62 @echo "_PHYSFS_openRead" >> bin\physfs.def
    61 @echo  "PHYSFS_close" >> bin\physfs.def
    63 @echo "_PHYSFS_close" >> bin\physfs.def
    62 @echo  "PHYSFS_read" >> bin\physfs.def
    64 @echo "_PHYSFS_read" >> bin\physfs.def
    63 @echo  "PHYSFS_write" >> bin\physfs.def
    65 @echo "_PHYSFS_write" >> bin\physfs.def
    64 @echo  "PHYSFS_eof" >> bin\physfs.def
    66 @echo "_PHYSFS_eof" >> bin\physfs.def
    65 @echo  "PHYSFS_tell" >> bin\physfs.def
    67 @echo "_PHYSFS_tell" >> bin\physfs.def
    66 @echo  "PHYSFS_seek" >> bin\physfs.def
    68 @echo "_PHYSFS_seek" >> bin\physfs.def
    67 @echo  "PHYSFS_fileLength" >> bin\physfs.def
    69 @echo "_PHYSFS_fileLength" >> bin\physfs.def
    68 @echo  "PHYSFS_swapSLE16" >> bin\physfs.def
    70 @echo "_PHYSFS_swapSLE16" >> bin\physfs.def
    69 @echo  "PHYSFS_swapULE16" >> bin\physfs.def
    71 @echo "_PHYSFS_swapULE16" >> bin\physfs.def
    70 @echo  "PHYSFS_swapSLE32" >> bin\physfs.def
    72 @echo "_PHYSFS_swapSLE32" >> bin\physfs.def
    71 @echo  "PHYSFS_swapULE32" >> bin\physfs.def
    73 @echo "_PHYSFS_swapULE32" >> bin\physfs.def
    72 @echo  "PHYSFS_swapSLE64" >> bin\physfs.def
    74 @echo "_PHYSFS_swapSLE64" >> bin\physfs.def
    73 @echo  "PHYSFS_swapULE64" >> bin\physfs.def
    75 @echo "_PHYSFS_swapULE64" >> bin\physfs.def
    74 @echo  "PHYSFS_swapSBE16" >> bin\physfs.def
    76 @echo "_PHYSFS_swapSBE16" >> bin\physfs.def
    75 @echo  "PHYSFS_swapUBE16" >> bin\physfs.def
    77 @echo "_PHYSFS_swapUBE16" >> bin\physfs.def
    76 @echo  "PHYSFS_swapSBE32" >> bin\physfs.def
    78 @echo "_PHYSFS_swapSBE32" >> bin\physfs.def
    77 @echo  "PHYSFS_swapUBE32" >> bin\physfs.def
    79 @echo "_PHYSFS_swapUBE32" >> bin\physfs.def
    78 @echo  "PHYSFS_swapSBE64" >> bin\physfs.def
    80 @echo "_PHYSFS_swapSBE64" >> bin\physfs.def
    79 @echo  "PHYSFS_swapUBE64" >> bin\physfs.def
    81 @echo "_PHYSFS_swapUBE64" >> bin\physfs.def
    80 @echo  "PHYSFS_getLastModTime" >> bin\physfs.def
    82 @echo "_PHYSFS_getLastModTime" >> bin\physfs.def
    81 @echo  "PHYSFS_readSLE16" >> bin\physfs.def
    83 @echo "_PHYSFS_readSLE16" >> bin\physfs.def
    82 @echo  "PHYSFS_readULE16" >> bin\physfs.def
    84 @echo "_PHYSFS_readULE16" >> bin\physfs.def
    83 @echo  "PHYSFS_readSLE32" >> bin\physfs.def
    85 @echo "_PHYSFS_readSLE32" >> bin\physfs.def
    84 @echo  "PHYSFS_readULE32" >> bin\physfs.def
    86 @echo "_PHYSFS_readULE32" >> bin\physfs.def
    85 @echo  "PHYSFS_readSLE64" >> bin\physfs.def
    87 @echo "_PHYSFS_readSLE64" >> bin\physfs.def
    86 @echo  "PHYSFS_readULE64" >> bin\physfs.def
    88 @echo "_PHYSFS_readULE64" >> bin\physfs.def
    87 @echo  "PHYSFS_readSBE16" >> bin\physfs.def
    89 @echo "_PHYSFS_readSBE16" >> bin\physfs.def
    88 @echo  "PHYSFS_readUBE16" >> bin\physfs.def
    90 @echo "_PHYSFS_readUBE16" >> bin\physfs.def
    89 @echo  "PHYSFS_readSBE32" >> bin\physfs.def
    91 @echo "_PHYSFS_readSBE32" >> bin\physfs.def
    90 @echo  "PHYSFS_readUBE32" >> bin\physfs.def
    92 @echo "_PHYSFS_readUBE32" >> bin\physfs.def
    91 @echo  "PHYSFS_readSBE64" >> bin\physfs.def
    93 @echo "_PHYSFS_readSBE64" >> bin\physfs.def
    92 @echo  "PHYSFS_readUBE64" >> bin\physfs.def
    94 @echo "_PHYSFS_readUBE64" >> bin\physfs.def
    93 @echo  "PHYSFS_writeSLE16" >> bin\physfs.def
    95 @echo "_PHYSFS_writeSLE16" >> bin\physfs.def
    94 @echo  "PHYSFS_writeULE16" >> bin\physfs.def
    96 @echo "_PHYSFS_writeULE16" >> bin\physfs.def
    95 @echo  "PHYSFS_writeSLE32" >> bin\physfs.def
    97 @echo "_PHYSFS_writeSLE32" >> bin\physfs.def
    96 @echo  "PHYSFS_writeULE32" >> bin\physfs.def
    98 @echo "_PHYSFS_writeULE32" >> bin\physfs.def
    97 @echo  "PHYSFS_writeSLE64" >> bin\physfs.def
    99 @echo "_PHYSFS_writeSLE64" >> bin\physfs.def
    98 @echo  "PHYSFS_writeULE64" >> bin\physfs.def
   100 @echo "_PHYSFS_writeULE64" >> bin\physfs.def
    99 @echo  "PHYSFS_writeSBE16" >> bin\physfs.def
   101 @echo "_PHYSFS_writeSBE16" >> bin\physfs.def
   100 @echo  "PHYSFS_writeUBE16" >> bin\physfs.def
   102 @echo "_PHYSFS_writeUBE16" >> bin\physfs.def
   101 @echo  "PHYSFS_writeSBE32" >> bin\physfs.def
   103 @echo "_PHYSFS_writeSBE32" >> bin\physfs.def
   102 @echo  "PHYSFS_writeUBE32" >> bin\physfs.def
   104 @echo "_PHYSFS_writeUBE32" >> bin\physfs.def
   103 @echo  "PHYSFS_writeSBE64" >> bin\physfs.def
   105 @echo "_PHYSFS_writeSBE64" >> bin\physfs.def
   104 @echo  "PHYSFS_writeUBE64" >> bin\physfs.def
   106 @echo "_PHYSFS_writeUBE64" >> bin\physfs.def
   105 @echo  "PHYSFS_setBuffer" >> bin\physfs.def
   107 @echo "_PHYSFS_setBuffer" >> bin\physfs.def
   106 @echo  "PHYSFS_flush" >> bin\physfs.def
   108 @echo "_PHYSFS_flush" >> bin\physfs.def
   107 @echo  "PHYSFS_mount" >> bin\physfs.def
   109 @echo "_PHYSFS_mount" >> bin\physfs.def
   108 @echo  "PHYSFS_getMountPoint" >> bin\physfs.def
   110 @echo "_PHYSFS_getMountPoint" >> bin\physfs.def
   109 @echo  "PHYSFS_setAllocator" >> bin\physfs.def
   111 @echo "_PHYSFS_setAllocator" >> bin\physfs.def
   110 @echo  "PHYSFS_getCdRomDirsCallback" >> bin\physfs.def
   112 @echo "_PHYSFS_getCdRomDirsCallback" >> bin\physfs.def
   111 @echo  "PHYSFS_getSearchPathCallback" >> bin\physfs.def
   113 @echo "_PHYSFS_getSearchPathCallback" >> bin\physfs.def
   112 @echo  "PHYSFS_enumerateFilesCallback" >> bin\physfs.def
   114 @echo "_PHYSFS_enumerateFilesCallback" >> bin\physfs.def
   113 @echo  "PHYSFS_utf8toucs2" >> bin\physfs.def
   115 @echo "_PHYSFS_utf8toucs2" >> bin\physfs.def
   114 @echo  "PHYSFS_utf8fromucs2" >> bin\physfs.def
   116 @echo "_PHYSFS_utf8fromucs2" >> bin\physfs.def
   115 @echo  "PHYSFS_utf8toucs4" >> bin\physfs.def
   117 @echo "_PHYSFS_utf8toucs4" >> bin\physfs.def
   116 @echo  "PHYSFS_utf8fromucs4" >> bin\physfs.def
   118 @echo "_PHYSFS_utf8fromucs4" >> bin\physfs.def
   117 @echo  "PHYSFS_utf8fromlatin1" >> bin\physfs.def
   119 @echo "_PHYSFS_utf8fromlatin1" >> bin\physfs.def
   118 
   120 
   119 @echo Building export library...
   121 @echo Building export library...
   120 emximp -o bin/physfs.lib bin/physfs.def
   122 emximp -o bin/physfs.lib bin/physfs.def
       
   123 emximp -o bin/physfs.a bin/physfs.def
   121 
   124 
   122 @echo Compiling PhysicsFS library...
   125 @echo Compiling PhysicsFS library...
   123 @echo on
   126 @echo on
   124 gcc %CFLAGS% -o bin/physfs.obj physfs.c
   127 gcc %CFLAGS% -o bin/physfs.obj physfs.c
   125 gcc %CFLAGS% -o bin/physfs_byteorder.obj physfs_byteorder.c
   128 gcc %CFLAGS% -o bin/physfs_byteorder.obj physfs_byteorder.c
   126 gcc %CFLAGS% -o bin/physfs_unicode.obj physfs_unicode.c
   129 gcc %CFLAGS% -o bin/physfs_unicode.obj physfs_unicode.c
   127 gcc %CFLAGS% -o bin/os2.obj platform/os2.c
   130 gcc %CFLAGS% -o bin/os2.obj platform/os2.c
   128 gcc %CFLAGS% -o bin/dir.obj archivers/dir.c
   131 gcc %CFLAGS% -o bin/dir.obj archivers/dir.c
   129 gcc %CFLAGS% -o bin/grp.obj archivers/grp.c
   132 gcc %CFLAGS% -o bin/grp.obj archivers/grp.c
   130 gcc %CFLAGS% -o bin/wad.obj archivers/wad.c
   133 gcc %CFLAGS% -o bin/wad.obj archivers/wad.c
       
   134 gcc %CFLAGS% -o bin/lzma.obj archivers/lzma.c
   131 gcc %CFLAGS% -o bin/zip.obj archivers/zip.c
   135 gcc %CFLAGS% -o bin/zip.obj archivers/zip.c
   132 gcc %CFLAGS% -o bin/qpak.obj archivers/qpak.c
   136 gcc %CFLAGS% -o bin/qpak.obj archivers/qpak.c
   133 gcc %CFLAGS% -o bin/hog.obj archivers/hog.c
   137 gcc %CFLAGS% -o bin/hog.obj archivers/hog.c
   134 gcc %CFLAGS% -o bin/mvl.obj archivers/mvl.c
   138 gcc %CFLAGS% -o bin/mvl.obj archivers/mvl.c
   135 gcc %CFLAGS% -o bin/adler32.obj zlib123/adler32.c
   139 gcc %CFLAGS% -o bin/adler32.obj zlib123/adler32.c
   142 gcc %CFLAGS% -o bin/inflate.obj zlib123/inflate.c
   146 gcc %CFLAGS% -o bin/inflate.obj zlib123/inflate.c
   143 gcc %CFLAGS% -o bin/inftrees.obj zlib123/inftrees.c
   147 gcc %CFLAGS% -o bin/inftrees.obj zlib123/inftrees.c
   144 gcc %CFLAGS% -o bin/trees.obj zlib123/trees.c
   148 gcc %CFLAGS% -o bin/trees.obj zlib123/trees.c
   145 gcc %CFLAGS% -o bin/uncompr.obj zlib123/uncompr.c
   149 gcc %CFLAGS% -o bin/uncompr.obj zlib123/uncompr.c
   146 gcc %CFLAGS% -o bin/zutil.obj zlib123/zutil.c
   150 gcc %CFLAGS% -o bin/zutil.obj zlib123/zutil.c
       
   151 gcc %CFLAGS% -o bin/7zBuffer.obj lzma/7zBuffer.c
       
   152 gcc %CFLAGS% -o bin/7zCrc.obj lzma/7zCrc.c
       
   153 gcc %CFLAGS% -o bin/7zDecode.obj lzma/7zDecode.c
       
   154 gcc %CFLAGS% -o bin/7zExtract.obj lzma/7zExtract.c
       
   155 gcc %CFLAGS% -o bin/7zHeader.obj lzma/7zHeader.c
       
   156 gcc %CFLAGS% -o bin/7zIn.obj lzma/7zIn.c
       
   157 gcc %CFLAGS% -o bin/7zItem.obj lzma/7zItem.c
       
   158 gcc %CFLAGS% -o bin/7zMethodID.obj lzma/7zMethodID.c
       
   159 gcc %CFLAGS% -o bin/LzmaDecode.obj lzma/LzmaDecode.c
       
   160 gcc %CFLAGS% -o bin/LzmaStateDecode.obj lzma/LzmaStateDecode.c
   147 @echo off
   161 @echo off
   148 
   162 
   149 :dolinking
   163 :dolinking
   150 @echo Linking PhysicsFS library...
   164 @echo Linking PhysicsFS library...
   151 gcc %DEBUGFLAGS% -Zdll -Zcrtdll -Zomf -Zmt -Zmtd -o bin/physfs.dll bin/*.obj bin/physfs.def
   165 gcc %DEBUGFLAGS% -Zdll -Zcrtdll -Zomf -o bin/physfs.dll bin/*.obj bin/physfs.def
   152 
   166 
   153 rem goto :builddone
   167 rem goto :builddone
   154 
   168 
   155 @echo Compiling test program...
   169 @echo Compiling test program...
   156 gcc %CFLAGS% -o bin/test_physfs.obj test/test_physfs.c
   170 gcc %CFLAGS% -o bin/test_physfs.obj test/test_physfs.c
   157 @echo Linking test program...
   171 @echo Linking test program...
   158 gcc %DEBUGFLAGS% -Zomf -Zcrtdll -Zmt -Zmtd -o bin/test_physfs.exe bin/test_physfs.obj bin/physfs.lib bin/test_physfs.def
   172 gcc %DEBUGFLAGS% -Zomf -Zcrtdll -o bin/test_physfs.exe bin/test_physfs.obj bin/physfs.lib bin/test_physfs.def
   159 
   173 
   160 :builddone
   174 :builddone
   161 
   175 
   162 @echo "All done!"
   176 @echo "All done!"
   163 
   177