Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added qpak.c to build systems.
  • Loading branch information
icculus committed Aug 9, 2002
1 parent 9852dec commit bd584d5
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile.am.newautomake
Expand Up @@ -49,6 +49,7 @@ libphysfs_la_SOURCES = \
archivers/dir.c \
archivers/grp.c \
archivers/zip.c \
archivers/qpak.c \
platform/unix.c \
platform/posix.c \
$(ZLIB_SRC)
Expand Down
3 changes: 2 additions & 1 deletion archivers/Makefile.am
Expand Up @@ -9,5 +9,6 @@ endif
libarchivers_la_SOURCES = \
dir.c \
grp.c \
zip.c
zip.c \
qpak.c

13 changes: 12 additions & 1 deletion configure.in
Expand Up @@ -108,7 +108,7 @@ if test x$enable_zip = xyes; then
fi


dnl Check for zip archiver inclusion...
dnl Check for grp archiver inclusion...
AC_ARG_ENABLE(grp,
[ --enable-grp enable Build Engine GRP support [default=yes]],
, enable_grp=yes)
Expand All @@ -117,6 +117,15 @@ if test x$enable_grp = xyes; then
fi


dnl Check for qpak archiver inclusion...
AC_ARG_ENABLE(qpak,
[ --enable-qpak enable Quake PAK support [default=yes]],
, enable_qpak=yes)
if test x$enable_qpak = xyes; then
AC_DEFINE([PHYSFS_SUPPORTS_QPAK], 1, [define if qpak support is enabled])
fi


AC_ARG_ENABLE(internal-zlib,
[ --enable-internal-zlib use included zlib [default=only if needed]],
, enable_internal_zlib=maybe)
Expand Down Expand Up @@ -415,6 +424,8 @@ dnl AC_TYPE_SIZE_T
AC_FUNC_MEMCMP
AC_CHECK_FUNCS([memset strrchr])

AC_CHECK_SIZEOF(int, 4)

CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"
LDFLAGS="$LDFLAGS -no-undefined"

Expand Down
3 changes: 2 additions & 1 deletion makeos2.cmd
Expand Up @@ -7,7 +7,7 @@ rem Patches go to icculus@clutteredmind.org ...

set PHYSFSLANG=PHYSFS_LANG_ENGLISH
set DEBUGFLAGS=-D_NDEBUG -O2 -s
set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib114 -c -D__ST_MT_ERRNO__ -DOS2 -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_LANG=%PHYSFSLANG%
set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib114 -c -D__ST_MT_ERRNO__ -DOS2 -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_LANG=%PHYSFSLANG%

@echo on
mkdir bin
Expand Down Expand Up @@ -107,6 +107,7 @@ gcc %CFLAGS% -o bin/os2.obj platform/os2.c
gcc %CFLAGS% -o bin/dir.obj archivers/dir.c
gcc %CFLAGS% -o bin/grp.obj archivers/grp.c
gcc %CFLAGS% -o bin/zip.obj archivers/zip.c
gcc %CFLAGS% -o bin/zip.obj archivers/qpak.c

gcc %CFLAGS% -o bin/adler32.obj zlib114/adler32.c
gcc %CFLAGS% -o bin/compress.obj zlib114/compress.c
Expand Down
15 changes: 15 additions & 0 deletions physfs.c
Expand Up @@ -57,8 +57,15 @@ extern const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_GRP;
extern const DirFunctions __PHYSFS_DirFunctions_GRP;
#endif

#if (defined PHYSFS_SUPPORTS_QPAK)
extern const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_QPAK;
extern const DirFunctions __PHYSFS_DirFunctions_QPAK;
#endif

extern const DirFunctions __PHYSFS_DirFunctions_DIR;


// !!! FIXME: This is stored with dirFunctions now, too.
static const PHYSFS_ArchiveInfo *supported_types[] =
{
#if (defined PHYSFS_SUPPORTS_ZIP)
Expand All @@ -69,6 +76,10 @@ static const PHYSFS_ArchiveInfo *supported_types[] =
&__PHYSFS_ArchiveInfo_GRP,
#endif

#if (defined PHYSFS_SUPPORTS_QPAK)
&__PHYSFS_ArchiveInfo_QPAK,
#endif

NULL
};

Expand All @@ -82,6 +93,10 @@ static const DirFunctions *dirFunctions[] =
&__PHYSFS_DirFunctions_GRP,
#endif

#if (defined PHYSFS_SUPPORTS_QPAK)
&__PHYSFS_DirFunctions_QPAK,
#endif

&__PHYSFS_DirFunctions_DIR,
NULL
};
Expand Down

0 comments on commit bd584d5

Please sign in to comment.