5 rem This script (and, indeed, our OS/2 support) could use some tweaking. |
5 rem This script (and, indeed, our OS/2 support) could use some tweaking. |
6 rem Patches go to icculus@clutteredmind.org ... |
6 rem Patches go to icculus@clutteredmind.org ... |
7 |
7 |
8 set PHYSFSLANG=PHYSFS_LANG_ENGLISH |
8 set PHYSFSLANG=PHYSFS_LANG_ENGLISH |
9 set DEBUGFLAGS=-D_NDEBUG -O2 -s |
9 set DEBUGFLAGS=-D_NDEBUG -O2 -s |
10 rem set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib121 -c -D__ST_MT_ERRNO__ -DOS2 -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_WAD -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_SUPPORTS_HOG -DPHYSFS_SUPPORTS_MVL -DPHYSFS_LANG=%PHYSFSLANG% -DHAVE_ASSERT_H |
10 rem set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib121 -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 |
11 set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib121 -c -D__ST_MT_ERRNO__ -DOS2 -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_WAD -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_SUPPORTS_HOG -DPHYSFS_SUPPORTS_MVL -DHAVE_ASSERT_H |
11 set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib121 -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 |
12 |
12 |
13 @echo on |
13 rem goto :dolinking |
14 mkdir bin |
|
15 erase /N bin\*.* |
|
16 |
14 |
|
15 @echo cleaning up any previous build... |
|
16 @mkdir bin 2>NUL |
|
17 @erase /N bin\*.* 2>NUL |
|
18 |
|
19 @echo Building export definitions... |
17 @echo ;don't edit this directly! It is rewritten by makeos2.cmd! > bin\test_physfs.def |
20 @echo ;don't edit this directly! It is rewritten by makeos2.cmd! > bin\test_physfs.def |
18 @echo NAME TESTPHYSFS WINDOWCOMPAT >> bin\test_physfs.def |
21 @echo NAME TESTPHYSFS WINDOWCOMPAT >> bin\test_physfs.def |
19 @echo DESCRIPTION 'PhysicsFS: http://icculus.org/physfs/' >> bin\test_physfs.def |
22 @echo DESCRIPTION 'PhysicsFS: http://icculus.org/physfs/' >> bin\test_physfs.def |
20 @echo STACKSIZE 0x10000 >> bin\test_physfs.def |
23 @echo STACKSIZE 0x10000 >> bin\test_physfs.def |
21 @echo BASE=0x10000 >> bin\test_physfs.def |
24 @echo BASE=0x10000 >> bin\test_physfs.def |
100 @echo "PHYSFS_writeSBE64" >> bin\physfs.def |
103 @echo "PHYSFS_writeSBE64" >> bin\physfs.def |
101 @echo "PHYSFS_writeUBE64" >> bin\physfs.def |
104 @echo "PHYSFS_writeUBE64" >> bin\physfs.def |
102 @echo "PHYSFS_setBuffer" >> bin\physfs.def |
105 @echo "PHYSFS_setBuffer" >> bin\physfs.def |
103 @echo "PHYSFS_flush" >> bin\physfs.def |
106 @echo "PHYSFS_flush" >> bin\physfs.def |
104 |
107 |
|
108 @echo Building export library... |
105 emximp -o bin/physfs.lib bin/physfs.def |
109 emximp -o bin/physfs.lib bin/physfs.def |
106 |
110 |
|
111 @echo Compiling PhysicsFS library... |
|
112 @echo on |
107 gcc %CFLAGS% -o bin/physfs.obj physfs.c |
113 gcc %CFLAGS% -o bin/physfs.obj physfs.c |
108 gcc %CFLAGS% -o bin/physfs_byteorder.obj physfs_byteorder.c |
114 gcc %CFLAGS% -o bin/physfs_byteorder.obj physfs_byteorder.c |
109 gcc %CFLAGS% -o bin/os2.obj platform/os2.c |
115 gcc %CFLAGS% -o bin/os2.obj platform/os2.c |
110 gcc %CFLAGS% -o bin/dir.obj archivers/dir.c |
116 gcc %CFLAGS% -o bin/dir.obj archivers/dir.c |
111 gcc %CFLAGS% -o bin/grp.obj archivers/grp.c |
117 gcc %CFLAGS% -o bin/grp.obj archivers/grp.c |
112 gcc %CFLAGS% -o bin/wad.obj archivers/wad.c |
118 gcc %CFLAGS% -o bin/wad.obj archivers/wad.c |
113 gcc %CFLAGS% -o bin/zip.obj archivers/zip.c |
119 gcc %CFLAGS% -o bin/zip.obj archivers/zip.c |
114 gcc %CFLAGS% -o bin/qpak.obj archivers/qpak.c |
120 gcc %CFLAGS% -o bin/qpak.obj archivers/qpak.c |
115 gcc %CFLAGS% -o bin/hog.obj archivers/hog.c |
121 gcc %CFLAGS% -o bin/hog.obj archivers/hog.c |
116 gcc %CFLAGS% -o bin/mvl.obj archivers/mvl.c |
122 gcc %CFLAGS% -o bin/mvl.obj archivers/mvl.c |
117 |
|
118 gcc %CFLAGS% -o bin/adler32.obj zlib121/adler32.c |
123 gcc %CFLAGS% -o bin/adler32.obj zlib121/adler32.c |
119 gcc %CFLAGS% -o bin/compress.obj zlib121/compress.c |
124 gcc %CFLAGS% -o bin/compress.obj zlib121/compress.c |
120 gcc %CFLAGS% -o bin/crc32.obj zlib121/crc32.c |
125 gcc %CFLAGS% -o bin/crc32.obj zlib121/crc32.c |
121 gcc %CFLAGS% -o bin/deflate.obj zlib121/deflate.c |
126 gcc %CFLAGS% -o bin/deflate.obj zlib121/deflate.c |
122 gcc %CFLAGS% -o bin/gzio.obj zlib121/gzio.c |
127 gcc %CFLAGS% -o bin/gzio.obj zlib121/gzio.c |
125 gcc %CFLAGS% -o bin/inflate.obj zlib121/inflate.c |
130 gcc %CFLAGS% -o bin/inflate.obj zlib121/inflate.c |
126 gcc %CFLAGS% -o bin/inftrees.obj zlib121/inftrees.c |
131 gcc %CFLAGS% -o bin/inftrees.obj zlib121/inftrees.c |
127 gcc %CFLAGS% -o bin/trees.obj zlib121/trees.c |
132 gcc %CFLAGS% -o bin/trees.obj zlib121/trees.c |
128 gcc %CFLAGS% -o bin/uncompr.obj zlib121/uncompr.c |
133 gcc %CFLAGS% -o bin/uncompr.obj zlib121/uncompr.c |
129 gcc %CFLAGS% -o bin/zutil.obj zlib121/zutil.c |
134 gcc %CFLAGS% -o bin/zutil.obj zlib121/zutil.c |
|
135 @echo off |
130 |
136 |
|
137 :dolinking |
|
138 @echo Linking PhysicsFS library... |
131 gcc %DEBUGFLAGS% -Zdll -Zcrtdll -Zomf -Zmt -Zmtd -o bin/physfs.dll bin/*.obj bin/physfs.def |
139 gcc %DEBUGFLAGS% -Zdll -Zcrtdll -Zomf -Zmt -Zmtd -o bin/physfs.dll bin/*.obj bin/physfs.def |
132 |
140 |
|
141 rem goto :builddone |
|
142 |
|
143 @echo Compiling test program... |
133 gcc %CFLAGS% -o bin/test_physfs.obj test/test_physfs.c |
144 gcc %CFLAGS% -o bin/test_physfs.obj test/test_physfs.c |
|
145 @echo Linking test program... |
134 gcc %DEBUGFLAGS% -Zomf -Zcrtdll -Zmt -Zmtd -o bin/test_physfs.exe bin/test_physfs.obj bin/physfs.lib bin/test_physfs.def |
146 gcc %DEBUGFLAGS% -Zomf -Zcrtdll -Zmt -Zmtd -o bin/test_physfs.exe bin/test_physfs.obj bin/physfs.lib bin/test_physfs.def |
135 |
147 |
|
148 :builddone |
|
149 |
|
150 @echo "All done!" |
|
151 |
|
152 rem end of makeos2.cmd ... |
|
153 |