# Makefile.MSVC: MSVC Makefile for LAME 3.81 (alpha1)

PGM = lame

# Microsoft C options
# CC = cl
# LN = link

# Intel 4.5 compiler
CC = icl
LN = xilink

# debugging options
# CC_OPTS = /nologo /Zi /Ge /GZ
# LN_OPTS = /nologo /debug:full /debugtype:cv /fixed:no

# profiling options
# CC_OPTS = /nologo /Zi /O2ab2gitwy /G6AFs /DNDEBUG 
# LN_OPTS = /nologo /debug:full /debugtype:cv /fixed:no /profile

# release options
# CC_OPTS = /nologo /O2ab2gitwy /G6AFs /DNDEBUG 
# LN_OPTS = /nologo

# Intel 4.5 options
CC_OPTS = /nologo /DNDEBUG /Qunroll /O2 /G5AFs /QaxM /Qipo_obj /QIfist- 
LN_OPTS = /nologo

GTK =
GTKLIBS =
SNDLIB = /DLAMESNDFILE
LIBSNDFILE =
LIBS =
MAKEDEP =
TIMER_SWITCH =
BRHIST_SWITCH = # /DBRHIST
LIBTERMCAP =
#
# uncomment the following if you have Vorbis
#
#VORBIS = /DHAVEVORBIS -I..\vorbis\include
#VORBIS_LIB = -L..\vorbis\lib -lvorbis

CPP_OPTS = /DHAVEMPGLIB 

CC_SWITCHES = $(CC_OPTS) $(DISTRIB) $(SNDLIB) $(GTK) \
              /DBS_FORMAT=BINARY $(TIMER_SWITCH) $(BRHIST_SWITCH) $(VORBIS)
LN_SWITCHES = $(LN_OPTS)

c_sources = \
 main.c \
        gtkanal.c \
        gpkplotting.c \
 brhist.c \
 bitstream.c \
 fft.c \
 get_audio.c \
 id3tag.c \
 ieeefloat.c \
 lame.c \
 newmdct.c \
 parse.c \
 portableio.c \
 psymodel.c \
 quantize.c \
 quantize-pvt.c \
 vbrquantize.c \
 reservoir.c \
 tables.c \
 takehiro.c \
 timestatus.c \
 util.c \
 VbrTag.c \
 version.c \
 vorbis_interface.c \
 mpglib/common.c \
 mpglib/dct64_i386.c \
 mpglib/decode_i386.c \
 mpglib/layer3.c \
 mpglib/tabinit.c \
 mpglib/interface.c \
 mpglib/main.c 

OBJ = $(c_sources:.c=.obj)

.c.obj:
 @$(CC) $(CC_SWITCHES) $(CPP_OPTS) /c $< /Fo$@

$(PGM).exe: $(OBJ) Makefile.MSVC
 @echo $(PGM).exe
 @$(LN) $(LN_SWITCHES) $(OBJ) $(LIBS) $(LIBSNDFILE) $(GTKLIBS) \
   $(LIBTERMCAP) /out:$(PGM).exe /map:$(PGM).map

clean:
 @-del *.obj
 @-del dll\*.obj
 @-del mpglib\*.obj

rebuild: clean $(PGM).exe



