Removing zlib1.dll in favor of zlib1.lib

Etienne Cimon via Digitalmars-d digitalmars-d at puremagic.com
Wed May 7 21:54:45 PDT 2014


I wrote a zlib.mak file for statically compiling the new zlib 1.2.8 on 
dmc, using make -fzlib.mak

I'm copying it here because it may help remove the default dependency on 
zlib1.dll in DMD, not that it's a big deal, but some of us were talking 
about a standalone GUI application using dwt or dfl a few threads back 
and this would be necessary if it needs basic compression too on 
Windows. So here it is:

STATICLIB = zlib1.lib
CC = dmc
CFLAGS = -mn -g -DNO_snprintf=1
LD = $(CC)
LDFLAGS = -L/co -L/ma
LT = lib
LTFLAGS = -c

OBJS = adler32.obj compress.obj crc32.obj deflate.obj infback.obj \
        inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj 
zutil.obj \
	   gzclose.obj gzlib.obj gzread.obj gzwrite.obj

all: $(STATICLIB)

.c.obj:
	$(CC) $(CFLAGS) -c -o$@ $<

$(STATICLIB): $(OBJS)
	-del $(STATICLIB)
	$(LT) $(LTFLAGS) $@ $(OBJS)

clean:
	-del $(STATICLIB)
	-del $(SHAREDLIB)
	-del $(IMPLIB)
	-del *.obj
	-del *.exe
	-del *.map
	-del foo.gz

adler32.obj: zutil.h zlib.h zconf.h
compress.obj: zlib.h zconf.h
crc32.obj: zutil.h zlib.h zconf.h crc32.h
deflate.obj: deflate.h zutil.h zlib.h zconf.h
example.obj: zlib.h zconf.h
gzclose.obj: zlib.h zconf.h gzguts.h
gzlib.obj: zlib.h zconf.h gzguts.h
gzread.obj: zlib.h zconf.h gzguts.h
gzwrite.obj: zlib.h zconf.h gzguts.h
inffast.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inflate.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h 
inffixed.h
infback.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h 
inffixed.h
inftrees.obj: zutil.h zlib.h zconf.h inftrees.h
minigzip.obj: zlib.h zconf.h
trees.obj: deflate.h zutil.h zlib.h zconf.h trees.h
uncompr.obj: zlib.h zconf.h
zutil.obj: zutil.h zlib.h zconf.h


More information about the Digitalmars-d mailing list