libbz2 for Mac OS makefile

2023-11-23 18:44
文章标签 mac makefile os libbz2

本文主要是介绍libbz2 for Mac OS makefile,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

git地址:git://sourceware.org/git/bzip2.git

a文件Makefile

# ------------------------------------------------------------------
# This file is part of bzip2/libbzip2, a program and library for
# lossless, block-sorting data compression.
#
# bzip2/libbzip2 version 1.0.8 of 13 July 2019
# Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
#
# Please read the WARNING, DISCLAIMER and PATENTS sections in the 
# README file.
#
# This program is released under the terms of the license contained
# in the file LICENSE.
# ------------------------------------------------------------------SHELL=/bin/sh# To assist in cross-compiling
CC=/usr/bin/clang
AR=ar
RANLIB=ranlib
LDFLAGS=-mmacos-version-min=10.9BIGFILES=-D_FILE_OFFSET_BITS=64
CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) -I"/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/" -mmacos-version-min=10.9# Where you want it installed when you do 'make install'
PREFIX=/usr/localOBJS= blocksort.o  \huffman.o    \crctable.o   \randtable.o  \compress.o   \decompress.o \bzlib.oall: libbz2.a bzip2 bzip2recover testbzip2: libbz2.a bzip2.o$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2bzip2recover: bzip2recover.o$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.olibbz2.a: $(OBJS)rm -f libbz2.a$(AR) cq libbz2.a $(OBJS)@if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \-f /bin/ranlib -o -f /usr/ccs/bin/ranlib ) ; then \echo $(RANLIB) libbz2.a ; \$(RANLIB) libbz2.a ; \ficheck: test
test: bzip2@cat words1./bzip2 -1  < sample1.ref > sample1.rb2./bzip2 -2  < sample2.ref > sample2.rb2./bzip2 -3  < sample3.ref > sample3.rb2./bzip2 -d  < sample1.bz2 > sample1.tst./bzip2 -d  < sample2.bz2 > sample2.tst./bzip2 -ds < sample3.bz2 > sample3.tstcmp sample1.bz2 sample1.rb2 cmp sample2.bz2 sample2.rb2cmp sample3.bz2 sample3.rb2cmp sample1.tst sample1.refcmp sample2.tst sample2.refcmp sample3.tst sample3.ref@cat words3install: bzip2 bzip2recoverif ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fiif ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fiif ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fiif ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fiif ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; ficp -f bzip2 $(PREFIX)/bin/bzip2cp -f bzip2 $(PREFIX)/bin/bunzip2cp -f bzip2 $(PREFIX)/bin/bzcatcp -f bzip2recover $(PREFIX)/bin/bzip2recoverchmod a+x $(PREFIX)/bin/bzip2chmod a+x $(PREFIX)/bin/bunzip2chmod a+x $(PREFIX)/bin/bzcatchmod a+x $(PREFIX)/bin/bzip2recovercp -f bzip2.1 $(PREFIX)/man/man1chmod a+r $(PREFIX)/man/man1/bzip2.1cp -f bzlib.h $(PREFIX)/includechmod a+r $(PREFIX)/include/bzlib.hcp -f libbz2.a $(PREFIX)/libchmod a+r $(PREFIX)/lib/libbz2.acp -f bzgrep $(PREFIX)/bin/bzgrepln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrepln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrepchmod a+x $(PREFIX)/bin/bzgrepcp -f bzmore $(PREFIX)/bin/bzmoreln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzlesschmod a+x $(PREFIX)/bin/bzmorecp -f bzdiff $(PREFIX)/bin/bzdiffln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmpchmod a+x $(PREFIX)/bin/bzdiffcp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1chmod a+r $(PREFIX)/man/man1/bzgrep.1chmod a+r $(PREFIX)/man/man1/bzmore.1chmod a+r $(PREFIX)/man/man1/bzdiff.1echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1clean: rm -f *.o libbz2.a bzip2 bzip2recover \sample1.rb2 sample2.rb2 sample3.rb2 \sample1.tst sample2.tst sample3.tstblocksort.o: blocksort.c@cat words0$(CC) $(CFLAGS) -c blocksort.c
huffman.o: huffman.c$(CC) $(CFLAGS) -c huffman.c
crctable.o: crctable.c$(CC) $(CFLAGS) -c crctable.c
randtable.o: randtable.c$(CC) $(CFLAGS) -c randtable.c
compress.o: compress.c$(CC) $(CFLAGS) -c compress.c
decompress.o: decompress.c$(CC) $(CFLAGS) -c decompress.c
bzlib.o: bzlib.c$(CC) $(CFLAGS) -c bzlib.c
bzip2.o: bzip2.c$(CC) $(CFLAGS) -c bzip2.c
bzip2recover.o: bzip2recover.c$(CC) $(CFLAGS) -c bzip2recover.cdistclean: cleanrm -f manual.ps manual.html manual.pdf bzip2.txt bzip2.1.preformattedDISTNAME=bzip2-1.0.8
dist: check manualrm -f $(DISTNAME)ln -s -f . $(DISTNAME)tar cvf $(DISTNAME).tar \$(DISTNAME)/blocksort.c \$(DISTNAME)/huffman.c \$(DISTNAME)/crctable.c \$(DISTNAME)/randtable.c \$(DISTNAME)/compress.c \$(DISTNAME)/decompress.c \$(DISTNAME)/bzlib.c \$(DISTNAME)/bzip2.c \$(DISTNAME)/bzip2recover.c \$(DISTNAME)/bzlib.h \$(DISTNAME)/bzlib_private.h \$(DISTNAME)/Makefile \$(DISTNAME)/LICENSE \$(DISTNAME)/bzip2.1 \$(DISTNAME)/bzip2.1.preformatted \$(DISTNAME)/bzip2.txt \$(DISTNAME)/words0 \$(DISTNAME)/words1 \$(DISTNAME)/words2 \$(DISTNAME)/words3 \$(DISTNAME)/sample1.ref \$(DISTNAME)/sample2.ref \$(DISTNAME)/sample3.ref \$(DISTNAME)/sample1.bz2 \$(DISTNAME)/sample2.bz2 \$(DISTNAME)/sample3.bz2 \$(DISTNAME)/dlltest.c \$(DISTNAME)/manual.html \$(DISTNAME)/manual.pdf \$(DISTNAME)/manual.ps \$(DISTNAME)/README \$(DISTNAME)/README.COMPILATION.PROBLEMS \$(DISTNAME)/README.XML.STUFF \$(DISTNAME)/CHANGES \$(DISTNAME)/libbz2.def \$(DISTNAME)/libbz2.dsp \$(DISTNAME)/dlltest.dsp \$(DISTNAME)/makefile.msc \$(DISTNAME)/unzcrash.c \$(DISTNAME)/spewG.c \$(DISTNAME)/mk251.c \$(DISTNAME)/bzdiff \$(DISTNAME)/bzdiff.1 \$(DISTNAME)/bzmore \$(DISTNAME)/bzmore.1 \$(DISTNAME)/bzgrep \$(DISTNAME)/bzgrep.1 \$(DISTNAME)/Makefile-libbz2_so \$(DISTNAME)/bz-common.xsl \$(DISTNAME)/bz-fo.xsl \$(DISTNAME)/bz-html.xsl \$(DISTNAME)/bzip.css \$(DISTNAME)/entities.xml \$(DISTNAME)/manual.xml \$(DISTNAME)/format.pl \$(DISTNAME)/xmlproc.shgzip -v $(DISTNAME).tar# For rebuilding the manual from sources on my SuSE 9.1 boxMANUAL_SRCS= 	bz-common.xsl bz-fo.xsl bz-html.xsl bzip.css \entities.xml manual.xml bzip2.txt: bzip2.1MANWIDTH=67 man --ascii ./$^ > $@bzip2.1.preformatted: bzip2.1MAN_KEEP_FORMATTING=1 MANWIDTH=67 man -E UTF-8 ./$^ > $@manual: manual.html manual.ps manual.pdf bzip2.txt bzip2.1.preformattedmanual.ps: $(MANUAL_SRCS)./xmlproc.sh -ps manual.xmlmanual.pdf: $(MANUAL_SRCS)./xmlproc.sh -pdf manual.xmlmanual.html: $(MANUAL_SRCS)./xmlproc.sh -html manual.xml

dylib文件Makefile


# This Makefile builds a shared version of the library, 
# libbz2.so.1.0.8, with soname libbz2.so.1.0,
# at least on x86-Linux (RedHat 7.2), 
# with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98).  
# Please see the README file for some important info 
# about building the library like this.# ------------------------------------------------------------------
# This file is part of bzip2/libbzip2, a program and library for
# lossless, block-sorting data compression.
#
# bzip2/libbzip2 version 1.0.8 of 13 July 2019
# Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
#
# Please read the WARNING, DISCLAIMER and PATENTS sections in the 
# README file.
#
# This program is released under the terms of the license contained
# in the file LICENSE.
# ------------------------------------------------------------------SHELL=/bin/sh
CC=/usr/bin/clang
BIGFILES=-D_FILE_OFFSET_BITS=64
CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) -I"/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/" -mmacos-version-min=10.9OBJS= blocksort.o  \huffman.o    \crctable.o   \randtable.o  \compress.o   \decompress.o \bzlib.oall: $(OBJS)$(CC) $(CFLAGS) -shared -o libbz2.1.0.dylib $(OBJS)$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.1.0.dylibrm -f libbz2.dylibln -s libbz2.1.0.dylib libbz2.dylibclean: rm -f $(OBJS) bzip2.o libbz2.1.0.dylib libbz2.dylib bzip2-sharedblocksort.o: blocksort.c$(CC) $(CFLAGS) -c blocksort.c
huffman.o: huffman.c$(CC) $(CFLAGS) -c huffman.c
crctable.o: crctable.c$(CC) $(CFLAGS) -c crctable.c
randtable.o: randtable.c$(CC) $(CFLAGS) -c randtable.c
compress.o: compress.c$(CC) $(CFLAGS) -c compress.c
decompress.o: decompress.c$(CC) $(CFLAGS) -c decompress.c
bzlib.o: bzlib.c$(CC) $(CFLAGS) -c bzlib.c

这篇关于libbz2 for Mac OS makefile的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/419973

相关文章

如何在Mac上安装并配置JDK环境变量详细步骤

《如何在Mac上安装并配置JDK环境变量详细步骤》:本文主要介绍如何在Mac上安装并配置JDK环境变量详细步骤,包括下载JDK、安装JDK、配置环境变量、验证JDK配置以及可选地设置PowerSh... 目录步骤 1:下载JDK步骤 2:安装JDK步骤 3:配置环境变量1. 编辑~/.zshrc(对于zsh

Python解析器安装指南分享(Mac/Windows/Linux)

《Python解析器安装指南分享(Mac/Windows/Linux)》:本文主要介绍Python解析器安装指南(Mac/Windows/Linux),具有很好的参考价值,希望对大家有所帮助,如有... 目NMNkN录1js. 安装包下载1.1 python 下载官网2.核心安装方式3. MACOS 系统安

如何关闭 Mac 触发角功能或设置修饰键? mac电脑防止误触设置技巧

《如何关闭Mac触发角功能或设置修饰键?mac电脑防止误触设置技巧》从Windows换到iOS大半年来,触发角是我觉得值得吹爆的MacBook效率神器,成为一大说服理由,下面我们就来看看mac电... MAC 的「触发角」功能虽然提高了效率,但过于灵敏也让不少用户感到头疼。特别是在关键时刻,一不小心就可能触

mac安装nvm(node.js)多版本管理实践步骤

《mac安装nvm(node.js)多版本管理实践步骤》:本文主要介绍mac安装nvm(node.js)多版本管理的相关资料,NVM是一个用于管理多个Node.js版本的命令行工具,它允许开发者在... 目录NVM功能简介MAC安装实践一、下载nvm二、安装nvm三、安装node.js总结NVM功能简介N

C++实现获取本机MAC地址与IP地址

《C++实现获取本机MAC地址与IP地址》这篇文章主要为大家详细介绍了C++实现获取本机MAC地址与IP地址的两种方式,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 实际工作中,项目上常常需要获取本机的IP地址和MAC地址,在此使用两种方案获取1.MFC中获取IP和MAC地址获取

C/C++通过IP获取局域网网卡MAC地址

《C/C++通过IP获取局域网网卡MAC地址》这篇文章主要为大家详细介绍了C++如何通过Win32API函数SendARP从IP地址获取局域网内网卡的MAC地址,感兴趣的小伙伴可以跟随小编一起学习一下... C/C++通过IP获取局域网网卡MAC地址通过win32 SendARP获取MAC地址代码#i

mac中资源库在哪? macOS资源库文件夹详解

《mac中资源库在哪?macOS资源库文件夹详解》经常使用Mac电脑的用户会发现,找不到Mac电脑的资源库,我们怎么打开资源库并使用呢?下面我们就来看看macOS资源库文件夹详解... 在 MACOS 系统中,「资源库」文件夹是用来存放操作系统和 App 设置的核心位置。虽然平时我们很少直接跟它打交道,但了

龙蜥操作系统Anolis OS-23.x安装配置图解教程(保姆级)

《龙蜥操作系统AnolisOS-23.x安装配置图解教程(保姆级)》:本文主要介绍了安装和配置AnolisOS23.2系统,包括分区、软件选择、设置root密码、网络配置、主机名设置和禁用SELinux的步骤,详细内容请阅读本文,希望能对你有所帮助... ‌AnolisOS‌是由阿里云推出的开源操作系统,旨

python中os.stat().st_size、os.path.getsize()获取文件大小

《python中os.stat().st_size、os.path.getsize()获取文件大小》本文介绍了使用os.stat()和os.path.getsize()函数获取文件大小,文中通过示例代... 目录一、os.stat().st_size二、os.path.getsize()三、函数封装一、os

macOS怎么轻松更换App图标? Mac电脑图标更换指南

《macOS怎么轻松更换App图标?Mac电脑图标更换指南》想要给你的Mac电脑按照自己的喜好来更换App图标?其实非常简单,只需要两步就能搞定,下面我来详细讲解一下... 虽然 MACOS 的个性化定制选项已经「缩水」,不如早期版本那么丰富,www.chinasem.cn但我们仍然可以按照自己的喜好来更换