From 6bfbed636d6eabf6d10e43341855ac6470e31104 Mon Sep 17 00:00:00 2001 From: jinfeihan57 Date: Sun, 31 Jul 2022 15:13:11 +0800 Subject: [PATCH] using LF not CRLF --- CPP/7zip/7zip_gcc.mak | 2894 ++++++++++++++++++++--------------------- 1 file changed, 1447 insertions(+), 1447 deletions(-) diff --git a/CPP/7zip/7zip_gcc.mak b/CPP/7zip/7zip_gcc.mak index 1f4681c5..4d6038b5 100644 --- a/CPP/7zip/7zip_gcc.mak +++ b/CPP/7zip/7zip_gcc.mak @@ -1,1447 +1,1447 @@ -# USE_CLANG=1 -# USE_ASM = 1 -# IS_X64 = 1 -# MY_ARCH = -# USE_ASM= -# USE_JWASM=1 - -MY_ARCH_2 = $(MY_ARCH) - -MY_ASM = asmc -ifdef USE_JWASM -MY_ASM = jwasm -endif - - -PROGPATH = $(O)/$(PROG) -PROGPATH_STATIC = $(O)/$(PROG)s - - -ifneq ($(CC), xlc) -CFLAGS_WARN_WALL = -Wall -Wextra -Werror -endif - -# for object file -CFLAGS_BASE_LIST = -c -# CFLAGS_BASE_LIST = -S -CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \ - -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ - -fPIC - -# -D_7ZIP_AFFINITY_DISABLE - - -ifdef SystemDrive -IS_MINGW = 1 -endif - -ifdef IS_MINGW -LDFLAGS_STATIC_2 = -static -else -ifndef DEF_FILE -ifndef IS_NOT_STANDALONE -ifndef MY_DYNAMIC_LINK -ifneq ($(CC), clang) -LDFLAGS_STATIC_2 = -# -static -# -static-libstdc++ -static-libgcc -endif -endif -endif -endif -endif - -LDFLAGS_STATIC = -DNDEBUG $(LDFLAGS_STATIC_2) - -ifndef O - ifdef IS_MINGW - O=_o - else - O=_o - endif -endif - - -ifdef DEF_FILE - - -ifdef IS_MINGW -SHARED_EXT=.dll -LDFLAGS = -shared -DEF $(DEF_FILE) $(LDFLAGS_STATIC) -else -SHARED_EXT=.so -LDFLAGS = -shared -fPIC $(LDFLAGS_STATIC) -CC_SHARED=-fPIC -endif - - -else - -LDFLAGS = $(LDFLAGS_STATIC) -# -s is not required for clang, do we need it for GGC ??? -# -s - -#-static -static-libgcc -static-libstdc++ - -ifdef IS_MINGW -SHARED_EXT=.exe -else -SHARED_EXT= -endif - -endif - - -PROGPATH = $(O)/$(PROG)$(SHARED_EXT) -PROGPATH_STATIC = $(O)/$(PROG)s$(SHARED_EXT) - -ifdef IS_MINGW - -RM = del -MY_MKDIR=mkdir -LIB2_GUI = -lOle32 -lGdi32 -lComctl32 -lComdlg32 -LIB2 = -loleaut32 -luuid -ladvapi32 -lUser32 $(LIB2_GUI) - -CXXFLAGS_EXTRA = -DUNICODE -D_UNICODE -# -Wno-delete-non-virtual-dtor - -DEL_OBJ_EXE = -$(RM) $(O)\*.o $(O)\$(PROG).exe $(O)\$(PROG).dll - -else - -RM = rm -rf -MY_MKDIR=mkdir -p -CD = cd -CP = cp -d -# CFLAGS_BASE := $(CFLAGS_BASE) -D_7ZIP_ST -# CXXFLAGS_EXTRA = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE - -# LOCAL_LIBS=-lpthread -# LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl -LIB2 = -lpthread -ldl - - - -DEL_OBJ_EXE = -$(RM) $(O) - -endif - - - -CFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CFLAGS_BASE2) $(CFLAGS_BASE) $(CC_SHARED) -o $@ - - -ifdef IS_MINGW -AFLAGS_ABI = -coff -DABI_CDECL -AFLAGS = -nologo $(AFLAGS_ABI) -Fo$(O)/$(basename $( predef_cc_log -# $(CC) $(CFLAGS) -E -dM - < /dev/null -predef_cxx: - $(CXX) $(CFLAGS) -E $(SHOW_PREDEF) ../../../Common/CrcReg.cpp > predef_cxx_log - -predef: predef_cc predef_cxx - - -clean: - -$(DEL_OBJ_EXE) - $(RM) zstd_build - $(RM) lz4_build - $(RM) brotli_build - $(RM) lzham_build - make -C ../../../../C/lizard/lib clean - make -C ../../../../C/lz5/lib clean +# USE_CLANG=1 +# USE_ASM = 1 +# IS_X64 = 1 +# MY_ARCH = +# USE_ASM= +# USE_JWASM=1 + +MY_ARCH_2 = $(MY_ARCH) + +MY_ASM = asmc +ifdef USE_JWASM +MY_ASM = jwasm +endif + + +PROGPATH = $(O)/$(PROG) +PROGPATH_STATIC = $(O)/$(PROG)s + + +ifneq ($(CC), xlc) +CFLAGS_WARN_WALL = -Wall -Wextra -Werror +endif + +# for object file +CFLAGS_BASE_LIST = -c +# CFLAGS_BASE_LIST = -S +CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \ + -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -fPIC + +# -D_7ZIP_AFFINITY_DISABLE + + +ifdef SystemDrive +IS_MINGW = 1 +endif + +ifdef IS_MINGW +LDFLAGS_STATIC_2 = -static +else +ifndef DEF_FILE +ifndef IS_NOT_STANDALONE +ifndef MY_DYNAMIC_LINK +ifneq ($(CC), clang) +LDFLAGS_STATIC_2 = +# -static +# -static-libstdc++ -static-libgcc +endif +endif +endif +endif +endif + +LDFLAGS_STATIC = -DNDEBUG $(LDFLAGS_STATIC_2) + +ifndef O + ifdef IS_MINGW + O=_o + else + O=_o + endif +endif + + +ifdef DEF_FILE + + +ifdef IS_MINGW +SHARED_EXT=.dll +LDFLAGS = -shared -DEF $(DEF_FILE) $(LDFLAGS_STATIC) +else +SHARED_EXT=.so +LDFLAGS = -shared -fPIC $(LDFLAGS_STATIC) +CC_SHARED=-fPIC +endif + + +else + +LDFLAGS = $(LDFLAGS_STATIC) +# -s is not required for clang, do we need it for GGC ??? +# -s + +#-static -static-libgcc -static-libstdc++ + +ifdef IS_MINGW +SHARED_EXT=.exe +else +SHARED_EXT= +endif + +endif + + +PROGPATH = $(O)/$(PROG)$(SHARED_EXT) +PROGPATH_STATIC = $(O)/$(PROG)s$(SHARED_EXT) + +ifdef IS_MINGW + +RM = del +MY_MKDIR=mkdir +LIB2_GUI = -lOle32 -lGdi32 -lComctl32 -lComdlg32 +LIB2 = -loleaut32 -luuid -ladvapi32 -lUser32 $(LIB2_GUI) + +CXXFLAGS_EXTRA = -DUNICODE -D_UNICODE +# -Wno-delete-non-virtual-dtor + +DEL_OBJ_EXE = -$(RM) $(O)\*.o $(O)\$(PROG).exe $(O)\$(PROG).dll + +else + +RM = rm -rf +MY_MKDIR=mkdir -p +CD = cd +CP = cp -d +# CFLAGS_BASE := $(CFLAGS_BASE) -D_7ZIP_ST +# CXXFLAGS_EXTRA = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE + +# LOCAL_LIBS=-lpthread +# LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl +LIB2 = -lpthread -ldl + + + +DEL_OBJ_EXE = -$(RM) $(O) + +endif + + + +CFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CFLAGS_BASE2) $(CFLAGS_BASE) $(CC_SHARED) -o $@ + + +ifdef IS_MINGW +AFLAGS_ABI = -coff -DABI_CDECL +AFLAGS = -nologo $(AFLAGS_ABI) -Fo$(O)/$(basename $( predef_cc_log +# $(CC) $(CFLAGS) -E -dM - < /dev/null +predef_cxx: + $(CXX) $(CFLAGS) -E $(SHOW_PREDEF) ../../../Common/CrcReg.cpp > predef_cxx_log + +predef: predef_cc predef_cxx + + +clean: + -$(DEL_OBJ_EXE) + $(RM) zstd_build + $(RM) lz4_build + $(RM) brotli_build + $(RM) lzham_build + make -C ../../../../C/lizard/lib clean + make -C ../../../../C/lz5/lib clean