Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
A little more Cygwin-friendly.
  • Loading branch information
icculus committed Sep 1, 2001
1 parent 987a926 commit 7cf0f94
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions Makefile
Expand Up @@ -172,15 +172,11 @@ MAINSRCS := physfs.c archivers/dir.c
ifeq ($(strip $(use_archive_zip)),true)
MAINSRCS += archivers/zip.c archivers/unzip.c
CFLAGS += -DPHYSFS_SUPPORTS_ZIP
LDFLAGS += -lz
ifeq ($(strip $(cygwin)),true)
EXTRABUILD += zlibwin32/zlib.a
CFLAGS += -Izlibwin32
ifeq ($(strip $(debugging)),true)
LDFLAGS += zlibwin32/zlibstat_multid.lib
else
LDFLAGS += zlibwin32/zlibstat_multir.lib
endif
else
LDFLAGS += -lz
LDFLAGS += -Lzlibwin32
endif
endif

Expand Down Expand Up @@ -233,13 +229,13 @@ $(BINDIR)/%.o: $(SRCDIR)/%.asm

.PHONY: all clean distclean listobjs install

all: $(BINDIR) $(MAINLIB) $(TESTEXE)
all: $(BINDIR) $(EXTRABUILD) $(MAINLIB) $(TESTEXE)

$(MAINLIB) : $(BINDIR) $(MAINOBJS)
$(LINKER) -o $(MAINLIB) $(LDFLAGS) $(SHAREDFLAGS) $(MAINOBJS)
$(LINKER) -o $(MAINLIB) $(SHAREDFLAGS) $(MAINOBJS) $(LDFLAGS)

$(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
Expand All @@ -264,11 +260,21 @@ $(BINDIR):
mkdir -p $(BINDIR)/platform
mkdir -p $(BINDIR)/test


ifeq ($(strip $(cygwin)),true)
zlibwin32/zlib.a:
cd zlibwin32 ; $(MAKE) CC=$(CC)
endif


distclean: clean

clean:
rm -f $(CLEANUP)
rm -rf $(BINDIR)
ifeq ($(strip $(cygwin)),true)
cd zlibwin32 ; $(MAKE) clean
endif

listobjs:
@echo SOURCES:
Expand Down

0 comments on commit 7cf0f94

Please sign in to comment.