2021-06-10 00:00:58 +00:00
|
|
|
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
|
|
|
|
#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘
|
2021-06-24 19:31:26 +00:00
|
|
|
|
2021-06-10 00:00:58 +00:00
|
|
|
PKGS += THIRD_PARTY_ZIP
|
|
|
|
|
|
|
|
THIRD_PARTY_ZIP_FILES = $(wildcard third_party/infozip/zip/*) third_party/infozip/zip/unix/unix.c
|
|
|
|
THIRD_PARTY_ZIP_SRCS_C = $(filter %.c,$(THIRD_PARTY_ZIP_FILES))
|
|
|
|
THIRD_PARTY_ZIP = $(THIRD_PARTY_ZIP_COMS) $(THIRD_PARTY_ZIP_COMS:%=%.dbg)
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIP_COMS = \
|
2021-06-10 00:00:58 +00:00
|
|
|
o/$(MODE)/third_party/infozip/zip.com \
|
|
|
|
o/$(MODE)/third_party/infozip/zipsplit.com \
|
|
|
|
o/$(MODE)/third_party/infozip/zipnote.com \
|
|
|
|
o/$(MODE)/third_party/infozip/zipcloak.com
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIP_OBJS = $(sort \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(THIRD_PARTY_ZIP_COM_OBJS) \
|
2021-06-24 19:31:26 +00:00
|
|
|
$(THIRD_PARTY_ZIPCLOAK_OBJS) \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(THIRD_PARTY_ZIPNOTE_OBJS) \
|
2021-06-24 19:31:26 +00:00
|
|
|
$(THIRD_PARTY_ZIPSPLIT_OBJS) \
|
2021-06-10 00:00:58 +00:00
|
|
|
)
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIP_UTIL_OBJS1 = \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/globals.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/unix/unix_.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/zipfile_.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/fileio_.o \
|
2021-06-10 00:00:58 +00:00
|
|
|
o/$(MODE)/third_party/infozip/zip/util_.o
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIP_UTIL_OBJS2 = \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/crypt_.o \
|
2021-06-10 00:00:58 +00:00
|
|
|
o/$(MODE)/third_party/infozip/zip/crc32_.o
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIP_UTIL_OBJS = \
|
|
|
|
$(THIRD_PARTY_ZIP_UTIL_OBJS1) \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(THIRD_PARTY_ZIP_UTIL_OBJS2)
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIP_COM_OBJS = \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/zip.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/zipfile.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/zipup.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/fileio.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/util.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/globals.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/crypt.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/ttyio.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/unix/unix.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/crc32.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/zbz2err.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/deflate.o \
|
2021-06-10 00:00:58 +00:00
|
|
|
o/$(MODE)/third_party/infozip/zip/trees.o
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIPSPLIT_OBJS = \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/zipsplit.o \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(THIRD_PARTY_ZIP_UTIL_OBJS1)
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIPNOTE_OBJS = \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/zipnote.o \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(THIRD_PARTY_ZIP_UTIL_OBJS1)
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIPCLOAK_OBJS = \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/zipcloak.o \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/ttyio.o \
|
|
|
|
$(THIRD_PARTY_ZIP_UTIL_OBJS1) \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(THIRD_PARTY_ZIP_UTIL_OBJS2)
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIP_LARGE_OBJS = \
|
|
|
|
o/$(MODE)/third_party/infozip/zip/zip.o \
|
2021-06-10 00:00:58 +00:00
|
|
|
o/$(MODE)/third_party/infozip/zip/zipsplit.o \
|
2021-06-24 19:31:26 +00:00
|
|
|
o/$(MODE)/third_party/infozip/zip/fileio.o \
|
2021-06-10 00:00:58 +00:00
|
|
|
o/$(MODE)/third_party/infozip/zip/fileio_.o
|
|
|
|
|
|
|
|
o/$(MODE)/third_party/infozip/zip/%_.o: third_party/infozip/zip/%.c
|
|
|
|
@$(COMPILE) -AOBJECTIFY.c $(OBJECTIFY.c) $(OUTPUT_OPTION) -DUTIL $<
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
$(THIRD_PARTY_ZIP_OBJS): \
|
|
|
|
OVERRIDE_CFLAGS += \
|
|
|
|
-DUNIX \
|
|
|
|
-DMMAP \
|
2021-06-10 00:00:58 +00:00
|
|
|
-DUNICODE_SUPPORT \
|
|
|
|
-DUSE_EF_UT_TIME \
|
2021-06-24 19:31:26 +00:00
|
|
|
-DLARGE_FILE_SUPPORT \
|
2021-06-10 00:00:58 +00:00
|
|
|
-DHAVE_DIRENT_H \
|
|
|
|
-DHAVE_TERMIOS_H \
|
|
|
|
-DNO_BZIP2_SUPPORT
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
$(THIRD_PARTY_ZIP_LARGE_OBJS): \
|
2021-06-10 00:00:58 +00:00
|
|
|
OVERRIDE_CFLAGS += -DSTACK_FRAME_UNLIMITED
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIP_DIRECTDEPS = \
|
2021-06-10 00:00:58 +00:00
|
|
|
LIBC_ERRNO \
|
|
|
|
LIBC_LIMITS \
|
|
|
|
LIBC_ALG \
|
|
|
|
LIBC_FMT \
|
|
|
|
LIBC_STR \
|
|
|
|
LIBC_MEM \
|
|
|
|
LIBC_LOG \
|
|
|
|
LIBC_CALLS \
|
|
|
|
LIBC_STDIO \
|
|
|
|
LIBC_TIME \
|
|
|
|
LIBC_UNICODE
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
THIRD_PARTY_ZIP_DEPS := \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(call uniq,$(foreach x,$(THIRD_PARTY_ZIP_DIRECTDEPS),$($(x))))
|
|
|
|
|
|
|
|
o/$(MODE)/third_party/infozip/zip.com.dbg: \
|
|
|
|
$(THIRD_PARTY_ZIP_DEPS) \
|
|
|
|
$(THIRD_PARTY_ZIP_COM_OBJS) \
|
2021-06-24 19:31:26 +00:00
|
|
|
$(CRT) \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(APE)
|
|
|
|
@$(APELINK)
|
|
|
|
|
|
|
|
o/$(MODE)/third_party/infozip/zipsplit.com.dbg: \
|
|
|
|
$(THIRD_PARTY_ZIP_DEPS) \
|
2021-06-24 19:31:26 +00:00
|
|
|
$(THIRD_PARTY_ZIPSPLIT_OBJS) \
|
|
|
|
$(CRT) \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(APE)
|
|
|
|
@$(APELINK)
|
|
|
|
|
|
|
|
o/$(MODE)/third_party/infozip/zipnote.com.dbg: \
|
|
|
|
$(THIRD_PARTY_ZIP_DEPS) \
|
|
|
|
$(THIRD_PARTY_ZIPNOTE_OBJS) \
|
2021-06-24 19:31:26 +00:00
|
|
|
$(CRT) \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(APE)
|
|
|
|
@$(APELINK)
|
|
|
|
|
|
|
|
o/$(MODE)/third_party/infozip/zipcloak.com.dbg: \
|
2021-06-24 19:31:26 +00:00
|
|
|
$(THIRD_PARTY_ZIP_DEPS) \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(THIRD_PARTY_ZIPCLOAK_OBJS) \
|
2021-06-24 19:31:26 +00:00
|
|
|
$(CRT) \
|
2021-06-10 00:00:58 +00:00
|
|
|
$(APE)
|
|
|
|
@$(APELINK)
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
o/$(MODE)/host/third_party/infozip/zip.com.dbg: \
|
|
|
|
o/$(MODE)/third_party/infozip/zip.com.dbg
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
cp -f $< $@
|
|
|
|
|
|
|
|
o/$(MODE)/host/third_party/infozip/zip.com: \
|
|
|
|
o/$(MODE)/third_party/infozip/zip.com \
|
|
|
|
o/$(MODE)/host/third_party/infozip/zip.com.dbg
|
|
|
|
cp -f $< $@
|
|
|
|
$@ -h >/dev/null
|
|
|
|
|
2021-06-10 00:00:58 +00:00
|
|
|
.PHONY: o/$(MODE)/third_party/infozip
|
|
|
|
o/$(MODE)/third_party/infozip: $(THIRD_PARTY_ZIP)
|