makeos2.cmd 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. @echo off
  2. rem this is a simple batch file to build PhysicsFS on OS/2. You need to have
  3. rem the Innotek libc and GCC (or "kLIBC") installed for this to work:
  4. rem
  5. rem http://svn.netlabs.org/libc
  6. rem
  7. rem This script (and, indeed, our OS/2 support) could use some tweaking.
  8. rem Patches go to icculus@icculus.org ...
  9. set PHYSFSLANG=PHYSFS_LANG_ENGLISH
  10. set DEBUGFLAGS=-D_NDEBUG -O2 -s
  11. 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
  12. 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
  13. rem goto :dolinking
  14. @echo cleaning up any previous build...
  15. @mkdir bin 2>NUL
  16. @erase /N bin\*.* 2>NUL
  17. @echo Building export definitions...
  18. @echo ;don't edit this directly! It is rewritten by makeos2.cmd! > bin\test_physfs.def
  19. @echo NAME TESTPHYSFS WINDOWCOMPAT >> bin\test_physfs.def
  20. @echo DESCRIPTION 'PhysicsFS: http://icculus.org/physfs/' >> bin\test_physfs.def
  21. @echo STACKSIZE 0x10000 >> bin\test_physfs.def
  22. @echo BASE=0x10000 >> bin\test_physfs.def
  23. @echo PROTMODE >> bin\test_physfs.def
  24. @echo ;don't edit this directly! It is rewritten by makeos2.cmd! > bin\physfs.def
  25. @echo LIBRARY 'physfs' INITINSTANCE TERMINSTANCE >> bin\physfs.def
  26. @echo STACKSIZE 0x10000 >> bin\physfs.def
  27. @echo CODE LOADONCALL >> bin\physfs.def
  28. @echo DATA LOADONCALL NONSHARED MULTIPLE >> bin\physfs.def
  29. @echo DESCRIPTION 'PhysicsFS: http://icculus.org/physfs/' >> bin\physfs.def
  30. @echo EXPORTS >> bin\physfs.def
  31. @echo "_PHYSFS_getLinkedVersion" >> bin\physfs.def
  32. @echo "_PHYSFS_init" >> bin\physfs.def
  33. @echo "_PHYSFS_deinit" >> bin\physfs.def
  34. @echo "_PHYSFS_isInit" >> bin\physfs.def
  35. @echo "_PHYSFS_supportedArchiveTypes" >> bin\physfs.def
  36. @echo "_PHYSFS_freeList" >> bin\physfs.def
  37. @echo "_PHYSFS_getLastError" >> bin\physfs.def
  38. @echo "_PHYSFS_getDirSeparator" >> bin\physfs.def
  39. @echo "_PHYSFS_permitSymbolicLinks" >> bin\physfs.def
  40. @echo "_PHYSFS_symbolicLinksPermitted" >> bin\physfs.def
  41. @echo "_PHYSFS_getCdRomDirs" >> bin\physfs.def
  42. @echo "_PHYSFS_getBaseDir" >> bin\physfs.def
  43. @echo "_PHYSFS_getUserDir" >> bin\physfs.def
  44. @echo "_PHYSFS_getWriteDir" >> bin\physfs.def
  45. @echo "_PHYSFS_setWriteDir" >> bin\physfs.def
  46. @echo "_PHYSFS_addToSearchPath" >> bin\physfs.def
  47. @echo "_PHYSFS_removeFromSearchPath" >> bin\physfs.def
  48. @echo "_PHYSFS_getSearchPath" >> bin\physfs.def
  49. @echo "_PHYSFS_setSaneConfig" >> bin\physfs.def
  50. @echo "_PHYSFS_mkdir" >> bin\physfs.def
  51. @echo "_PHYSFS_delete" >> bin\physfs.def
  52. @echo "_PHYSFS_getRealDir" >> bin\physfs.def
  53. @echo "_PHYSFS_enumerateFiles" >> bin\physfs.def
  54. @echo "_PHYSFS_exists" >> bin\physfs.def
  55. @echo "_PHYSFS_isDirectory" >> bin\physfs.def
  56. @echo "_PHYSFS_isSymbolicLink" >> bin\physfs.def
  57. @echo "_PHYSFS_openWrite" >> bin\physfs.def
  58. @echo "_PHYSFS_openAppend" >> bin\physfs.def
  59. @echo "_PHYSFS_openRead" >> bin\physfs.def
  60. @echo "_PHYSFS_close" >> bin\physfs.def
  61. @echo "_PHYSFS_read" >> bin\physfs.def
  62. @echo "_PHYSFS_write" >> bin\physfs.def
  63. @echo "_PHYSFS_eof" >> bin\physfs.def
  64. @echo "_PHYSFS_tell" >> bin\physfs.def
  65. @echo "_PHYSFS_seek" >> bin\physfs.def
  66. @echo "_PHYSFS_fileLength" >> bin\physfs.def
  67. @echo "_PHYSFS_swapSLE16" >> bin\physfs.def
  68. @echo "_PHYSFS_swapULE16" >> bin\physfs.def
  69. @echo "_PHYSFS_swapSLE32" >> bin\physfs.def
  70. @echo "_PHYSFS_swapULE32" >> bin\physfs.def
  71. @echo "_PHYSFS_swapSLE64" >> bin\physfs.def
  72. @echo "_PHYSFS_swapULE64" >> bin\physfs.def
  73. @echo "_PHYSFS_swapSBE16" >> bin\physfs.def
  74. @echo "_PHYSFS_swapUBE16" >> bin\physfs.def
  75. @echo "_PHYSFS_swapSBE32" >> bin\physfs.def
  76. @echo "_PHYSFS_swapUBE32" >> bin\physfs.def
  77. @echo "_PHYSFS_swapSBE64" >> bin\physfs.def
  78. @echo "_PHYSFS_swapUBE64" >> bin\physfs.def
  79. @echo "_PHYSFS_getLastModTime" >> bin\physfs.def
  80. @echo "_PHYSFS_readSLE16" >> bin\physfs.def
  81. @echo "_PHYSFS_readULE16" >> bin\physfs.def
  82. @echo "_PHYSFS_readSLE32" >> bin\physfs.def
  83. @echo "_PHYSFS_readULE32" >> bin\physfs.def
  84. @echo "_PHYSFS_readSLE64" >> bin\physfs.def
  85. @echo "_PHYSFS_readULE64" >> bin\physfs.def
  86. @echo "_PHYSFS_readSBE16" >> bin\physfs.def
  87. @echo "_PHYSFS_readUBE16" >> bin\physfs.def
  88. @echo "_PHYSFS_readSBE32" >> bin\physfs.def
  89. @echo "_PHYSFS_readUBE32" >> bin\physfs.def
  90. @echo "_PHYSFS_readSBE64" >> bin\physfs.def
  91. @echo "_PHYSFS_readUBE64" >> bin\physfs.def
  92. @echo "_PHYSFS_writeSLE16" >> bin\physfs.def
  93. @echo "_PHYSFS_writeULE16" >> bin\physfs.def
  94. @echo "_PHYSFS_writeSLE32" >> bin\physfs.def
  95. @echo "_PHYSFS_writeULE32" >> bin\physfs.def
  96. @echo "_PHYSFS_writeSLE64" >> bin\physfs.def
  97. @echo "_PHYSFS_writeULE64" >> bin\physfs.def
  98. @echo "_PHYSFS_writeSBE16" >> bin\physfs.def
  99. @echo "_PHYSFS_writeUBE16" >> bin\physfs.def
  100. @echo "_PHYSFS_writeSBE32" >> bin\physfs.def
  101. @echo "_PHYSFS_writeUBE32" >> bin\physfs.def
  102. @echo "_PHYSFS_writeSBE64" >> bin\physfs.def
  103. @echo "_PHYSFS_writeUBE64" >> bin\physfs.def
  104. @echo "_PHYSFS_setBuffer" >> bin\physfs.def
  105. @echo "_PHYSFS_flush" >> bin\physfs.def
  106. @echo "_PHYSFS_mount" >> bin\physfs.def
  107. @echo "_PHYSFS_getMountPoint" >> bin\physfs.def
  108. @echo "_PHYSFS_setAllocator" >> bin\physfs.def
  109. @echo "_PHYSFS_getCdRomDirsCallback" >> bin\physfs.def
  110. @echo "_PHYSFS_getSearchPathCallback" >> bin\physfs.def
  111. @echo "_PHYSFS_enumerateFilesCallback" >> bin\physfs.def
  112. @echo "_PHYSFS_utf8ToUcs2" >> bin\physfs.def
  113. @echo "_PHYSFS_utf8FromUcs2" >> bin\physfs.def
  114. @echo "_PHYSFS_utf8ToUcs4" >> bin\physfs.def
  115. @echo "_PHYSFS_utf8FromUcs4" >> bin\physfs.def
  116. @echo "_PHYSFS_utf8FromLatin1" >> bin\physfs.def
  117. @echo Building export library...
  118. emximp -o bin/physfs.lib bin/physfs.def
  119. emximp -o bin/physfs.a bin/physfs.def
  120. @echo Compiling PhysicsFS library...
  121. @echo on
  122. gcc %CFLAGS% -o bin/physfs.obj physfs.c
  123. gcc %CFLAGS% -o bin/physfs_byteorder.obj physfs_byteorder.c
  124. gcc %CFLAGS% -o bin/physfs_unicode.obj physfs_unicode.c
  125. gcc %CFLAGS% -o bin/os2.obj platform/os2.c
  126. gcc %CFLAGS% -o bin/dir.obj archivers/dir.c
  127. gcc %CFLAGS% -o bin/grp.obj archivers/grp.c
  128. gcc %CFLAGS% -o bin/wad.obj archivers/wad.c
  129. gcc %CFLAGS% -o bin/lzma.obj archivers/lzma.c
  130. gcc %CFLAGS% -o bin/zip.obj archivers/zip.c
  131. gcc %CFLAGS% -o bin/qpak.obj archivers/qpak.c
  132. gcc %CFLAGS% -o bin/hog.obj archivers/hog.c
  133. gcc %CFLAGS% -o bin/mvl.obj archivers/mvl.c
  134. gcc %CFLAGS% -o bin/adler32.obj zlib123/adler32.c
  135. gcc %CFLAGS% -o bin/compress.obj zlib123/compress.c
  136. gcc %CFLAGS% -o bin/crc32.obj zlib123/crc32.c
  137. gcc %CFLAGS% -o bin/deflate.obj zlib123/deflate.c
  138. gcc %CFLAGS% -o bin/gzio.obj zlib123/gzio.c
  139. gcc %CFLAGS% -o bin/infback.obj zlib123/infback.c
  140. gcc %CFLAGS% -o bin/inffast.obj zlib123/inffast.c
  141. gcc %CFLAGS% -o bin/inflate.obj zlib123/inflate.c
  142. gcc %CFLAGS% -o bin/inftrees.obj zlib123/inftrees.c
  143. gcc %CFLAGS% -o bin/trees.obj zlib123/trees.c
  144. gcc %CFLAGS% -o bin/uncompr.obj zlib123/uncompr.c
  145. gcc %CFLAGS% -o bin/zutil.obj zlib123/zutil.c
  146. gcc %CFLAGS% -o bin/7zBuffer.obj lzma/7zBuffer.c
  147. gcc %CFLAGS% -o bin/7zCrc.obj lzma/7zCrc.c
  148. gcc %CFLAGS% -o bin/7zDecode.obj lzma/7zDecode.c
  149. gcc %CFLAGS% -o bin/7zExtract.obj lzma/7zExtract.c
  150. gcc %CFLAGS% -o bin/7zHeader.obj lzma/7zHeader.c
  151. gcc %CFLAGS% -o bin/7zIn.obj lzma/7zIn.c
  152. gcc %CFLAGS% -o bin/7zItem.obj lzma/7zItem.c
  153. gcc %CFLAGS% -o bin/7zMethodID.obj lzma/7zMethodID.c
  154. gcc %CFLAGS% -o bin/LzmaDecode.obj lzma/LzmaDecode.c
  155. gcc %CFLAGS% -o bin/LzmaStateDecode.obj lzma/LzmaStateDecode.c
  156. @echo off
  157. :dolinking
  158. @echo Linking PhysicsFS library...
  159. gcc %DEBUGFLAGS% -Zdll -Zcrtdll -Zomf -o bin/physfs.dll bin/*.obj bin/physfs.def
  160. rem goto :builddone
  161. @echo Compiling test program...
  162. gcc %CFLAGS% -o bin/test_physfs.obj test/test_physfs.c
  163. @echo Linking test program...
  164. gcc %DEBUGFLAGS% -Zomf -Zcrtdll -o bin/test_physfs.exe bin/test_physfs.obj bin/physfs.lib bin/test_physfs.def
  165. :builddone
  166. @echo "All done!"
  167. rem end of makeos2.cmd ...