From 34193c54d8afaaacbee9f4f5023d26b88d1d126d Mon Sep 17 00:00:00 2001 From: maxcodehack Date: Thu, 25 Feb 2021 15:48:52 +0000 Subject: [PATCH] Add minizip and miniunz git-svn-id: svn://kolibrios.org@8615 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../fs/minizip/{Makefile => Makefile.miniunz} | 4 ++-- programs/fs/minizip/Makefile.minizip | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) rename programs/fs/minizip/{Makefile => Makefile.miniunz} (82%) create mode 100755 programs/fs/minizip/Makefile.minizip diff --git a/programs/fs/minizip/Makefile b/programs/fs/minizip/Makefile.miniunz similarity index 82% rename from programs/fs/minizip/Makefile rename to programs/fs/minizip/Makefile.miniunz index c959a2b365..027d3e1a71 100755 --- a/programs/fs/minizip/Makefile +++ b/programs/fs/minizip/Makefile.miniunz @@ -12,8 +12,8 @@ LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib OBJECTS = miniunz.o unzip.o ioapi.o kos_dir.o default: $(OBJECTS) - kos32-ld $(LDFLAGS) $(LIBPATH) --subsystem console -o unz $(OBJECTS) -lgcc -lc.dll -lz - objcopy unz -O binary + kos32-ld $(LDFLAGS) $(LIBPATH) --subsystem console -o miniunz $(OBJECTS) -lgcc -lc.dll -lz + objcopy miniunz -O binary %.o : %.c Makefile $(CC) $(CFLAGS) $(INCLUDES) -o $@ $< diff --git a/programs/fs/minizip/Makefile.minizip b/programs/fs/minizip/Makefile.minizip new file mode 100755 index 0000000000..0628b36ee3 --- /dev/null +++ b/programs/fs/minizip/Makefile.minizip @@ -0,0 +1,22 @@ +CC = kos32-gcc +LD = kos32-ld + +SDK_DIR = $(abspath ../../../contrib/sdk) + +CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -Dunix +LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds --image-base 0 + +INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I $(SDK_DIR)/sources/zlib +LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib + +OBJECTS = minizip.o zip.o ioapi.o kos_dir.o + +default: $(OBJECTS) + kos32-ld $(LDFLAGS) $(LIBPATH) --subsystem console -o minizip $(OBJECTS) -lgcc -lc.dll -lz + objcopy minizip -O binary + +%.o : %.c Makefile + $(CC) $(CFLAGS) $(INCLUDES) -o $@ $< + +clean: + rm *.o