A little more Cygwin-friendly.
This commit is contained in:
parent
987a9264d7
commit
7cf0f947a3
26
Makefile
26
Makefile
|
@ -172,15 +172,11 @@ MAINSRCS := physfs.c archivers/dir.c
|
||||||
ifeq ($(strip $(use_archive_zip)),true)
|
ifeq ($(strip $(use_archive_zip)),true)
|
||||||
MAINSRCS += archivers/zip.c archivers/unzip.c
|
MAINSRCS += archivers/zip.c archivers/unzip.c
|
||||||
CFLAGS += -DPHYSFS_SUPPORTS_ZIP
|
CFLAGS += -DPHYSFS_SUPPORTS_ZIP
|
||||||
|
LDFLAGS += -lz
|
||||||
ifeq ($(strip $(cygwin)),true)
|
ifeq ($(strip $(cygwin)),true)
|
||||||
|
EXTRABUILD += zlibwin32/zlib.a
|
||||||
CFLAGS += -Izlibwin32
|
CFLAGS += -Izlibwin32
|
||||||
ifeq ($(strip $(debugging)),true)
|
LDFLAGS += -Lzlibwin32
|
||||||
LDFLAGS += zlibwin32/zlibstat_multid.lib
|
|
||||||
else
|
|
||||||
LDFLAGS += zlibwin32/zlibstat_multir.lib
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
LDFLAGS += -lz
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -233,13 +229,13 @@ $(BINDIR)/%.o: $(SRCDIR)/%.asm
|
||||||
|
|
||||||
.PHONY: all clean distclean listobjs install
|
.PHONY: all clean distclean listobjs install
|
||||||
|
|
||||||
all: $(BINDIR) $(MAINLIB) $(TESTEXE)
|
all: $(BINDIR) $(EXTRABUILD) $(MAINLIB) $(TESTEXE)
|
||||||
|
|
||||||
$(MAINLIB) : $(BINDIR) $(MAINOBJS)
|
$(MAINLIB) : $(BINDIR) $(MAINOBJS)
|
||||||
$(LINKER) -o $(MAINLIB) $(LDFLAGS) $(SHAREDFLAGS) $(MAINOBJS)
|
$(LINKER) -o $(MAINLIB) $(SHAREDFLAGS) $(MAINOBJS) $(LDFLAGS)
|
||||||
|
|
||||||
$(TESTEXE) : $(MAINLIB) $(TESTOBJS)
|
$(TESTEXE) : $(MAINLIB) $(TESTOBJS)
|
||||||
$(LINKER) -o $(TESTEXE) $(LDFLAGS) $(TESTLDFLAGS) $(TESTOBJS) -L$(BINDIR) -l$(strip $(PUREBASELIBNAME))
|
$(LINKER) -o $(TESTEXE) $(TESTLDFLAGS) $(TESTOBJS) -L$(BINDIR) -l$(strip $(PUREBASELIBNAME)) $(LDFLAGS)
|
||||||
|
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
|
@ -264,11 +260,21 @@ $(BINDIR):
|
||||||
mkdir -p $(BINDIR)/platform
|
mkdir -p $(BINDIR)/platform
|
||||||
mkdir -p $(BINDIR)/test
|
mkdir -p $(BINDIR)/test
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(strip $(cygwin)),true)
|
||||||
|
zlibwin32/zlib.a:
|
||||||
|
cd zlibwin32 ; $(MAKE) CC=$(CC)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(CLEANUP)
|
rm -f $(CLEANUP)
|
||||||
rm -rf $(BINDIR)
|
rm -rf $(BINDIR)
|
||||||
|
ifeq ($(strip $(cygwin)),true)
|
||||||
|
cd zlibwin32 ; $(MAKE) clean
|
||||||
|
endif
|
||||||
|
|
||||||
listobjs:
|
listobjs:
|
||||||
@echo SOURCES:
|
@echo SOURCES:
|
||||||
|
|
Loading…
Reference in New Issue