⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smakefile

📁 给出了 zip 压缩算法的完整实现过程。
💻
📖 第 1 页 / 共 2 页
字号:
#===========================================================================# Makefile for Zip, ZipNote, ZipCloak, ZipSplit     AMIGA SAS/C Version 6.58# Version:  2.3                                     last revised:  24 Aug 98#===========================================================================# -John Bush, <John.Bush@East.Sun.COM>#         or: <JBush@Bix.COM># updated for SAS/C Version 6.56+ and AmigaDOS 3.1 (V40)# by Haidinger Walter, <walthaid@unix.ict.tuwien.ac.at># additional supplements and maintenance by Paul Kienitz# This makefile should work with at least AmigaDOS 2.04 (V37)  (not tested)# and will probably not work with AmigaDOS 1.3 (V34)# If you have any improvements, critics or else please feel free to mail.# Any response is appreciated. Haidinger Walter <walthaid@unix.ict.tuwien.ac.at># Available targets:# all           builds all executeables below# zip           builds zip executeable# zipsplit      builds zipsplit executeable# zipcloak      builds zipcloak executeable# zipnote       builds zipnote executeable# ziplm         builds low memory version of zip executable# clean         remove all files created by the compilation# spotless      like clean target but removes binaries too########################### USER MACRO DEFINITIONS ############################ *** NOTE ***# The assembly version is not implemented yet.# (Un)commenting the assembler macros has no effect unless the# file dependencies are changed too.# Most of the amiga/*.a files do not assmble with 68000 instructions.# Any help is appreciated, of course.# Set the processor to generate code for.# Compiler:    ANY 68000 68010 68020 68030 68040 68060# Assembler:     0     0     1     2     3     4   n/a# Defaults: ANY and 0#CUSECPU = ANYAUSECPU = 0# UNCOMMENT to use 68020 instructions in the assembly version of deflate.o# Only use if code is generated for 68020 or higher processors above.# Note: You could use CPUTEST too to enable runtime cpu detection.# However, it is not recommended since both 68000 and 68020 code will be# included which would be an unnecessary increase in size.# (see amiga/deflate.a for more information)##AUSE020 = CPU020# To disable the assembler replacements and use the standard C source,# you have to change the Zip and ZipLM dependencies. See below for details.# (remember that assembler use is *not* implemented yet)# Uncomment both CUTIL and LUTIL to make use of utility.library of OS 2.04+# The utility.library is *not* used for UnZipSFX to ensure maximum portability# between the different Amiga systems (minimal config: 68000 and OS 1.2).# You can change this by adding the $(LUTIL) macro in the UnZipSFX linking# rules (See below: Final output targets, UnZipSFX:).# WARNINGS when using the utility library:# 1. All Executables will *only* work with AmigaDOS 2.04 (v37) or higher.# 2. You *need not* compile/link with short-integers using the#    utility.library. It will crash your machine. See Libraries below.## Default: commented (not used)##CUTIL = UTILLIB DEFINE=_UTILLIB#LUTIL = WITH SC:LIB/utillib.with    # include necessary linker defines# Choose one stack-handling method (default=faster)# StackExtend: Dynamic runtime stack extension. You won't notice stack overflows.# StackCheck: On a stack overflow a requester appears which allows you to exit.# Note that either stack watching will slow down your executable because of the# extra code run on each function entry. On the other hand, you won't crash# anymore due to stack overflows. However, you should not have *any* stack# problems with Info-ZIP programs if you raise your stack to 10000 (which I'd# recommend as a minimum default stack for all applications) or more using the# shell stack command. Type 'Stack 20000' or add it to your S:Shell-Startup.# BTW: Typing 'Stack' prints your current stack size.#CSTACK = NOSTACKCHECK STACKEXTEND     # slow, but always works#CSTACK = STACKCHECK NOSTACKEXTEND    # slow, requester & graceful exit#CSTACK = NOSTACKCHECK NOSTACKEXTEND  # faster but relies on larger stack (>=10K)## LIBRARIES# ---------# Choose one DATAOPTS , SASLIB , ASMOPTS and LSTARTUP# Always comment/uncomment all macros of a set.# Library to use with near data and 2-byte integers# Notes: o  slower than 4-byte integers with 68000 cpu#        o  *not* recommended due to poor overall performance#        o  see comment in amiga/osdep.h#DATAOPTS = DATA=NEAR SHORTINTEGERS DEF=_NEAR_DATA#SASLIB   = scs#ASMOPTS  = -dINT16#LSTARTUP = cres.o# Library to use with near data and 4-byte integers (DEFAULT)# *** use this with the utility.library ***DATAOPTS = DATA=NEAR DEF=_NEAR_DATASASLIB   = scASMOPTS  =LSTARTUP = cres.o# Library to use with far data and 2-byte integers# use if DYN_ALLOC is not defined# old default - far data always works but is slower#DATAOPTS = DATA=FAR SHORTINTEGERS DEF=_FAR_DATA#SASLIB   = scsnb#ASMOPTS  = -dINT16#LSTARTUP = c.o# Library to use with far data and 4-byte integers# if everything else fails: try this#DATAOPTS = DATA=FAR DEF=_FAR_DATA#SASLIB   = scnb#ASMOPTS  =#LSTARTUP = c.o## DEBUGGING# ---------# Default: No debugging information added.# The three macros below will be overwritten if you choose to add# debug info, therefore no need to comment.CDBG = NODEBUG NOPROFILE NOCOVERAGE    # default: no debug infoADBG =LDBG = STRIPDEBUG                      # default: no debug info# Compiler and loader debug flags.  Uncomment as needed.  Recomment when done.# Optimization disabled for faster compilation (by using NOOPT)#CDBG1 = DEF=DEBUG DEF=DEBUG_TIME     # enables Info-Zip's debug output# Enable profiling and coverage when desired. Option COVERAGE commented# seperately because running coverage may corrupt your drive in case of a# system crash since a file 'cover.dat' is created in your working directory.# Note that the use of COVERAGE forces the use of the c.o startup module.#CDBG2 = PROFILE#CDBG3 = COVERAGE        # must use c.o startup code:#LSTARTUP = c.o          # Uncomment *only* when you use COVERAGE# *Uncomment* here macros CDBG, ADBG and LDBG to include debugging information#CDBG = $(CDBG1) $(CDBG2) $(CDBG3) ADDSYM DEBUG=FULLFLUSH STACKCHECK NOOPT#ADBG = DEBUG#LDBG = ADDSYM# Optional use of memwatch.library which can be found in your# sc:extras/memlib directory. Please read the short docs (memlib.doc).# Note that memwatch.library has a small bug: MWTerm() displays always# the first entry.# Get the latest version from aminet (dev/debug/memlib.lha) or# contact me to get the patch. Uncomment all macros to use.#CMEMLIB  = DEFINE=MWDEBUG=1       # define to enable library#LMEMLIB  = SC:LIB/memwatch.lib       # path to library#LSTARTUP = c.o                    # must use c.o with memlib!## MAPPING# -------# Map filenames used when mapping (no need to comment)#MAPFZ = zip.map                # Zip      map filenameMAPFN = zipnote.map            # ZipNote  map filenameMAPFC = zipcloak.map           # ZipCloak map filenameMAPFS = zipsplit.map           # ZipSplit map filenameMAPFL = ziplm.map              # Zip low memory version map filename# Map file output: Uncomment to highlight and bold headings.##MAPFSTYLE = FANCY# Map flags for each EXECUTABLE. Uncomment to enable mapping.# For map options please refer to:# SAS/C v6 manual, volume 1: user's guide, chapter 8, page 136: map# Default: all options enabled: f,h,l,o,s,x#                                 |-> options start here#LMAPZ = $(MAPFSTYLE) MAP $(MAPFZ) f,h,l,o,s,x   # Zip      maps#LMAPN = $(MAPFSTYLE) MAP $(MAPFN) f,h,l,o,s,x   # ZipNote  maps#LMAPC = $(MAPFSTYLE) MAP $(MAPFC) f,h,l,o,s,x   # ZipCloak maps#LMAPS = $(MAPFSTYLE) MAP $(MAPFS) f,h,l,o,s,x   # ZipSplit maps#LMAPL = $(MAPFSTYLE) MAP $(MAPFL) f,h,l,o,s,x   # Zip lowmem maps## LISTINGS# --------# Listfile-extensions for each executable (enter *with* dot)#LISTEXTZ = .lst   # extension for Zip listfilesLISTEXTU = .ulst  # extension for utility listfiles (ZipNote,ZipCloak,ZipSplit)LISTEXTL = .llst  # extension for Zip low memory listfiles# List files and cross references for each OBJECT.# Add/remove flags as needed. Not all listed by default.# Use LISTINCLUDES to determine the dependencies for smake#CLISTOPT = LISTHEADERS LISTMACROS # LISTSYSTEM LISTINCLUDESCXREFOPT = XHEAD XSYS## Uncomment to enable listing (default: commented)# *** WARNING: List files require *lots* of disk space!##CLIST = LIST $(CLISTOPT)#CXREF = XREF $(CXREFOPT)## SUPPRESSED COMPILER WARNINGS# ----------------------------# Compiler warnings to ignore## Warning 105 : module does not define any externally-known symbols# Warning 304 : Dead assignment eliminated...# Note    306 : ...function inlined...# Warning 317 : possibly uninitialized variable...# Comment to enable.#CIGNORE = IGNORE=105,304,306,317## OBJECT EXTENSIONS## Extensions used for objects of each executeable.# Transformation rules require unique extensions.# Enter *with* dot.#O  = .o     # extension for Zip     objectsOU = .uo    # extension for utility objects (ZipNote, ZipSplit and ZipCloak)OL = .lo    # extension for low memory Zip objects# Filename used to store converted options from environment variable# LOCAL_ZIP. Default: scoptions_local_zip#CWITHOPT = scoptions_local_zip# Filenames to store compiler options to prevent command line overflow## Common options file for Zip and other executablesCFILE = scoptions-zip# Temp filenames for object lists to load using linker "WITH" command.OBJLISTZ = zip_objlist.with            # Zip      object listOBJLISTN = zipnote_objlist.with        # ZipNote  object listOBJLISTC = zipcloak_objlist.with       # ZipCloak object listOBJLISTS = zipsplit_objlist.with       # ZipSplit object listOBJLISTL = ziplm_objlist.with          # Zip low-mem object list# Filenames to store linker options#LWITHZ = zip.lnk                       # zip      linker optionsLWITHN = zipnote.lnk                   # zipnote  linker optionsLWITHC = zipcloak.lnk                  # zipcloak linker optionsLWITHS = zipsplit.lnk                  # zipsplit linker optionsLWITHL = ziplm.lnk                     # zip low-mem linker options# Define AMIGA_BETA to print "Beta Notice" up front.  See tailor.h.# Undefine AMIGA_BETA when building a released version.#CDEFBETA = DEF=AMIGA_BETA###################################### NOTHING TO CHANGE BEYOND HERE ... ####################################### (except for C/asm dependencies)# Define MEDIUM_MEM for production release (per Paul Kienitz).# This reduces runtime memory requirement but not speed or compression.# Note: Do *not* use BIG_MEM or MMAP since it isn't yet supported by the        assembler version of deflate.c : amiga/deflate.aCUSEMEM = DEF=MEDIUM_MEMAUSEMEM = -DMEDIUM_MEM       # for asm deflate.o, must match above# Defines for building low-memory use version of ZipWSIZEL   = WSIZE=4096     # deflate.c window size for low-mem versionCLOWMEM = DEF=SMALL_MEM DEF=$(WSIZEL)ALOWMEM = -DSMALL_MEM   -D$(WSIZEL)  # for asm deflate.o, must match above# Compiler definitions#CC = sc## Optimizer flags#OPTPASSES = 6     # set number of global optimizer passes#OPT1 = OPT OPTINL OPTINLOCAL OPTTIME OPTLOOP OPTSCHEDOPT2 = OPTCOMP=$(OPTPASSES) OPTDEP=$(OPTPASSES) OPTRDEP=$(OPTPASSES)OPT  = $(OPT1) $(OPT2)# Compiler flags#CDEFINES = $(CMEMLIB) $(CDEFBETA) DEF=AMIGACOPTIONS = $(DATAOPTS) CODE=NEAR CPU=$(CUSECPU) VERBOSE PARAMETERS=BOTH NOMINCCOPTIONS = $(COPTIONS) ERRORREXX NOERRORCONSOLE MEMSIZE=HUGE $(CLIST) $(CXREF)COPTIONS = $(COPTIONS) $(CSTACK) $(CUTIL) STRICT UNSCHAR NOICONS STRINGMERGECFLAGS = $(CDEFINES) $(COPTIONS) $(OPT) $(CDBG) $(CIGNORE)# Linker definitions#  See SASLIB definition above#LD = slink# special linker flags for pure (i.e. resident) binary.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -