?? makefile.dj1
字號:
# Makefile for Info-ZIP's unzip, zipinfo, funzip and unzipsfx# using djgpp v1.12m4. Tested with unzip550 by Christian Spieler## This Makefile is specifically tailored for GNU Make and GNU C and# may not work with a generic UNIX compatible Make utility.# Features use:# - pattern rules (%.o : %.c, etc.)# - GNUMake conditionals and functions (ifeq, $(patsubst,,),...)## To allow mixed use of real mode (16bit) vs. GO32 (32bit protected mode)# GNUMake utility and GCC driver, precautions have been taken to# limit command lines to the DOS 126 bytes limit.# In case you have an environment that supports long command lines# at all "interface" levels (e.g.: DJGPPv1 Gmake 3.71 and GO32 gcc.exe),# you may define the Makefile macro LONGARGS to take advantage of the# "long command lines" capability.# I have archived the fastest compilation (with LONGARGS support!) by# using both a real mode gnumake (private port) and the real mode# gcc.exe driver.## The Makefile allows the optional creation of standalone exectutables.# This has the advantage that unzip.exe does not rely on any other file,# but results in much larger executables.## Separators colon and <sp> are used in U**X, semi-colon and <sp> in DOS.VPATH=. msdosifdef NOASMUSE_ASMCRC=elseUSE_ASMCRC=1endif# UnZip flagsLOC=-DDOS $(ASMFLG) $(LOCAL_UNZIP)CC=gccLD=$(CC)CPPFLAGS=-I. $(LOC)ASFLAGS=$(CPPFLAGS)CFLAGS=-Wall -O2 -m486 $(CPPFLAGS)FUN_FLAGS=$(CFLAGS) -DFUNZIPSFX_FLAGS=$(CFLAGS) -DSFXLDFLAGS=-s -vLIBS=-lpcSTRIP=strip# Define the STANDALONE macro to create executables which can be# used without any external extender file.# >>> NOTE: Either copy the go32 extender into your build directory, or# >>> edit the STUBIFY macro and add the correct path to "go32.exe".ifdef STANDALONESTUBIFY=coff2exe -s go32.exeelseSTUBIFY=coff2exeendif# general-purpose stuff# If cp.exe is not found change to CP=copy /Y .CP = cp -f# If install.exe is not found change to INSTALL=$(CP) .INSTALL=install# The default value of RM is "rm -f" . If rm.exe is not found, uncomment# the following:RM=delE = .exeO = .oM=msdos# defaults for crc32 stuff and system dependent headersifdef USE_ASMCRCASMFLG = -DASM_CRCCRC32 = crc_gccelseASMFLG =CRC32 = crc32endif# object filesOBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$OOBJS2 = extract$O fileio$O globals$O inflate$O list$O match$OOBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$OOBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$OOBJX1 = unzipsfx$O $(CRC32)$O crctab_$O crypt_$O extract_$O fileio_$OOBJX2 = globals_$O inflate_$O match_$O process_$O ttyio_$O $M_$OOBJX = $(OBJX1) $(OBJX2)OBJF = funzip$O $(CRC32)$O crypt-$O globals-$O inflate-$O ttyio-$OOBJECTS_ALL = $(sort $(OBJS) $(OBJX) $(OBJF) crc32$O crc_gcc$O)# Common header files included by all C sources:UNZIP_H = unzip.h unzpriv.h globals.h msdos/doscfg.h# executable filesUNZIPS = unzip$E zipinfo$E funzip$E unzipsfx$E# pattern rules to compile the sources:%$O : %.c $(CC) $(CFLAGS) -c $< -o $@%-$O: %.c $(CC) $(FUN_FLAGS) -c $< -o $@%_$O: %.c $(CC) $(SFX_FLAGS) -c $< -o $@%sfx$O: %.c $(CC) $(SFX_FLAGS) -c $< -o $@all: unzipsunzips: unzip$E zipinfo$E funzip$E unzipsfx$Eunzip$E: $(OBJS)ifdef LONGARGS $(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o unzipelse echo $(OBJS1) > unzip.rsp echo $(OBJS2) >> unzip.rsp echo $(OBJS3) $M$O >> unzip.rsp echo $(LIBS) >> unzip.rsp $(LD) $(LDFLAGS) -o unzip @unzip.rsp $(RM) unzip.rspendif $(STRIP) unzip $(STUBIFY) unzip stubedit $@ globbing=no $(RM) unzipzipinfo$E: unzip$E coff2exe -g zipinfo stubedit $@ runfile=unzip globbing=nofunzip$E: $(OBJF) $(LD) $(LDFLAGS) $(OBJF) -o funzip $(STRIP) funzip $(STUBIFY) funzip $(RM) funzipunzipsfx$E: $(OBJX)ifdef LONGARGS $(LD) $(LDFLAGS) $(OBJX) $(LIBS) -o unzipsfxelse echo $(OBJX1) > unzipsfx.rsp echo $(OBJX2) >> unzipsfx.rsp echo $(LIBS) >> unzipsfx.rsp $(LD) $(LDFLAGS) -o unzipsfx @unzipsfx.rsp $(RM) unzipsfx.rspendif $(STRIP) unzipsfx $(STUBIFY) unzipsfx stubedit $@ globbing=no $(RM) unzipsfx# explicit compilation instructions:crc_gcc$O: crc_i386.S # 32bit, GNU AS $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S# BIN_PATH may be defined in djgpp.env [make] or defined above.install: $(INSTALL) $(UNZIPS) $(BIN_PATH)uninstall: cd $(BIN_PATH); $(RM) $(UNZIPS)clean:ifeq ($(firstword $(RM)), del) $(RM) *$O $(RM) *.zipelse $(RM) $(OBJECTS_ALL) *.zipendif# Source dependencies:crc_gcc$O: crc_i386.Scrc32$O: crc32.c $(UNZIP_H) zip.hcrctab$O: crctab.c $(UNZIP_H) zip.hcrctab_$O: crctab.c $(UNZIP_H) zip.hcrypt$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.hcrypt-$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.hcrypt_$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.henvargs$O: envargs.c $(UNZIP_H)explode$O: explode.c $(UNZIP_H)extract$O: extract.c $(UNZIP_H) crypt.hextract_$O: extract.c $(UNZIP_H) crypt.hfileio$O: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.hfileio_$O: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.hfunzip$O: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.hglobals$O: globals.c $(UNZIP_H)globals-$O: globals.c $(UNZIP_H)globals_$O: globals.c $(UNZIP_H)inflate$O: inflate.c inflate.h $(UNZIP_H)inflate-$O: inflate.c inflate.h $(UNZIP_H) crypt.hinflate_$O: inflate.c inflate.h $(UNZIP_H)list$O: list.c $(UNZIP_H)match$O: match.c $(UNZIP_H)match_$O: match.c $(UNZIP_H)msdos$O: msdos/msdos.c $(UNZIP_H)msdos_$O: msdos/msdos.c $(UNZIP_H)process$O: process.c $(UNZIP_H)process_$O: process.c $(UNZIP_H)ttyio$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.httyio-$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.httyio_$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.hunreduce$O: unreduce.c $(UNZIP_H)unshrink$O: unshrink.c $(UNZIP_H)unzip$O: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.hunzipsfx$O: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.hzipinfo$O: zipinfo.c $(UNZIP_H)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -