Blame Makefile.MSVC

Packit 47f805
#	Makefile.MSVC: MSVC Makefile for LAME
Packit 47f805
#
Packit 47f805
#	2000-2010 Robert Hegemann
Packit 47f805
#	dedicated to the LAME project http://www.mp3dev.org
Packit 47f805
###############################################################################
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
#__ readme ____________________________________________________________________
Packit 47f805
#	nmake -f Makefile.MSVC
Packit 47f805
#		-> build lame, but not mp3x
Packit 47f805
#		-> use Robert's code modifications
Packit 47f805
#		-> assume MSVC 6.0 compiler available
Packit 47f805
#		-> assume NASM available
Packit 47f805
#		-> assemble MMX code with NASM
Packit 47f805
#		-> no compiler warnings
Packit 47f805
#       -> use single precision float
Packit 47f805
#
Packit 47f805
#	passing arguments, one can modify the default behaviour:
Packit 47f805
#	COMP=<not INTEL or BCC>    ->  use MS compiler
Packit 47f805
#	WARN=<anything but OFF>    ->  give verbose compiler warnings
Packit 47f805
#	ASM=<anything but YES>     ->  no NASM nor MMX
Packit 47f805
#	MMX=<anything but YES>     ->  do not assemble MMX code
Packit 47f805
#	CFG=<anything but RH>      ->  disable Robert's modifications
Packit 47f805
#	CPU=P1                     ->  optimize for Pentium instead of P II/III
Packit 47f805
#	CPU=P2                     ->  optimize for Pentium II/III, you need a PII or better
Packit 47f805
#	CPU=P3                     ->  optimize for Pentium III, you need a PIII or better
Packit 47f805
#	GTK=YES                    ->  have GTK, adds mp3x to default targets
Packit 47f805
#	PREC=<anything but SINGLE> ->  use double instead of single float
Packit 47f805
#	SNDFILE=<anything but YES> ->  do not use LibSndfile for reading input files
Packit 47f805
#
Packit 47f805
#	Example:
Packit 47f805
#	nmake -f Makefile.MSVC CPU=P1 GTK=YES
Packit 47f805
#____________________________________________________________________ readme __
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
#	targets <-> DOS filenames
Packit 47f805
Packit 47f805
T_LAME = lame.exe
Packit 47f805
T_MP3X = mp3x.exe
Packit 47f805
T_MP3RTP = mp3rtp.exe
Packit 47f805
T_DLL = libmp3lame.dll
Packit 47f805
T_LIB_DYNAMIC = libmp3lame.lib
Packit 47f805
T_LIB_STATIC = libmp3lame-static.lib
Packit 47f805
T_LEGACY_DLL = lame_enc.dll
Packit 47f805
Packit 47f805
TARGET_DIR = .\output\ 
Packit 47f805
Packit 47f805
#	default targets
Packit 47f805
Packit 47f805
PGM = $(T_LAME)
Packit 47f805
Packit 47f805
#	some default settings
Packit 47f805
Packit 47f805
!	IF "$(MSVCVER)" != ""
Packit 47f805
COMP = MS
Packit 47f805
!	IF "$(MSVCVER)" == "Win64"
Packit 47f805
!	IF "$(ASM)" == ""
Packit 47f805
ASM = NO # or it could be ML64 if we want to use it...
Packit 47f805
GTK = NO
Packit 47f805
!	ENDIF
Packit 47f805
!	ENDIF
Packit 47f805
!	ELSE
Packit 47f805
!	IF "$(COMP)" == ""
Packit 47f805
COMP = MSVC
Packit 47f805
!	ENDIF
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(ASM)" == ""
Packit 47f805
ASM = YES
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(MMX)" == ""
Packit 47f805
MMX = YES
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(CFG)" == ""
Packit 47f805
CFG = RH
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(CPU)" == ""
Packit 47f805
CPU = P2auto
Packit 47f805
!if "$(PROCESSOR_LEVEL)"=="6"
Packit 47f805
CPU = P6
Packit 47f805
!endif
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(WARN)" == ""
Packit 47f805
WARN = OFF
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(PREC)" == ""
Packit 47f805
PREC = SINGLE
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(SNDFILE)" == ""
Packit 47f805
SNDFILE = NO
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
OFF = win32
Packit 47f805
MACHINE = /machine:I386
Packit 47f805
LIB_OPTS = /nologo $(MACHINE) 
Packit 47f805
Packit 47f805
!	MESSAGE ----------------------------------------------------------------------
Packit 47f805
!	IF "$(CFG)" == ""
Packit 47f805
!	 MESSAGE building LAME
Packit 47f805
!	ELSE
Packit 47f805
!	 MESSAGE building LAME featuring $(CFG)
Packit 47f805
!	ENDIF
Packit 47f805
!	IF "$(ASM)" == "YES"
Packit 47f805
!	 MESSAGE + ASM
Packit 47f805
!	 IF "$(MMX)" == "YES"
Packit 47f805
!	  MESSAGE + MMX
Packit 47f805
!	 ENDIF
Packit 47f805
!	ENDIF
Packit 47f805
!	IF "$(GTK)" == "YES"
Packit 47f805
!	 MESSAGE + GTK
Packit 47f805
!	ENDIF
Packit 47f805
!	IF "$(COMP)" == "INTEL"
Packit 47f805
!	 MESSAGE using INTEL COMPILER
Packit 47f805
!	 IF "$(CPU)" == "P1"
Packit 47f805
!	  MESSAGE + optimizing for Pentium (MMX)
Packit 47f805
!	 ELSE
Packit 47f805
!	  IF "$(CPU)" == "P2"
Packit 47f805
!	   MESSAGE + you need a Pentium II or better
Packit 47f805
!	  ELSE
Packit 47f805
!	   IF "$(CPU)" == "P3"
Packit 47f805
!	    MESSAGE + you need a Pentium III or better
Packit 47f805
!	   ELSE
Packit 47f805
!	    MESSAGE + optimizing for Pentium II/III
Packit 47f805
!	   ENDIF
Packit 47f805
!	  ENDIF
Packit 47f805
!	 ENDIF
Packit 47f805
!	ELSE
Packit 47f805
!	 IF "$(MSVCVER)" == "6.0"
Packit 47f805
!	  MESSAGE + using MSVC 6.0 32-Bit Compiler
Packit 47f805
!	  IF "$(CPU)" == "P1"
Packit 47f805
!	   MESSAGE + optimizing for Pentium (MMX) (may slow down PIII a few percent)
Packit 47f805
!	  ELSE
Packit 47f805
!	   MESSAGE + optimizing for Pentium II/III
Packit 47f805
!	  ENDIF
Packit 47f805
!	 ELSEIF "$(MSVCVER)" == "8.0"
Packit 47f805
!	  MESSAGE + using MSVC 8.0 32-Bit Compiler
Packit 47f805
!	  IF "$(CPU)" == "P1"
Packit 47f805
!	   MESSAGE + optimizing for Pentium (MMX) (may slow down PIII a few percent)
Packit 47f805
!	  ELSE
Packit 47f805
!	   MESSAGE + optimizing for Pentium II/III
Packit 47f805
!	  ENDIF
Packit 47f805
!	 ELSE
Packit 47f805
!	  IF "$(MSVCVER)" == "Win64"
Packit 47f805
!	   MESSAGE + using MS 64-Bit Compiler
Packit 47f805
!	  ELSE
Packit 47f805
!	   MESSAGE using MS COMPILER
Packit 47f805
!	   IF "$(CPU)" == "P1"
Packit 47f805
!	    MESSAGE + optimizing for Pentium (MMX) (may slow down PIII a few percent)
Packit 47f805
!	   ELSE
Packit 47f805
!	    MESSAGE + optimizing for Pentium II/III
Packit 47f805
!	   ENDIF
Packit 47f805
!	  ENDIF
Packit 47f805
!	 ENDIF
Packit 47f805
!	ENDIF
Packit 47f805
!	IF "$(PREC)" == "SINGLE"
Packit 47f805
!	 MESSAGE + using Single precision
Packit 47f805
!	ENDIF
Packit 47f805
!	IF "$(SNDFILE)" == "YES"
Packit 47f805
!	 MESSAGE + using LibSndfile reading input files
Packit 47f805
!	ENDIF
Packit 47f805
!	MESSAGE ----------------------------------------------------------------------
Packit 47f805
Packit 47f805
!	IF "$(COMP)" != "INTEL"
Packit 47f805
!	IF "$(COMP)" != "BCC"
Packit 47f805
Packit 47f805
#__ Microsoft C options _______________________________________________________
Packit 47f805
#
Packit 47f805
#	/O2     maximize speed
Packit 47f805
#	/Ob<n>  inline expansion
Packit 47f805
#	/Og     enable global optimizations
Packit 47f805
#	/Oi     enable intrinsic functions
Packit 47f805
#	/Ot     favor code speed
Packit 47f805
#	/Oy     enable frame pointer omission
Packit 47f805
#	/G5     Pentium optimization
Packit 47f805
#	/G6     Pentium II/III optimization
Packit 47f805
#	/GA     optimize for Windows Application
Packit 47f805
#	/GF     enable read-only string pooling
Packit 47f805
#	/Gf     enable string spooling
Packit 47f805
#	/Gs     disable stack checking calls
Packit 47f805
#	/Gy     separate functions for linker
Packit 47f805
#	/QIfdiv generate code for Pentium FDIV fix
Packit 47f805
#	/QI0f   generate code for Pentium 0x0f erratum fix
Packit 47f805
#
Packit 47f805
#	remarks:
Packit 47f805
#	 - aliasing options seem to break code
Packit 47f805
#	 - try to get the Intel compiler demonstration code!
Packit 47f805
#	   ICL produces faster code.
Packit 47f805
Packit 47f805
# debugging options
Packit 47f805
# CC_OPTS = /nologo /Zi /Ge /GZ
Packit 47f805
# LN_OPTS = /nologo /debug:full /debugtype:cv /fixed:no
Packit 47f805
Packit 47f805
# profiling options
Packit 47f805
# CC_OPTS = /nologo /Zi /O2b2gity /G6As /DNDEBUG
Packit 47f805
# LN_OPTS = /nologo /debug:full /debugtype:cv /fixed:no /profile
Packit 47f805
Packit 47f805
# release options
Packit 47f805
!	IF "$(MSVCVER)" == "Win64"
Packit 47f805
CC_OPTS = /nologo /DWin64 /O2b2ity /GAy /Gs1024 /Zp8 /GL /GS- /Zi
Packit 47f805
!	ELSEIF "$(MSVCVER)" == "8.0"
Packit 47f805
CC_OPTS = /nologo /O2 /Wp64 /Oi /GL /arch:SSE /fp:precise
Packit 47f805
!	ELSEif "$(CPU)"=="P6"
Packit 47f805
CC_OPTS = /nologo /O2 /Ob2 /GAy /Gs1024 /Zp8 /Zi
Packit 47f805
!else
Packit 47f805
CC_OPTS = /nologo /O2 /Ob2 /GAy /Gs1024 /QIfdiv /QI0f /YX
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(MSVCVER)" == "6.0"
Packit 47f805
!	IF "$(CPU)" == "P1"
Packit 47f805
CC_OPTS = $(CC_OPTS) /G5
Packit 47f805
!	ELSE
Packit 47f805
CC_OPTS = $(CC_OPTS) /G6
Packit 47f805
!	ENDIF
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(WARN)" == "OFF"
Packit 47f805
CC_OPTS = $(CC_OPTS) /w
Packit 47f805
!	ELSE
Packit 47f805
CC_OPTS = $(CC_OPTS) /W$(WARN)
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(PREC)" == "SINGLE"
Packit 47f805
CC_OPTS = $(CC_OPTS) /DFLOAT8=float /DREAL_IS_FLOAT=1
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
# temporary remove NDEBUG, see configure.in
Packit 47f805
#CC_OPTS = $(CC_OPTS) /DNDEBUG /MT
Packit 47f805
CC_OPTS = $(CC_OPTS) /MT
Packit 47f805
Packit 47f805
LN_OPTS = /nologo /pdb:none
Packit 47f805
LN_DLL = /nologo /DLL
Packit 47f805
Packit 47f805
CC_OUT = /Fo
Packit 47f805
LN_OUT = /OUT:
Packit 47f805
Packit 47f805
CC = cl
Packit 47f805
LN = link
Packit 47f805
Packit 47f805
#_______________________________________________________ Microsoft C options __
Packit 47f805
Packit 47f805
Packit 47f805
!	ELSE
Packit 47f805
Packit 47f805
#__ Borland BCC options _______________________________________________________
Packit 47f805
#
Packit 47f805
#	first draft, DLL not working, generates very slow code!
Packit 47f805
BCCINST = C:/Borland/BCC55
Packit 47f805
Packit 47f805
CC_OPTS = -pc -q -ff -fp -jb -j1 -tWC -tWM -O2 -OS -I$(BCCINST)/include -DNDEBUG -DWIN32
Packit 47f805
# dll >> -tWD
Packit 47f805
LN_OPTS = -lGn -lGi -lap -lx -L$(BCCINST)/lib
Packit 47f805
# dll >> -Tpd
Packit 47f805
!	IF "$(CPU)" == "P1"
Packit 47f805
CC_OPTS = $(CC_OPTS) -5
Packit 47f805
!	ELSE
Packit 47f805
CC_OPTS = $(CC_OPTS) -6
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(WARN)" == "OFF"
Packit 47f805
CC_OPTS = $(CC_OPTS) -w-
Packit 47f805
!	ELSE
Packit 47f805
CC_OPTS = $(CC_OPTS)
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
LN_DLL =
Packit 47f805
#$(CCINST)/lib/cw32R.lib
Packit 47f805
LN_OUT = -e
Packit 47f805
CC_OUT = -o
Packit 47f805
Packit 47f805
CC = bcc32
Packit 47f805
LN = bcc32
Packit 47f805
Packit 47f805
OFF = obj
Packit 47f805
Packit 47f805
!	ENDIF
Packit 47f805
#_______________________________________________________ Borland BCC options __
Packit 47f805
Packit 47f805
Packit 47f805
!	ELSE
Packit 47f805
Packit 47f805
#__ Intel 4.5 options _________________________________________________________
Packit 47f805
#
Packit 47f805
#	/YX         enable automatic precompiled header file creation/usage
Packit 47f805
#	/Ox         maximum optimization same as /O2 without /Gfy
Packit 47f805
#	/O2         same as /Gfsy /Ob1gyti
Packit 47f805
#	/Gd      1) make cdecl the default calling convention
Packit 47f805
#	/G5      2) optimized for Pentium
Packit 47f805
#	/G6      3) optimized for Pentium II/III
Packit 47f805
#	/GA         assume single threaded
Packit 47f805
#	/Gs[n]      disable stack checks for functions with 
Packit 47f805
#	/GF         read-only string pooling optimization
Packit 47f805
#	/Gy         separate functions for the linker
Packit 47f805
#	/Qunroll    unroll loops with default heuristic
Packit 47f805
#	/QIfist     enable fast float to int conversion
Packit 47f805
#	/QIfdiv     enable patch for Pentium with FDIV erratum
Packit 47f805
#	/QI0f       enable patch for Pentium with 0f erratum
Packit 47f805
#	/Qip     2) enable single-file IP optimizations (within files)
Packit 47f805
#	/Qipo       enable multi-file IP optimizations (between files)
Packit 47f805
#	/Qipo_wp 4) enable entire program multi-file IP optimizations
Packit 47f805
#	/QaxiMK     automatic use of specialized code for PII/III, MMX, SIMD
Packit 47f805
#
Packit 47f805
#	remarks:
Packit 47f805
#	1) slows speed down, not using
Packit 47f805
#	2) faster compared to 3) or 4) on Pentium MMX at 200 MHz
Packit 47f805
Packit 47f805
!	IF "$(CPU)" == "P1"
Packit 47f805
CC_OPTS = /G5 /QaxiMK /QIfdiv /QI0f
Packit 47f805
!	ELSE
Packit 47f805
!	IF "$(CPU)" == "P2"
Packit 47f805
CC_OPTS = /G6 /Qxi /QaxMK
Packit 47f805
!	ELSE
Packit 47f805
!	IF "$(CPU)" == "P3"
Packit 47f805
CC_OPTS = /G6 /QxiMK
Packit 47f805
!	ELSE
Packit 47f805
CC_OPTS = /G6 /QaxiMK /QIfdiv /QI0f
Packit 47f805
!	ENDIF
Packit 47f805
!	ENDIF
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(WARN)" == "OFF"
Packit 47f805
CC_OPTS = $(CC_OPTS) /w
Packit 47f805
!	ELSE
Packit 47f805
CC_OPTS = $(CC_OPTS) /W2 /Wport
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
!	IF "$(PREC)" == "SINGLE"
Packit 47f805
CC_OPTS = $(CC_OPTS) /DFLOAT8=float /DREAL_IS_FLOAT=1
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
CC_OPTS = /nologo /DNDEBUG /YX /GA /Ox /Ob2 \
Packit 47f805
          /Qunroll /Qsox- /Qip $(CC_OPTS)
Packit 47f805
Packit 47f805
Packit 47f805
LN_OPTS = $(CC_OPTS)
Packit 47f805
LN_DLL = /LD
Packit 47f805
LN_OUT = /Fe
Packit 47f805
CC_OUT = /Fo
Packit 47f805
Packit 47f805
CC = icl
Packit 47f805
LN = icl
Packit 47f805
#_________________________________________________________ Intel 4.5 options __
Packit 47f805
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
#__ LIBSNDFILE ________________________________________________________________
Packit 47f805
#
Packit 47f805
#	uncomment the following if you want LibSndfile for input
Packit 47f805
#	It's always a good idea to compile it in!
Packit 47f805
#
Packit 47f805
!	IF "$(SNDFILE)" == "YES"
Packit 47f805
SNDFILE_OPTS = /DLIBSNDFILE
Packit 47f805
LIBSNDFILE = $(SNDFILE_DIR)libsndfile.lib
Packit 47f805
!   ENDIF
Packit 47f805
#________________________________________________________________ LIBSNDFILE __
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
#-- MISC --
Packit 47f805
CPP_OPTS = /DHAVE_CONFIG_H -I.
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
#__ FRAME ANALYZER SUPPORT ____________________________________________________
Packit 47f805
#
Packit 47f805
#	Assuming you have "glib-dev" and "gtk+-dev" installed and the system
Packit 47f805
#	DLLs "glib-1.3.dll", "gdk-1.3.dll" and "gtk-1.3.dll" copied into the
Packit 47f805
#	"Win\System" folder
Packit 47f805
#
Packit 47f805
#	To compile in the frame analyzer support, you need the above mentioned
Packit 47f805
#	libraries. You can pass the appropriate path to them in GTK_DIRS.
Packit 47f805
#
Packit 47f805
!	IF "$(GTK)" == "YES"
Packit 47f805
!	IF "$(GTK_DIRS)" == ""
Packit 47f805
GTK_DIRS = ../3rdparty
Packit 47f805
!	ENDIF
Packit 47f805
GTK_OPTS = -I$(GTK_DIRS)/glib     \
Packit 47f805
           -I$(GTK_DIRS)/gtk+     \
Packit 47f805
           -I$(GTK_DIRS)/gtk+/gtk \
Packit 47f805
           -I$(GTK_DIRS)/gtk+/gdk
Packit 47f805
GTK_LIBS = $(GTK_DIRS)/gtk+/gtk/gtk-1.3.lib \
Packit 47f805
           $(GTK_DIRS)/gtk+/gdk/gdk-1.3.lib \
Packit 47f805
           $(GTK_DIRS)/glib/glib-1.3.lib
Packit 47f805
Packit 47f805
PGM = $(T_MP3X) $(PGM)
Packit 47f805
!	ELSE
Packit 47f805
!	IF "$(GTK)" == ""
Packit 47f805
!	MESSAGE Pass GTK=YES to build the frame analyzer. (requires installed GTK)
Packit 47f805
!	ENDIF
Packit 47f805
!	ENDIF
Packit 47f805
#____________________________________________________ FRAME ANALYZER SUPPORT __
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
#__ HIP DECODING ______________________________________________________________
Packit 47f805
#
Packit 47f805
#	uncomment the following if you want decoding support
Packit 47f805
#	It's always a good idea to compile it in!
Packit 47f805
#
Packit 47f805
CPP_OPTS = $(CPP_OPTS) /DHAVE_MPGLIB
Packit 47f805
#___________________________________________________________ HIP DECODING _____
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
#__ Takehiro's IEEE hack ______________________________________________________
Packit 47f805
#
Packit 47f805
#	uncomment the following to enable Takehiro's IEEE hack
Packit 47f805
#	You'll want it on a x86 machine with i387 FPU
Packit 47f805
#
Packit 47f805
CPP_OPTS = $(CPP_OPTS) /DTAKEHIRO_IEEE754_HACK
Packit 47f805
#______________________________________________________ Takehiro's IEEE hack __
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
#__ Robert's alternate code ___________________________________________________
Packit 47f805
!	IF "$(CFG)" == "RH"
Packit 47f805
!	IF "$(MSVCVER)" == "8.0"
Packit 47f805
LIB_OPTS = $(LIB_OPTS) /LTCG
Packit 47f805
LN_OPTS = $(LN_OPTS) /LTCG
Packit 47f805
!   ENDIF
Packit 47f805
!	ENDIF
Packit 47f805
#___________________________________________________ Robert's alternate code __
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
CC_SWITCHES = $(CC_OPTS) $(SNDFILE_OPTS) \
Packit 47f805
              $(GTK_OPTS) /DBS_FORMAT=BINARY
Packit 47f805
Packit 47f805
LN_SWITCHES = $(LN_OPTS)
Packit 47f805
Packit 47f805
lame_sources = \
Packit 47f805
	frontend/lame_main.c
Packit 47f805
Packit 47f805
mpx_sources = \
Packit 47f805
	frontend/gpkplotting.c \
Packit 47f805
	frontend/gtkanal.c \
Packit 47f805
	frontend/mp3x.c
Packit 47f805
Packit 47f805
mp3rtp_sources = \
Packit 47f805
	frontend/rtp.c \
Packit 47f805
	frontend/mp3rtp.c
Packit 47f805
Packit 47f805
dll_sources = \
Packit 47f805
	dll/BladeMP3EncDll.c
Packit 47f805
Packit 47f805
common_sources = \
Packit 47f805
	frontend/main.c \
Packit 47f805
	frontend/get_audio.c \
Packit 47f805
	frontend/parse.c \
Packit 47f805
	frontend/timestatus.c \
Packit 47f805
	frontend/lametime.c \
Packit 47f805
	frontend/console.c \
Packit 47f805
	frontend/brhist.c
Packit 47f805
Packit 47f805
lamelib_sources = \
Packit 47f805
	libmp3lame/bitstream.c \
Packit 47f805
	libmp3lame/encoder.c \
Packit 47f805
	libmp3lame/fft.c \
Packit 47f805
	libmp3lame/gain_analysis.c \
Packit 47f805
	libmp3lame/id3tag.c \
Packit 47f805
	libmp3lame/lame.c \
Packit 47f805
	libmp3lame/newmdct.c \
Packit 47f805
	libmp3lame/psymodel.c \
Packit 47f805
	libmp3lame/quantize.c \
Packit 47f805
	libmp3lame/quantize_pvt.c \
Packit 47f805
	libmp3lame/vector/xmm_quantize_sub.c \
Packit 47f805
	libmp3lame/set_get.c \
Packit 47f805
	libmp3lame/vbrquantize.c \
Packit 47f805
	libmp3lame/reservoir.c \
Packit 47f805
	libmp3lame/tables.c \
Packit 47f805
	libmp3lame/takehiro.c \
Packit 47f805
	libmp3lame/util.c \
Packit 47f805
	libmp3lame/mpglib_interface.c \
Packit 47f805
	libmp3lame/VbrTag.c \
Packit 47f805
	libmp3lame/presets.c \
Packit 47f805
	libmp3lame/version.c
Packit 47f805
Packit 47f805
mpglib_sources = \
Packit 47f805
	mpglib/common.c \
Packit 47f805
	mpglib/dct64_i386.c \
Packit 47f805
	mpglib/decode_i386.c \
Packit 47f805
	mpglib/layer1.c \
Packit 47f805
	mpglib/layer2.c \
Packit 47f805
	mpglib/layer3.c \
Packit 47f805
	mpglib/tabinit.c \
Packit 47f805
	mpglib/interface.c
Packit 47f805
Packit 47f805
Packit 47f805
!IF "$(MSVCVER)" == "Win64"
Packit 47f805
ADDL_OBJ = bufferoverflowU.lib
Packit 47f805
!ENDIF
Packit 47f805
Packit 47f805
LIB_OBJ = $(lamelib_sources:.c=.obj)
Packit 47f805
HIP_OBJ = $(mpglib_sources:.c=.obj)
Packit 47f805
CMMN_OBJ = $(common_sources:.c=.obj)
Packit 47f805
LAME_OBJ = $(lame_sources:.c=.obj)
Packit 47f805
MPX_OBJ = $(mpx_sources:.c=.obj)
Packit 47f805
MPRTP_OBJ = $(mp3rtp_sources:.c=.obj)
Packit 47f805
DLL_OBJ = $(dll_sources:.c=.obj)
Packit 47f805
Packit 47f805
.c.obj:
Packit 47f805
	@$(CC) $(CPP_OPTS) $(CC_SWITCHES) -Iinclude -Ilibmp3lame -Impglib \
Packit 47f805
	       $(CC_OUT)$@  -c $<
Packit 47f805
Packit 47f805
Packit 47f805
#__ MASM ______________________________________________________________________
Packit 47f805
#
Packit 47f805
#	MASM: Microsoft Assembler
Packit 47f805
#
Packit 47f805
!	IF "$(ASM)" == "ML64"
Packit 47f805
#
Packit 47f805
.SUFFIXES : .nas
Packit 47f805
.nas.obj:
Packit 47f805
	@echo $<
Packit 47f805
	@ml64 -Ilibmp3lame\i386 -Sf -DWIN32 -DWIN64 $< -Fo$@
Packit 47f805
Packit 47f805
CC_SWITCHES = $(CC_SWITCHES) -DHAVE_NASM
Packit 47f805
ASM_OBJ = $(ASM_OBJ) \
Packit 47f805
	libmp3lame\i386\cpu_feat.obj \
Packit 47f805
	libmp3lame\i386\fft3dn.obj \
Packit 47f805
	libmp3lame\i386\fftsse.obj
Packit 47f805
Packit 47f805
#	not yet coded
Packit 47f805
#CC_SWITCHES = $(CC_SWITCHES) -DUSE_FFTFPU
Packit 47f805
#ASM_OBJ = $(ASM_OBJ) libmp3lame\i386\fftfpu.obj
Packit 47f805
#______________________________________________________________________ MASM __
Packit 47f805
Packit 47f805
Packit 47f805
#__ NASM ______________________________________________________________________
Packit 47f805
#
Packit 47f805
#	NASM: Netwide Assembler
Packit 47f805
#
Packit 47f805
!	ELSEIF "$(ASM)" == "YES"
Packit 47f805
#
Packit 47f805
.SUFFIXES : .nas
Packit 47f805
.nas.obj:
Packit 47f805
	@echo $<
Packit 47f805
	@nasmw -f $(OFF) -i libmp3lame/i386/ -DWIN32 $< -o $@
Packit 47f805
Packit 47f805
CC_SWITCHES = $(CC_SWITCHES) /DHAVE_NASM
Packit 47f805
ASM_OBJ = $(ASM_OBJ) \
Packit 47f805
	libmp3lame\i386\cpu_feat.obj \
Packit 47f805
	libmp3lame\i386\fft3dn.obj \
Packit 47f805
	libmp3lame\i386\fftsse.obj
Packit 47f805
Packit 47f805
#	not yet coded
Packit 47f805
#CC_SWITCHES = $(CC_SWITCHES) /DUSE_FFTFPU
Packit 47f805
#ASM_OBJ = $(ASM_OBJ) libmp3lame/i386/fftfpu.obj
Packit 47f805
#______________________________________________________________________ NASM __
Packit 47f805
Packit 47f805
!	ELSE
Packit 47f805
!	MESSAGE Pass ASM=YES to build the assembler optimizations
Packit 47f805
!	ENDIF
Packit 47f805
Packit 47f805
Packit 47f805
#__ MMX _______________________________________________________________________
Packit 47f805
#
Packit 47f805
#	you need NASM but *not necessarily* a processor with MMX
Packit 47f805
#	The above CPU feature detection code allows to run the same
Packit 47f805
#	binary on a CPU without MMX too!
Packit 47f805
#
Packit 47f805
!	IF "$(ASM)" == "YES"
Packit 47f805
!	IF "$(MMX)" == "YES"
Packit 47f805
CC_SWITCHES = $(CC_SWITCHES) /DMMX_choose_table
Packit 47f805
ASM_OBJ = $(ASM_OBJ) libmp3lame/i386/choose_table.obj
Packit 47f805
!	ENDIF
Packit 47f805
!	ENDIF
Packit 47f805
#_______________________________________________________________________ MMX __
Packit 47f805
Packit 47f805
!	MESSAGE
Packit 47f805
Packit 47f805
no_target_specified :	$(PGM)
Packit 47f805
	@echo.
Packit 47f805
	@echo --=*  $(PGM) uptodate  *=--
Packit 47f805
	@echo.
Packit 47f805
Packit 47f805
target_directory :
Packit 47f805
	@if not exist $(TARGET_DIR) mkdir $(TARGET_DIR)
Packit 47f805
	
Packit 47f805
common:	$(CMMN_OBJ)
Packit 47f805
	@echo.
Packit 47f805
	@echo --- COMMON FRONTEND STUFF UPTODATE ---
Packit 47f805
	@echo.
Packit 47f805
Packit 47f805
libA:	$(LIB_OBJ)
Packit 47f805
	@echo.
Packit 47f805
	@echo --- LAME MP3 ENCODING LIBRARY UPTODATE ---
Packit 47f805
	@echo.
Packit 47f805
Packit 47f805
libB:	$(HIP_OBJ)
Packit 47f805
	@echo.
Packit 47f805
	@echo --- HIP DECODING LIBRARY UPTODATE ---
Packit 47f805
	@echo.
Packit 47f805
Packit 47f805
lib: $(ASM_OBJ) libA libB
Packit 47f805
Packit 47f805
lame.res: ./libmp3lame/lame.rc
Packit 47f805
	@rc.exe /d "NDEBUG" /d "_APP=lame.exe" /l 0x409 /fo"./frontend/lame.res" "./libmp3lame/lame.rc"
Packit 47f805
Packit 47f805
mp3rtp.res: ./libmp3lame/lame.rc
Packit 47f805
	@rc.exe /d "NDEBUG" /d "_APP=mp3rtp.exe" /l 0x409 /fo"./frontend/mp3rtp.res" "./libmp3lame/lame.rc"
Packit 47f805
Packit 47f805
mp3x.res: ./libmp3lame/lame.rc
Packit 47f805
	@rc.exe /d "NDEBUG" /d "_APP=mp3x.exe" /l 0x409 /fo"./frontend/mp3x.res" "./libmp3lame/lame.rc"
Packit 47f805
Packit 47f805
lame_enc.res: ./libmp3lame/lame.rc
Packit 47f805
	@rc.exe /d "NDEBUG" /d "_DLL=lame_enc.dll" /l 0x409 /fo"./frontend/lame_enc.res" "./libmp3lame/lame.rc"
Packit 47f805
Packit 47f805
$(T_LAME) : target_directory config.h $(T_LIB_STATIC) common $(LAME_OBJ) lame.res
Packit 47f805
	@$(LN) $(LN_OUT)$(TARGET_DIR)$@ $(LN_SWITCHES) $(LIBSNDFILE) \
Packit 47f805
	       $(TARGET_DIR)$(T_LIB_STATIC) $(CMMN_OBJ) $(LAME_OBJ) $(ADDL_OBJ) \
Packit 47f805
	       ./frontend/lame.res
Packit 47f805
	@echo.
Packit 47f805
	@echo --=*  $(TARGET_DIR)$@ ready  *=--
Packit 47f805
	@echo.
Packit 47f805
Packit 47f805
$(T_MP3X) : target_directory config.h lib common $(MPX_OBJ) mp3x.res
Packit 47f805
	@$(LN) $(LN_OUT)$(TARGET_DIR)$@ $(LN_SWITCHES) $(GTK_LIBS) $(LIBSNDFILE) \
Packit 47f805
	       $(TARGET_DIR)$(T_LIB_STATIC) $(CMMN_OBJ) $(MPX_OBJ) $(ADDL_OBJ) \
Packit 47f805
	       ./frontend/mp3x.res
Packit 47f805
	@echo.
Packit 47f805
	@echo --=*  $(TARGET_DIR)$@ ready  *=--
Packit 47f805
	@echo.
Packit 47f805
Packit 47f805
$(T_MP3RTP) : target_directory config.h lib common $(MPRTP_OBJ) mp3rtp.res
Packit 47f805
	@$(LN) $(LN_OUT)$(TARGET_DIR)$@ $(LN_SWITCHES) $(LIBSNDFILE) \
Packit 47f805
	       $(TARGET_DIR)$(T_LIB_STATIC) $(CMMN_OBJ) $(MPRTP_OBJ) $(ADDL_OBJ) \
Packit 47f805
	       ./frontend/mp3rtp.res wsock32.lib
Packit 47f805
	@echo.
Packit 47f805
	@echo --=*  $(TARGET_DIR)$@ ready  *=--
Packit 47f805
	@echo.
Packit 47f805
Packit 47f805
$(T_LEGACY_DLL) : target_directory config.h $(DLL_OBJ) lame_enc.res
Packit 47f805
	@$(LN) $(LN_OUT)$(TARGET_DIR)$@ $(LN_SWITCHES) \
Packit 47f805
	       $(TARGET_DIR)$(T_LIB_STATIC) $(LN_DLL) \
Packit 47f805
	       $(DLL_OBJ) $(ADDL_OBJ) ./frontend/lame_enc.res user32.lib
Packit 47f805
	@echo.
Packit 47f805
	@echo --=*  $(TARGET_DIR)$@ ready  *=--
Packit 47f805
	@echo.
Packit 47f805
Packit 47f805
$(T_DLL) : target_directory config.h $(T_LIB_STATIC) 
Packit 47f805
	@$(LN) $(LN_DLL) $(MACHINE) \
Packit 47f805
		/DEF:"include\lame.def" \
Packit 47f805
		$(ADDL_OBJ) \
Packit 47f805
		$(LN_OUT)"$(TARGET_DIR)$@" \
Packit 47f805
		$(TARGET_DIR)$(T_LIB_STATIC) libmp3lame\version.obj 
Packit 47f805
	@echo.
Packit 47f805
	@echo --=*  $(TARGET_DIR)$@ ready  *=--
Packit 47f805
	@echo.
Packit 47f805
Packit 47f805
$(T_LIB_STATIC) : target_directory lib
Packit 47f805
	@lib $(LIB_OPTS) \
Packit 47f805
		/OUT:"$(TARGET_DIR)$@" \
Packit 47f805
		$(ASM_OBJ) $(LIB_OBJ) $(HIP_OBJ)
Packit 47f805
	@echo.
Packit 47f805
	@echo --=*  $(TARGET_DIR)$@ ready  *=--
Packit 47f805
	@echo.
Packit 47f805
		
Packit 47f805
config.h : configMS.h
Packit 47f805
	@-copy configMS.h config.h
Packit 47f805
Packit 47f805
clean:
Packit 47f805
	@-del $(TARGET_DIR)$(T_LAME)
Packit 47f805
	@-del $(TARGET_DIR)$(T_MP3X)
Packit 47f805
	@-del $(TARGET_DIR)$(T_MP3RTP)
Packit 47f805
	@-del $(TARGET_DIR)$(T_DLL)
Packit 47f805
	@-del $(TARGET_DIR)$(T_LIB_STATIC)
Packit 47f805
	@-del $(TARGET_DIR)$(T_LIB_DYNAMIC)
Packit 47f805
	@-del $(TARGET_DIR)$(T_LEGACY_DLL)
Packit 47f805
	@-del lame.pdb
Packit 47f805
	@-del icl.pch
Packit 47f805
	@-del $(TARGET_DIR)lame_enc.*
Packit 47f805
	@-del frontend\*.obj
Packit 47f805
	@-del dll\*.obj
Packit 47f805
	@-del mpglib\*.obj
Packit 47f805
	@-del libmp3lame\*.obj
Packit 47f805
	@-del libmp3lame\i386\*.obj
Packit 47f805
	@-del libmp3lame\vector\*.obj
Packit 47f805
	@-del libmp3lame\*.res
Packit 47f805
	@-del frontend\*.res
Packit 47f805
Packit 47f805
Packit 47f805
rebuild: clean all
Packit 47f805
Packit 47f805
Packit 47f805
lame	:	$(T_LAME)
Packit 47f805
lame_enc:	$(T_LEGACY_DLL)
Packit 47f805
dll 	:	$(T_DLL) $(T_LEGACY_DLL) 
Packit 47f805
mp3x	:	$(T_MP3X)
Packit 47f805
mp3rtp	:	$(T_MP3RTP)
Packit 47f805
Packit 47f805
Packit 47f805
all :	$(PGM) mp3rtp dll lame_enc 
Packit 47f805
	@echo.
Packit 47f805
	@echo --=*  all uptodate  *=--
Packit 47f805
	@echo.