From: Robert Luberda Date: Fri, 22 Jan 2016 00:47:56 +0100 Subject: Clean makefile --- makefile | 87 +++-------------------------------- makefile.common | 139 -------------------------------------------------------- 2 files changed, 6 insertions(+), 220 deletions(-) diff --git a/makefile b/makefile index 745c8ed..c176a60 100644 --- a/makefile +++ b/makefile @@ -1,85 +1,10 @@ +.PHONY: all rar clean include makefile.common -test_lib: common - $(MAKE) -C CPP/myWindows all - -other: common - $(MAKE) -C Utils/CPUTest/MemLat all - $(MAKE) -C Utils/CPUTest/PipeLen all - $(MAKE) -C CPP/7zip/UI/P7ZIP all - $(MAKE) -C CPP/7zip/TEST/TestUI all - -other2: - $(MAKE) -C CPP/7zip/Bundles/AloneGCOV all - -7za: common - $(MAKE) -C CPP/7zip/Bundles/Alone all - -7zr: common - $(MAKE) -C CPP/7zip/Bundles/Alone7z all - -Client7z: common - $(MKDIR) bin/Codecs - $(MAKE) -C CPP/7zip/Bundles/Format7zFree all - $(MAKE) -C CPP/7zip/UI/Client7z all - -depend: - $(MAKE) -C CPP/7zip/Bundles/Alone depend - $(MAKE) -C CPP/7zip/Bundles/Alone7z depend - $(MAKE) -C CPP/7zip/Bundles/SFXCon depend - $(MAKE) -C CPP/7zip/UI/Client7z depend - $(MAKE) -C CPP/7zip/UI/Console depend - $(MAKE) -C CPP/7zip/Bundles/Format7zFree depend - $(MAKE) -C CPP/7zip/Compress/Rar depend - $(MAKE) -C CPP/7zip/UI/GUI depend - $(MAKE) -C CPP/7zip/UI/FileManager depend - -sfx: common - $(MKDIR) bin - $(MAKE) -C CPP/7zip/Bundles/SFXCon all - -common7z:common - $(MKDIR) bin/Codecs - $(MAKE) -C CPP/7zip/Bundles/Format7zFree all - $(MAKE) -C CPP/7zip/Compress/Rar all - -lzham:common - $(MKDIR) bin/Codecs - $(MAKE) -C CPP/7zip/Compress/Lzham all - -7z: common7z - $(MAKE) -C CPP/7zip/UI/Console all - -7zG: common7z LangAndHelp - $(MAKE) -C CPP/7zip/UI/GUI all - -7zFM: common7z LangAndHelp - $(MAKE) -C CPP/7zip/UI/FileManager all - -clean_C: - $(MAKE) -C CPP/myWindows clean - $(MAKE) -C CPP/7zip/Bundles/Alone clean - $(MAKE) -C CPP/7zip/Bundles/Alone7z clean - $(MAKE) -C CPP/7zip/Bundles/SFXCon clean - $(MAKE) -C CPP/7zip/UI/Client7z clean - $(MAKE) -C CPP/7zip/UI/Console clean - $(MAKE) -C CPP/7zip/UI/FileManager clean - $(MAKE) -C CPP/7zip/UI/GUI clean - $(MAKE) -C CPP/7zip/Bundles/Format7zFree clean - $(MAKE) -C CPP/7zip/Compress/Rar clean - $(MAKE) -C CPP/7zip/Compress/Lzham clean - $(MAKE) -C CPP/7zip/Bundles/LzmaCon clean2 - $(MAKE) -C CPP/7zip/Bundles/AloneGCOV clean - $(MAKE) -C CPP/7zip/TEST/TestUI clean - $(MAKE) -C CPP/ANDROID clean - $(MAKE) -C Utils/CPUTest/MemLat clean - $(MAKE) -C Utils/CPUTest/PipeLen clean - $(MAKE) -C CPP/7zip/UI/P7ZIP clean - -LzmaCon: - $(MAKE) -C CPP/7zip/Bundles/LzmaCon - -test_LzmaCon: - $(MAKE) -C CPP/7zip/Bundles/LzmaCon test +all rar: + $(MKDIR) bin bin/Codecs + $(MAKE) -C CPP/7zip/Compress/Rar all +clean: + $(MAKE) -C CPP/7zip/Compress/Rar clean diff --git a/makefile.common b/makefile.common index d8f6e16..1912ba7 100644 --- a/makefile.common +++ b/makefile.common @@ -6,145 +6,6 @@ DEST_SHARE=$(DEST_HOME)/lib/p7zip DEST_SHARE_DOC=$(DEST_HOME)/share/doc/p7zip DEST_MAN=$(DEST_HOME)/man -.PHONY: default all all2 7za 7zG 7zFM sfx 7z 7zr Client7z common common7z LangAndHelp tar_bin depend test test_7z test_7zr test_7zG test_Client7z LzmaCon test_LzmaCon all_test app cppcheck lzham test_lib other - -.PHONY: clean clean_full clean_C - include makefile.machine -default:7za - -all:7za sfx - -all2: all 7z - -all3: all2 7zr - -all4: all3 Client7z LzmaCon lzham test_lib - -all4bis: all3 Client7z LzmaCon test_lib # lzham not supported on x32 CPU. - -all5: all4 7zG 7zFM - -all6: all5 other - -all_all : all6 - -all_test : test test_7z test_7zr test_LzmaCon test_Client7z - -all_test2 : all_test test_7zG - -common: - $(MKDIR) bin - -app: common 7zFM 7zG 7z sfx - rm -fr p7zip.app - $(MKDIR) p7zip.app - cp -rp GUI/Contents p7zip.app/ - $(MKDIR) p7zip.app/Contents - $(MKDIR) p7zip.app/Contents/MacOS - cp bin/7zFM_do_not_use p7zip.app/Contents/MacOS/ - cp bin/7zG p7zip.app/Contents/MacOS/ - cp bin/7z.so p7zip.app/Contents/MacOS/ - cp bin/7zCon.sfx p7zip.app/Contents/MacOS/ - cp -rp bin/Codecs p7zip.app/Contents/MacOS/ - cp -rp GUI/Lang p7zip.app/Contents/MacOS/ - cp -rp DOC/MANUAL p7zip.app/Contents/MacOS/help - -LangAndHelp: - cd bin ; rm -f Lang ; ln -s ../GUI/Lang . - cd bin ; rm -f help ; ln -s ../DOC/MANUAL help - -clean: clean_C - rm -fr bin - rm -fr p7zip.app - rm -f Lang - rm -fr CPP/7zip/P7ZIP.* - rm -fr CPP/7zip/CMAKE/P7ZIP.* - rm -fr CPP/7zip/PREMAKE/P7ZIP.* - rm -f CPP/7zip/QMAKE/*/*.o - rm -f CPP/7zip/QMAKE/*/Makefile - rm -f CPP/7zip/QMAKE/*/*.pro.user - rm -f CPP/7zip/QMAKE/*/*.x - -find . -name "build*" -exec rm -fr {} \; - -find . -name "*-build-*" -exec rm -fr {} \; - -find . -name "*.user" -exec rm -f {} \; - -find . -name "._*" -exec rm -f {} \; - rm -fr CPP/7zip/ANDROID/libs - rm -fr CPP/7zip/ANDROID/obj - rm -f make.log 1 2 cppcheck.out scan-build.out - rm -f check/7z.so - rm -fr p7zip.app/Contents/MacOS - cd check ; ./clean_all.sh - - -clean_full:clean - find . -name "makefile.depend" -exec rm -f {} \; -exec touch {} \; # empty makefile.depend - find . -name "*~" -exec rm -f {} \; - find . -name "*.orig" -exec rm -fr {} \; # kdiff3 merge - find . -name ".*.swp" -exec rm -f {} \; - find . -name "*.i" -exec rm -f {} \; - find . -name "*.s" -exec rm -f {} \; - find . -name ".DS_Store" -exec rm -f {} \; # MacOSX - find . -name "._*" -exec rm -f {} \; # MacOSX - find . -name "*.pyc" -exec rm -f {} \; - find . -name "*.[ch]" -exec chmod -x {} \; - find . -name "*.cpp" -exec chmod -x {} \; - find . -name "*.asm" -exec chmod -x {} \; - find . -name "makefile*" -exec chmod -x {} \; - chmod -x ChangeLog README TODO man1/* DOC/*.txt - chmod +x contrib/VirtualFileSystemForMidnightCommander/u7z - chmod +x contrib/gzip-like_CLI_wrapper_for_7z/p7zip - chmod +x install.sh check/*.sh - -test: 7za sfx - cd check ; TOOLS="${TOOLS}" ./check.sh "`pwd`/../bin/7za" - -test_7z: 7z sfx - cd check ; TOOLS="${TOOLS}" ./check.sh "`pwd`/../bin/7z" - -test_7zr: 7zr sfx - cd check ; TOOLS="${TOOLS}" ./check_7zr.sh "`pwd`/../bin/7zr" - -test_7zG: 7zG sfx - cd check ; TOOLS="${TOOLS}" ./check.sh "`pwd`/../bin/7zG" - -test_Client7z: Client7z - cd check ; TOOLS="${TOOLS}" ./check_Client7z.sh "`pwd`/../bin/Client7z" - -install: - ./install.sh $(DEST_BIN) $(DEST_SHARE) $(DEST_MAN) $(DEST_SHARE_DOC) $(DEST_DIR) - -# cppcheck -f : test all flags -cppcheck: - cppcheck --enable=all -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX -D_7ZIP_LARGE_PAGES -DBREAK_HANDLER -DUNICODE -D_UNICODE . 2>&1 | tee -i cppcheck.out - -REP=$(shell pwd) -ARCHIVE=$(shell basename $(REP)) - -.PHONY: tar_all tar_all2 src_7z tar_bin tar_bin2 - -tar_all : clean_full - rm -f ../$(ARCHIVE)_src_all.tar.bz2 - cp makefile.linux_any_cpu makefile.machine - cd .. ; (tar cf - $(ARCHIVE) | bzip2 -9 > $(ARCHIVE)_src_all.tar.bz2) - -tar_all2 : clean_full - rm -f ../$(ARCHIVE)_src_all.tar.bz2 - cp makefile.linux_any_cpu makefile.machine - cd .. ; (tar cf - $(ARCHIVE) | 7za a -mx=9 -tbzip2 -si $(ARCHIVE)_src_all.tar.bz2 ) - -src_7z : clean_full - rm -f ../$(ARCHIVE)_src.7z - cd .. ; 7za a -mx=9 -m0=ppmd:mem=128m:o=32 $(ARCHIVE)_src.7z $(ARCHIVE) - -tar_bin: - rm -f ../$(ARCHIVE)_x86_linux_bin.tar.bz2 - chmod +x install.sh contrib/VirtualFileSystemForMidnightCommander/u7z contrib/gzip-like_CLI_wrapper_for_7z/p7zip - cd .. ; (tar cf - $(ARCHIVE)/bin $(ARCHIVE)/contrib $(ARCHIVE)/man1 $(ARCHIVE)/install.sh $(ARCHIVE)/ChangeLog $(ARCHIVE)/DOC $(ARCHIVE)/README $(ARCHIVE)/TODO | bzip2 -9 > $(ARCHIVE)_x86_linux_bin.tar.bz2) - -tar_bin2: - rm -f ../$(ARCHIVE)_x86_linux_bin.tar.bz2 - chmod +x install.sh contrib/VirtualFileSystemForMidnightCommander/u7z contrib/gzip-like_CLI_wrapper_for_7z/p7zip - cd .. ; (tar cf - $(ARCHIVE)/bin $(ARCHIVE)/contrib $(ARCHIVE)/man1 $(ARCHIVE)/install.sh $(ARCHIVE)/ChangeLog $(ARCHIVE)/DOC $(ARCHIVE)/README $(ARCHIVE)/TODO | 7za a -mx=9 -tbzip2 -si $(ARCHIVE)_x86_linux_bin.tar.bz2)