📄 makefile.unix
字号:
# Makefile for LAME 3.xx## LAME is reported to work under: # Linux (i86), NetBSD 1.3.2 (StrongARM), FreeBSD (i86)# Compaq Alpha(OSF, Linux, Tru64 Unix), Sun Solaris, SGI IRIX,# OS2 Warp, Macintosh PPC, BeOS, Amiga and even VC++ # # these variables are available on command line:## make UNAME=xxxxx ARCH=xxxxx - specify a type of host# make PGM=lame_exp - specify a name of an executable file## if you have mingw32-gcc, try:# make -fMakefile.unix UNAME=MSDOS# or if you get the error# "process_begin: CreateProcess((null), copy configMS.h config.h, ...)":# make -fMakefile.unix UNAME=MSDOS NOUNIXCMD=NO# or if you have NASM:# make -fMakefile.unix UNAME=MSDOS HAVE_NASM=YES#ifeq ($(UNAME),MSDOS) UNAME ?= UNKNOWN ARCH = x86 NOUNIXCMD = YESelse UNAME = $(shell uname) ARCH = $(shell uname -m) iARCH = $(patsubst i%86,x86,$(ARCH))endifHAVE_NASM = NOHAVE_NEWER_GLIBC = NO# generic defaults. OS specific options go in versious sections belowPGM = lameCC = gccCC_OPTS = -OCPP_OPTS = -Iinclude -Impglib -Ifrontend -Ilibmp3lameAR = arRANLIB = ranlibGTK = GTKLIBS = LIBSNDFILE = LIBS = -lm MP3LIB = libmp3lame/libmp3lame.aMP3LIB_SHARED = libmp3lame/libmp3lame.soMAKEDEP = -MBRHIST_SWITCH = LIBTERMCAP = RM = rm -fCPP_OPTS += -DHAVE_CONFIG_H -I. ########################################################################### -DHAVEMPGLIB compiles the mpglib *decoding* library into libmp3lame##########################################################################CPP_OPTS += -DHAVE_MPGLIB ########################################################################### -DUSE_LAYER_1/2 enables Layer1 or Layer2 *decoding* abilities ##########################################################################CPP_OPTS += -DUSE_LAYER_1 -DUSE_LAYER_2########################################################################### -DTAKEHIRO_IEEE754_HACK enables Takehiro's IEEE hack ##########################################################################ifeq ($(iARCH),x86) CPP_OPTS += -DTAKEHIRO_IEEE754_HACKendif########################################################################### Define these in the OS specific sections below to compile in code # for the optional VBR bitrate histogram. # Requires ncurses, but libtermcap also works. # If you have any trouble, just dont define these## BRHIST_SWITCH = -DBRHIST -DHAVE_TERMCAP -DHAVE_{NCURSES_}TERMCAP_H# LIBTERMCAP = -lncurses# LIBTERMCAP = -ltermcap## or, to try and simulate TERMCAP (ANSI), use:# BRHIST_SWITCH = -DBRHIST###################################################################################################################################################### Define these in the OS specific sections below to compile in code for:## SNDLIB = -DLIBSNDFILE to use Erik de Castro Lopo's libsndfile # http://www.zip.com.au/~erikd/libsndfile/ instead of LAME's internal# routines. Also set:## LIBSNDFILE = -lsndfile# or# LIBSNDFILE = -L/location_of_libsndfile -lsndfile###################################################################################################################################################### Define these in the OS specific sections below to compile in code for# the GTK mp3 frame analyzer## Requires -DHAVE_MPGLIB## GTK = -DHAVE_GTK `gtk-config --cflags`# GTKLIBS = `gtk-config --libs` ###################################################################################################################################################### LINUX ##########################################################################ifeq ($(UNAME),Linux)# remove these lines if you dont have GTK, or dont want the GTK frame analyzer GTK = -DHAVE_GTK `gtk-config --cflags` GTKLIBS = `gtk-config --libs` # Comment out next 2 lines if you want to remove VBR histogram capability BRHIST_SWITCH = -DBRHIST -DHAVE_TERMCAP -DHAVE_TERMCAP_H LIBTERMCAP = -lncurses# uncomment to use LIBSNDFILE# SNDLIB = -DLIBSNDFILE# LIBSNDFILE=-lsndfile # suggested for gcc-2.7.x# CC_OPTS = -O3 -fomit-frame-pointer -funroll-loops -ffast-math -finline-functions -Wall -pedantic# CC_OPTS = -O9 -fomit-frame-pointer -fno-strength-reduce -mpentiumpro -ffast-math -finline-functions -funroll-loops -Wall -malign-double -g -march=pentiumpro -mfancy-math-387 -pipe -pedantic# for debugging: CC_OPTS = -UNDEBUG -O -Wall -pedantic -ggdb -DABORTFP# for lots of debugging:# CC_OPTS = -DDEBUG -UNDEBUG -O -Wall -pedantic -g -DABORTFP ifeq ($(CFG),RH) CPP_OPTS += -DFLOAT8=float -DREAL_IS_FLOAT=1# these options for gcc-3.2 & AthlonXP CC_OPTS = \ -ansic99 -pipe -O3 \ -Wall -W -Wmissing-declarations -Wfloat-equal \ -Wcast-qual -Wcast-align -Wdisabled-optimization -Wshadow \ -march=athlon-xp \ -malign-double \ -maccumulate-outgoing-args # -Wconversion -Wunreachable-code \ HAVE_NEWER_GLIBC = YES HAVE_NASM = YESendififeq ($(CFG),PFK) CPP_OPTS += -DKLEMM -DKLEMM_00 -DKLEMM_01 -DKLEMM_02 -DKLEMM_03 -DKLEMM_04 -DKLEMM_05 -DKLEMM_06 -DKLEMM_07 -DKLEMM_08 -DKLEMM_09 -DKLEMM_10 -DKLEMM_11 -DKLEMM_12 -DKLEMM_13 -DKLEMM_14 -DKLEMM_15 -DKLEMM_16 -DKLEMM_17 -DKLEMM_18 -DKLEMM_19 -DKLEMM_20 -DKLEMM_21 -DKLEMM_22 -DKLEMM_23 -DKLEMM_24 -DKLEMM_25 -DKLEMM_26 -DKLEMM_27 -DKLEMM_28 -DKLEMM_29 -DKLEMM_30 -DKLEMM_31 -DKLEMM_32 -DKLEMM_33 -DKLEMM_34 -DKLEMM_35 -DKLEMM_36 -DKLEMM_37 -DKLEMM_38 -DKLEMM_39 -DKLEMM_40 -DKLEMM_41 -DKLEMM_42 -DKLEMM_43 -DKLEMM_44 -DKLEMM_45 -DKLEMM_46 -DKLEMM_47 -DKLEMM_48 -DKLEMM_49 -DKLEMM_50 CC_OPTS = \ -Wall -O9 -fomit-frame-pointer -march=pentium \ -finline-functions -fexpensive-optimizations \ -funroll-loops -funroll-all-loops -pipe -fschedule-insns2 \ -fstrength-reduce \ -malign-double -mfancy-math-387 -ffast-math HAVE_NEWER_GLIBC = YES HAVE_NASM = YESendif########################################################################### LINUX on Digital/Compaq Alpha CPUs##########################################################################ifeq ($(ARCH),alpha)#################################################################### Check if 'ccc' is in our path#### if not, use 'gcc'################################################################ifeq ($(shell which ccc 2>/dev/null | grep -c ccc),0)# double is faster than float on AlphaCC_OPTS = -O4 -pedantic -Wall -fomit-frame-pointer -ffast-math -funroll-loops \ -mfp-regs -fschedule-insns -fschedule-insns2 \ -finline-functions \# -DFLOAT=double# add "-mcpu=21164a -Wa,-m21164a" to optimize for 21164a (ev56) CPU#################################################################### else, use 'ccc'################################################################else# Compaq's C CompilerCC = ccc#################################################################### set 'CC_OPTS = -arch host -tune host' to generate/tune instructions for this machine#### 'CC_OPTS += -migrate -fast -inline speed -unroll 0' tweak to run as fast as possible :)#### 'CC_OPTS += -w0 -pedantic -Wall' set warning and linking flags################################################################CC_OPTS = -arch host -tune hostCC_OPTS += -migrate -fast -inline speed -unroll 0CC_OPTS += -w0 -pedantic -Wall#################################################################### to debug, uncomment################################################################# For Debugging#CC_OPTS += -g3#################################################################### define __DECALPHA__ (i was getting re-declaration warnings#### in machine.h################################################################# Define DEC AlphaCPP_OPTS += -D__DECALPHA__# standard Linux libm#LIBS = -lm# optimized libffm (free fast math library)#LIBS = -lffm# Compaq's fast math libraryLIBS = -lcpmlendif # gcc or ccc?endif # alpha endif # linux########################################################################### FreeBSD##########################################################################ifeq ($(UNAME),FreeBSD)# remove if you do not have GTK or do not want the GTK frame analyzer GTK = -DHAVE_GTK `gtk12-config --cflags` GTKLIBS = `gtk12-config --libs` # Comment out next 2 lines if you want to remove VBR histogram capability BRHIST_SWITCH = -DBRHIST -DHAVE_TERMCAP -DHAVE_TERMCAP_H LIBTERMCAP = -lncursesendif########################################################################### OpenBSD##########################################################################ifeq ($(UNAME),OpenBSD)# remove if you do not have GTK or do not want the GTK frame analyzer GTK = -DHAVE_GTK `gtk-config --cflags` GTKLIBS = `gtk-config --libs` # Comment out next 2 lines if you want to remove VBR histogram capability BRHIST_SWITCH = -DBRHIST -DHAVE_TERMCAP -DHAVE_TERMCAP_H LIBTERMCAP = -lcurses endif########################################################################### SunOS##########################################################################ifeq ($(UNAME),SunOS) CC = cc CC_OPTS = -O -xCC MAKEDEP = -xM# for gcc, use instead:# CC = gcc # CC_OPTS = -O # MAKEDEP = -M endif########################################################################### SGI##########################################################################ifeq ($(UNAME),IRIX64) CC = cc CC_OPTS = -O3 -woff all #optonal:# GTK = -DHAVE_GTK `gtk-config --cflags`# GTKLIBS = `gtk-config --libs`# BRHIST_SWITCH = -DBRHIST -DHAVE_TERMCAP -DHAVE_TERMCAP_H# LIBTERMCAP = -lncursesendififeq ($(UNAME),IRIX) CC = cc CC_OPTS = -O3 -woff all endif########################################################################### Compaq Alpha running Dec Unix (OSF)##########################################################################ifeq ($(UNAME),OSF1) CC = cc CC_OPTS = -fast -O3 -std -g3 -non_sharedendif########################################################################### BeOS##########################################################################ifeq ($(UNAME),BeOS) CC = $(BE_C_COMPILER)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -