diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:51:45 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:51:45 +0300 |
| commit | d3261e64152397db2dca4d691a990c6bc2a6f4dd (patch) | |
| tree | fac2f7be638651181a72453d714f0f96675c2b8b /archived/ptlibzippy/win32/Makefile.gcc | |
| parent | 31b9a8949ed0a288143e23bf739f2eb64fdc63be (diff) | |
| download | Project-Tick-d3261e64152397db2dca4d691a990c6bc2a6f4dd.tar.gz Project-Tick-d3261e64152397db2dca4d691a990c6bc2a6f4dd.zip | |
NOISSUE add archived projects
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'archived/ptlibzippy/win32/Makefile.gcc')
| -rw-r--r-- | archived/ptlibzippy/win32/Makefile.gcc | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/archived/ptlibzippy/win32/Makefile.gcc b/archived/ptlibzippy/win32/Makefile.gcc new file mode 100644 index 0000000000..bb035d6545 --- /dev/null +++ b/archived/ptlibzippy/win32/Makefile.gcc @@ -0,0 +1,178 @@ +# Makefile for PTlibzippy, derived from Makefile.dj2. +# Modified for mingw32 by C. Spieler, 6/16/98. +# Updated for PTlibzippy 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003. +# Last updated: Mar 2012. +# Tested under Cygwin and MinGW. + +# Copyright (C) 1995-2026 Jean-loup Gailly. +# Copyright (C) 2026 Project Tick. +# For conditions of distribution and use, see copyright notice in ptlibzippy.h + +# To compile, or to compile and test, type from the top level PTlibzippy directory: +# +# make -fwin32/Makefile.gcc; make test testdll -fwin32/Makefile.gcc +# +# To install libptlibzippy.a, ptzippyconf.h and ptlibzippy.h in the system directories, type: +# +# make install -fwin32/Makefile.gcc +# +# BINARY_PATH, INCLUDE_PATH and LIBRARY_PATH must be set. +# +# To install the shared lib, append SHARED_MODE=1 to the make command : +# +# make install -fwin32/Makefile.gcc SHARED_MODE=1 + +# Note: +# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN), +# the DLL name should be changed from "ptlibzippy1.dll". + +STATICLIB = libptlibzippy.a +SHAREDLIB = ptlibzippy1.dll +IMPLIB = libptlibzippy.dll.a + +# +# Set to 1 if shared object needs to be installed +# +SHARED_MODE=0 + +#LOC = -DPTLIBZIPPY_DEBUG -g + +PREFIX = +CC = $(PREFIX)gcc +CFLAGS = $(LOC) -O3 -Wall + +AS = $(CC) +ASFLAGS = $(LOC) -Wall + +LD = $(CC) +LDFLAGS = $(LOC) + +AR = $(PREFIX)ar +ARFLAGS = rcs + +RC = $(PREFIX)windres +RCFLAGS = + +STRIP = $(PREFIX)strip + +CP = cp -fp +# If GNU install is available, replace $(CP) with install. +INSTALL = $(CP) +RM = rm -f + +prefix ?= /usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ + gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o ptzippyutil.o +OBJA = + +all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example.exe minigzip.exe example_d.exe minigzip_d.exe + +test: example.exe minigzip.exe + ./example + echo hello world | ./minigzip | ./minigzip -d + +testdll: example_d.exe minigzip_d.exe + ./example_d + echo hello world | ./minigzip_d | ./minigzip_d -d + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +%.o: %.S + $(AS) $(ASFLAGS) -c -o $@ $< + +$(STATICLIB): $(OBJS) $(OBJA) + $(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA) + +$(IMPLIB): $(SHAREDLIB) + +$(SHAREDLIB): win32/ptlibzippy.def $(OBJS) $(OBJA) ptlibzippyrc.o + $(CC) -shared -static-libgcc -Wl,--out-implib,$(IMPLIB) $(LDFLAGS) \ + -o $@ win32/ptlibzippy.def $(OBJS) $(OBJA) ptlibzippyrc.o + $(STRIP) $@ + +example.exe: example.o $(STATICLIB) + $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB) + $(STRIP) $@ + +minigzip.exe: minigzip.o $(STATICLIB) + $(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB) + $(STRIP) $@ + +example_d.exe: example.o $(IMPLIB) + $(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB) + $(STRIP) $@ + +minigzip_d.exe: minigzip.o $(IMPLIB) + $(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB) + $(STRIP) $@ + +example.o: test/example.c ptlibzippy.h ptzippyconf.h + $(CC) $(CFLAGS) -I. -c -o $@ test/example.c + +minigzip.o: test/minigzip.c ptlibzippy.h ptzippyconf.h + $(CC) $(CFLAGS) -I. -c -o $@ test/minigzip.c + +ptlibzippyrc.o: win32/ptlibzippy1.rc + $(RC) $(RCFLAGS) -o $@ win32/ptlibzippy1.rc + +.PHONY: install uninstall clean + +install: ptlibzippy.h ptzippyconf.h $(STATICLIB) $(IMPLIB) + @if test -z "$(DESTDIR)$(INCLUDE_PATH)" -o -z "$(DESTDIR)$(LIBRARY_PATH)" -o -z "$(DESTDIR)$(BINARY_PATH)"; then \ + echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \ + exit 1; \ + fi + -@mkdir -p '$(DESTDIR)$(INCLUDE_PATH)' + -@mkdir -p '$(DESTDIR)$(LIBRARY_PATH)' '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig + -if [ "$(SHARED_MODE)" = "1" ]; then \ + mkdir -p '$(DESTDIR)$(BINARY_PATH)'; \ + $(INSTALL) $(SHAREDLIB) '$(DESTDIR)$(BINARY_PATH)'; \ + $(INSTALL) $(IMPLIB) '$(DESTDIR)$(LIBRARY_PATH)'; \ + fi + -$(INSTALL) ptlibzippy.h '$(DESTDIR)$(INCLUDE_PATH)' + -$(INSTALL) ptzippyconf.h '$(DESTDIR)$(INCLUDE_PATH)' + -$(INSTALL) $(STATICLIB) '$(DESTDIR)$(LIBRARY_PATH)' + sed \ + -e 's|@prefix@|${prefix}|g' \ + -e 's|@exec_prefix@|${exec_prefix}|g' \ + -e 's|@libdir@|$(LIBRARY_PATH)|g' \ + -e 's|@sharedlibdir@|$(LIBRARY_PATH)|g' \ + -e 's|@includedir@|$(INCLUDE_PATH)|g' \ + -e 's|@VERSION@|'`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' ptlibzippy.h`'|g' \ + ptlibzippy.pc.in > '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig/ptlibzippy.pc + +uninstall: + -if [ "$(SHARED_MODE)" = "1" ]; then \ + $(RM) '$(DESTDIR)$(BINARY_PATH)'/$(SHAREDLIB); \ + $(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(IMPLIB); \ + fi + -$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/ptlibzippy.h + -$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/ptzippyconf.h + -$(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(STATICLIB) + +clean: + -$(RM) $(STATICLIB) + -$(RM) $(SHAREDLIB) + -$(RM) $(IMPLIB) + -$(RM) *.o + -$(RM) *.exe + -$(RM) foo.gz + +adler32.o: ptlibzippy.h ptzippyconf.h +compress.o: ptlibzippy.h ptzippyconf.h +crc32.o: crc32.h ptlibzippy.h ptzippyconf.h +deflate.o: deflate.h ptzippyutil.h ptlibzippy.h ptzippyconf.h +gzclose.o: ptlibzippy.h ptzippyconf.h ptzippyguts.h +gzlib.o: ptlibzippy.h ptzippyconf.h ptzippyguts.h +gzread.o: ptlibzippy.h ptzippyconf.h ptzippyguts.h +gzwrite.o: ptlibzippy.h ptzippyconf.h ptzippyguts.h +inffast.o: ptzippyutil.h ptlibzippy.h ptzippyconf.h inftrees.h inflate.h inffast.h +inflate.o: ptzippyutil.h ptlibzippy.h ptzippyconf.h inftrees.h inflate.h inffast.h +infback.o: ptzippyutil.h ptlibzippy.h ptzippyconf.h inftrees.h inflate.h inffast.h +inftrees.o: ptzippyutil.h ptlibzippy.h ptzippyconf.h inftrees.h +trees.o: deflate.h ptzippyutil.h ptlibzippy.h ptzippyconf.h trees.h +uncompr.o: ptlibzippy.h ptzippyconf.h +ptzippyutil.o: ptzippyutil.h ptlibzippy.h ptzippyconf.h |
