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系统下卸载JAVA和JDK的步骤

《Mac系统下卸载JAVA和JDK的步骤》JDK是Java语言的软件开发工具包,它提供了开发和运行Java应用程序所需的工具、库和资源,:本文主要介绍Mac系统下卸载JAVA和JDK的相关资料,需... 目录1. 卸载系统自带的 Java 版本检查当前 Java 版本通过命令卸载系统 Java2. 卸载自定

如何确定哪些软件是Mac系统自带的? Mac系统内置应用查看技巧

《如何确定哪些软件是Mac系统自带的?Mac系统内置应用查看技巧》如何确定哪些软件是Mac系统自带的?mac系统中有很多自带的应用,想要看看哪些是系统自带,该怎么查看呢?下面我们就来看看Mac系统内... 在MAC电脑上,可以使用以下方法来确定哪些软件是系统自带的:1.应用程序文件夹打开应用程序文件夹

Mac备忘录怎么导出/备份和云同步? Mac备忘录使用技巧

《Mac备忘录怎么导出/备份和云同步?Mac备忘录使用技巧》备忘录作为iOS里简单而又不可或缺的一个系统应用,上手容易,可以满足我们日常生活中各种记录的需求,今天我们就来看看Mac备忘录的导出、... 「备忘录」是 MAC 上的一款常用应用,它可以帮助我们捕捉灵感、记录待办事项或保存重要信息。为了便于在不同

电脑蓝牙连不上怎么办? 5 招教你轻松修复Mac蓝牙连接问题的技巧

《电脑蓝牙连不上怎么办?5招教你轻松修复Mac蓝牙连接问题的技巧》蓝牙连接问题是一些Mac用户经常遇到的常见问题之一,在本文章中,我们将提供一些有用的提示和技巧,帮助您解决可能出现的蓝牙连接问... 蓝牙作为一种流行的无线技术,已经成为我们连接各种设备的重要工具。在 MAC 上,你可以根据自己的需求,轻松地

如何关闭Mac的Safari通知? 3招教你关闭Safari浏览器网站通知的技巧

《如何关闭Mac的Safari通知?3招教你关闭Safari浏览器网站通知的技巧》当我们在使用Mac电脑专注做一件事情的时候,总是会被一些消息推送通知所打扰,这时候,我们就希望关闭这些烦人的Mac通... Safari 浏览器的「通知」功能本意是为了方便用户及时获取最新资讯,但很容易被一些网站滥用,导致我们

Android与iOS设备MAC地址生成原理及Java实现详解

《Android与iOS设备MAC地址生成原理及Java实现详解》在无线网络通信中,MAC(MediaAccessControl)地址是设备的唯一网络标识符,本文主要介绍了Android与iOS设备M... 目录引言1. MAC地址基础1.1 MAC地址的组成1.2 MAC地址的分类2. android与I

如何在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