[physfs] PhysFS on MinGW and Windows Update -> Makefile
Tom Wilson
t.wilson at hazid.com
Wed Nov 17 18:21:39 EST 2004
OK, forget my awful makefile. I finally got the thing working.
For future reference when building with MinGW on Windows, you must not
put the sources in a directory with spaces in the name. This breaks the
build.
Also, you need to link with mingw32
I had to do; make LDFLAGS=-lmingw32
- Tom
> Hi,
>
> I ended up writing a MinGW specific makefile. Perhaps it could be
> included in the source....
>
> I can re-send with UUENCODE if tabs are messed up.
>
> Thanks,
>
> - Tom.
>
>
> ------------------------------------------------------------------------
>
> #######################################
> #Description: PhysFS Makefile for MinGW on Windows
> #Author: Tom Wilson
> #Date: Nov 2004
> #
> #
> #
> #######################################
>
>
> #modify these values if you get problems
> EXECPREFIX=C:/MinGW/bin/
> MSYSPREFIX=C:/msys/1.0/bin
> CC= $(EXECPREFIX)/gcc
> LD= $(EXECPREFIX)/gcc
> AR= $(EXECPREFIX)/ar
> RANLIB= $(EXECPREFIX)/ranlib
> ZLIBDIR=zlib121
> OUTDIR=lib
> CFLAGS= -I./ -I./$(ZLIBDIR)/ -O2
> RM=$(MSYSPREFIX)/rm
> DLLTOOL=$(EXECPREFIX)/dlltool
>
> PHYSFSOBJ=physfs.o \
> physfs_byteorder.o
>
> PLATOBJ= platform/win32.o
>
> ZLIBOBJ= $(ZLIBDIR)/adler32.o\
> $(ZLIBDIR)/compress.o\
> $(ZLIBDIR)/deflate.o\
> $(ZLIBDIR)/gzio.o\
> $(ZLIBDIR)/infback.o\
> $(ZLIBDIR)/inffast.o\
> $(ZLIBDIR)/inflate.o\
> $(ZLIBDIR)/inftrees.o\
> $(ZLIBDIR)/trees.o\
> $(ZLIBDIR)/uncompr.o\
> $(ZLIBDIR)/zutil.o\
> $(ZLIBDIR)/crc32.o
>
> ARCOBJ= archivers/dir.o\
> archivers/grp.o\
> archivers/wad.o\
> archivers/zip.o\
> archivers/qpak.o\
> archivers/hog.o\
> archivers/mvl.o \
>
> ALLOBJ= $(PHYSFSOBJ) $(PLATOBJ) $(ZLIBOBJ) $(ARCOBJ)
>
> $(ALLOBJ) :
> $(CC) $(CFLAGS) -c $*.c -o $*.o
>
>
>
>
> physfs_static.lib: $(ALLOBJ)
> -mkdir $(OUTDIR)
> $(AR) rvu $(OUTDIR)/$@ $?
> $(RANLIB) $(OUTDIR)/$@
>
> all: physfs_static.lib
>
>
> clean:
> -$(RM) archivers/*.o
> -$(RM) *.o
> -$(RM) platform/*.o
> -$(RM) $(OUTDIR)/*.a
> -$(RM) $(ZLIBDIR)/*.o
>
More information about the physfs
mailing list