📄 makefile
字号:
##############################################################################
# Makefile
# used to build ippcompress sample
#
# Control variables
# CC - Lets you to choose Microsoft or Intel compiler.
# Default is Intel compiler, set it to "cl" to
# build with Microsoft one
#
# LINKAGE - lets you to choose which IPP libraries to link,
# static or dynamic. Default is DLL libraries
#
## Name of the application to build
BinName = ippcompress_gzip.exe
BinName1 = ippcompress_zlib.exe
OBJS = $(ObjDir)\ippcompress.obj $(ObjDir)\ipp_zlib.obj
OBJS1= $(ObjDir1)\ippcompress.obj $(ObjDir1)\ipp_zlib.obj
SrcDir = .\src
## Directory name for obj-files
ObjDir = .\_obj\$(ARCH)
ObjDir1= .\_obj1\$(ARCH)
## Directory name for exe-files
BinDir = .\bin\$(ARCH)
ResDir = .\res
## When Intel C++ compiler is used, CC variable should be set to CC=icl.exe
CC = icl.exe
LINK32 = link.exe
RC = rc.exe
!IF "$(ARCH)"=="IA32"
LIB_ARCH =
LINK_ARCH = I386
!ENDIF
!IF "$(ARCH)"=="IA64"
LIB_ARCH = 64
LINK_ARCH = IA64
!ENDIF
!IF "$(ARCH)"=="EM64T"
LIB_ARCH = EM64T
LINK_ARCH = AMD64
!ENDIF
!IF "$(LINKAGE)" == ""
LINKAGE = static
!ENDIF
##############################################################################
!IF "$(ARCH)"=="IA64"
IPPLIB = ippcore64l.lib ippdci7l.lib ippsi7l.lib bufferoverflowu.lib \
!ENDIF
!IF "$(ARCH)"=="EM64T"
IPPLIB = ippcoreem64tl.lib ippdcemergedem64t.lib ippdcmergedem64t.lib ippsemergedem64t.lib ippsmergedem64t.lib bufferoverflowu.lib \
!ENDIF
!IF "$(ARCH)"=="IA32"
IPPLIB = ippcorel.lib ippdcmerged.lib ippdcemerged.lib ippsmerged.lib ippsemerged.lib \
!ENDIF
!IF "$(LINKAGE)" == "dynamic"
OMPLIB = libguide40.lib
!ENDIF
SYSLIB = kernel32.lib user32.lib gdi32.lib vfw32.lib shell32.lib
CFLAGS = /nologo /c /W3 /O2 /MD /EHsc /GS
!IF "$(CC)" == "icl.exe" || "$(CC)" == "ecl.exe"
CFLAGS = $(CFLAGS) /Qopenmp /Qwd9,171,188,593,810,981,1418
!ENDIF
CINCLUDE = /I "$(SrcDir)"
CDEFINES = /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "STRICT" /D "NDEBUG" /D "_MBCS"
!IF "$(ARCH)"=="IA64"
CDEFINES = $(CDEFINES) /D "WIN64" /D "_WIN64"
!ENDIF
!IF "$(ARCH)"=="EM64T"
CDEFINES = $(CDEFINES) /D "WIN64" /D "_WIN64" /D "_AMD64_"
!ENDIF
################################################################
all : prepare build
{$(SrcDir)}.c{$(ObjDir)}.obj::
$(CC) $(CFLAGS) $(CINCLUDE) $(CDEFINES) /D "GZIP" /D "GUNZIP" /Fo$(ObjDir)\ $<
{$(SrcDir)}.c{$(ObjDir1)}.obj::
$(CC) $(CFLAGS) $(CINCLUDE) $(CDEFINES) /Fo$(ObjDir1)\ $<
$(BinDir)\$(BinName) : $(OBJS)
$(LINK32) /nologo \
/subsystem:console \
/machine:$(LINK_ARCH) \
$(SYSLIB) \
!IF "$(CC)" == "icl.exe"
$(OMPLIB) \
!ENDIF
$(IPPLIB) \
$(OBJS) \
/out:$@
$(BinDir)\$(BinName1) : $(OBJS1)
$(LINK32) /nologo \
/subsystem:console \
/machine:$(LINK_ARCH) \
$(SYSLIB) \
!IF "$(CC)" == "icl.exe"
$(OMPLIB) \
!ENDIF
$(IPPLIB) \
$(OBJS1) \
/out:$@
build : $(BinDir)\$(BinName) $(BinDir)\$(BinName1)
prepare :
@if not exist $(ObjDir) mkdir $(ObjDir)
@if not exist $(ObjDir1) mkdir $(ObjDir1)
@if not exist $(BinDir) mkdir $(BinDir)
clean:
@echo Cleaning ...
@if exist $(ObjDir) rd /s /q $(ObjDir)
@if exist $(BinDir) rd /s /q $(BinDir)
@if exist $(ObjDir1) rd /s /q $(ObjDir1)
help:
@echo Usage of this Makefile:
@echo "nmake ARCH = [ IA32 | IA64 | EM64T ]" - prepare and build phases
@echo "nmake prepare ARCH = [ IA32 | IA64 | EM64T ]" - creates directories
@echo "nmake clean ARCH = [ IA32 | IA64 | EM64T ]" - removes directories created
@echo "nmake build ARCH = [ IA32 | IA64 | EM64T ]" - builds
@echo "nmake help" - help
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -