Archive-Unzip-Burst

 view release on metacpan or  search on metacpan

unzip-6.0/win32/Makefile  view on Meta::CPAN

lflags  = /INCREMENTAL:NO /PDB:NONE /NOLOGO

# for Windows applications that use the C Run-Time libraries
conlflags = $(lflags) /subsystem:console
guilflags = $(lflags) /subsystem:windows
dlllflags = $(lflags) /DLL

# -------------------------------------------------------------------------
# Target Module Dependent Link Debug Flags - must be specified after $(link)
#
# These switches allow the inclusion of the necessary symbolic information
# for source level debugging with WinDebug, profiling and/or performance
# tuning.
#
# Note: Debug switches are on by default.
# -------------------------------------------------------------------------
!IFDEF NODEBUG
ldebug = /RELEASE
!ELSE
!IFDEF PROFILE
ldebug = -debug:mapped,partial -debugtype:coff
!ELSE
!IFDEF TUNE
ldebug = -debug:mapped,partial -debugtype:coff
!ELSE
ldebug = -debug:full -debugtype:cv
!ENDIF
!ENDIF
!ENDIF

!ifdef PROFILEINFO
ldebug = $(ldebug) /PROFILE
!endif

!ifdef SYM
ldebug = $(ldebug) /DEBUG:FULL /DEBUGTYPE:CV
cdebug = $(cdebug) -Zi
cdbgsz = $(cdbgsz) -Zi
!endif

# When using zlib and/or bzip2 external decompression code DLLs, we want
# to link against the dll version of the C runtime library.
!IF defined(USEZLIBDLL) || defined(USEBZ2DLL) || defined(USE_DLLRUNTIME)
LINK_CRTDLL=1
!UNDEF DLLSTANDALONE
!ELSE
LINK_CRTDLL=0
!ENDIF

!IF $(LINK_CRTDLL) == 1
# Using zlib DLL as decompression core (and/or bzip2 decompression dll)
# implies linking all executables against the DLL version of the C RTL.
cvars_iz = $(cvarsdll) $(CF_LOC)
cvars_izdll = $(cvarsdll) $(CF_LOC)
conlibs_iz = $(conlibsdll) $(ZLIBLIBDLL) $(BZIPLIBEXE)
conlibs_izdll = $(conlibsdll) $(ZLIBLIBDLL) $(BZIPLIBDLL)
guilibs_iz = $(guilibsdll) $(ZLIBLIBDLL) $(BZIPLIBEXE)
!ELSE
# With the default setup (using Info-ZIP's own inflate code and/or static
# external decompression code), the executables are linked against the
# single-thread static C-RTL library to get self-contained programs.
cvars_iz = $(cvars) $(CF_LOC)
conlibs_iz = $(conlibs) $(ZLIBLIB) $(BZIPLIBEXE)
guilibs_iz = $(guilibs) $(ZLIBLIB) $(BZIPLIBEXE)

!IFDEF DLLSTANDALONE
# The standalone variant of unzip32.dll is linked against the
# multithread-safe static C runtime library.
cvars_izdll = $(cvarsmt) $(CF_LOC)
conlibs_izdll = $(conlibsmt) $(ZLIBLIB) $(BZIPLIBDLL)
!ELSE
# The (normal) variant of unzip32.dll is linked against the import library
# of the multithread-safe C runtime dll.
# -> smaller dll size; efficient use of shared resources,
#    but requires the C RTL DLL msvcrt.dll to be installed at runtime
cvars_izdll = $(cvarsdll) $(CF_LOC)
conlibs_izdll = $(conlibsdll) $(ZLIBLIBDLL) $(BZIPLIBDLL)
!ENDIF
!ENDIF # ?(LINK_CRTDLL == 1)

CFLAGS_UN = $(cdebug) $(cflags) $(INC_BZ2LIB) $(cvars_iz)
CFLAGS_SX = $(cdbgsz) $(cflags) $(INC_BZ2LIB) $(cvars_iz) -DSFX
CFLAGS_FU = $(cdebug) $(cflags) $(cvars_iz) -DFUNZIP
CFLAGS_DL = $(cdebug) $(cflags) $(INC_BZ2LIB) $(cvars_izdll) -DWINDLL -DDLL
CFLAGS_DX = $(cdebug) $(cflags) $(INC_BZ2LIB) $(cvars_izdll)
CFLAGS_SL = $(cdbgsz) $(cflags) $(INC_BZ2LIB) $(cvars_iz) -DWINDLL -DDLL -DUNZIPLIB -DSFX
CFLAGS_GX = $(cdbgsz) $(cflags) $(cvars_iz) -DSFX
CFLAGS_LB = $(cdebug) $(cflags) $(INC_BZ2LIB) $(cvars_iz) -DWINDLL -DDLL -DUNZIPLIB

# You may define VC6LINK if your linker recognizes "-opt:nowin98" alignment
# qualifier. (VC6 or newer). This option reduces the executable size of the
# SFX stubs (Instead, you might apply the free executable compressor "upx"
# which is far more efficient in reducing the stub's file size.)
!IFDEF VC6LINK
LINKOPT_SIZE = -opt:nowin98
!ENDIF

# How to compile sources
.c.obj:
	$(cc) $(CFLAGS_UN) -Fo$@ $<

# How to link
.obj.exe:
	$(link) $(ldebug) $(conlflags) $(conlibs_iz) $** -out:$@


# Default target is all command-line executables
unzips: unzip.exe funzip.exe unzipsfx.exe
guisfx: SFXWiz32.exe
dll: unzip32.dll
dllsample: uzexampl.exe
lib: $(OBDIR) $(OB)unzip32.lib
all: unzips guisfx dll dllsample lib


unzip.exe:	$(OBJU) $(BZIPLIBEXE) winapp.res
	$(link) $(ldebug) $(conlflags) $(conlibs_iz) $** -out:$@
unzipsfx.exe:	$(OBJX) $(BZIPLIBEXE)
	$(link) $(ldebug) $(conlflags) $(conlibs_iz) $** $(LINKOPT_SIZE) -out:$@
funzip.exe:	$(OBJF)
unzip32.dll:	$(OBJD) $(BZIPLIBDLL) windll.res $(WINDLL_DEF)
	$(link) $(ldebug) $(dlllflags) $(conlibs_izdll) -def:$(WINDLL_DEF) \
		$(OBJD) $(BZIPLIBDLL) windll.res -out:$@
unzsfx32.lib:	$(OBLX)
	$(link) -lib $** -out:$@
SFXWiz32.exe:	$(OBGX) sfxwiz.res unzsfx32.lib $(BZIPLIBEXE)
	$(link) $(ldebug) $(guilflags) $(guilibs_iz) \
		$(OBGX) sfxwiz.res unzsfx32.lib $(LINKOPT_SIZE) -out:$@
uzexampl.exe:	uzexampl.obj
	$(link) $(ldebug) $(conlflags) $(conlibs) version.lib $** -out:$@
$(OB)unzip32.lib:	$(OBJB)
	$(link) -lib $** -out:$@



( run in 0.640 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )