
CPP=cl.exe
RSC=rc.exe

OUTDIR=.\Codec
INTDIR=.\Codec

CODER : "$(OUTDIR)\encoder.exe" "$(OUTDIR)\decoder.exe"

CLEAN :
	-@erase "$(INTDIR)\encoder.obj"
	-@erase "$(INTDIR)\interf_enc.obj"
	-@erase "$(INTDIR)\sp_enc.obj"
	-@erase "$(OUTDIR)\encoder.exe"
	-@erase "$(INTDIR)\decoder.obj"
	-@erase "$(INTDIR)\interf_dec.obj"
	-@erase "$(INTDIR)\sp_dec.obj"
	-@erase "$(OUTDIR)\decoder.exe"

"$(OUTDIR)" :
    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

!IF "$(VAD)" == "VAD2"
OPT_PROJ=/D "VAD2"
!MESSAGE Code compiled with VAD2
!ENDIF
!IF "$(CFG)" == "ETSI"
OPT_PROJ= $(OPT_PROJ) /D "ETSI" 
!MESSAGE Code using ETSI frames
!ENDIF

CPP_PROJ=/nologo /G6 /ML /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
	
LINK32=link.exe

LINK32_FLAGS_ENCODER=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /machine:I386 /out:"$(OUTDIR)\encoder.exe" 
LINK32_FLAGS_DECODER=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /machine:I386 /out:"$(OUTDIR)\decoder.exe" 

LINK32_OBJS_DECODER= \
	"$(INTDIR)\decoder.obj" \
	"$(INTDIR)\interf_dec.obj" \
	"$(INTDIR)\sp_dec.obj"

LINK32_OBJS_ENCODER= \
	"$(INTDIR)\encoder.obj" \
	"$(INTDIR)\interf_enc.obj" \
	"$(INTDIR)\sp_enc.obj" 

"$(OUTDIR)\decoder.exe" : "$(OUTDIR)" $(LINK32_OBJS_DECODER)
    $(LINK32) $(DECODER) $(LINK32_FLAGS_DECODER) $(LINK32_OBJS_DECODER)
"$(OUTDIR)\encoder.exe" : "$(OUTDIR)" $(LINK32_OBJS_ENCODER)
    $(LINK32) $(ENCODER) $(LINK32_FLAGS_ENCODER) $(LINK32_OBJS_ENCODER)

SOURCE=.\decoder.c
"$(INTDIR)\decoder.obj" : $(SOURCE) "$(INTDIR)"
	$(CPP) $(CPP_PROJ) $(OPT_PROJ) $(SOURCE)

SOURCE=.\interf_dec.c
"$(INTDIR)\interf_dec.obj" : $(SOURCE) "$(INTDIR)"
	$(CPP) $(CPP_PROJ) $(OPT_PROJ) $(SOURCE)

SOURCE=.\sp_dec.c
"$(INTDIR)\sp_dec.obj" : $(SOURCE) "$(INTDIR)"
	$(CPP) $(CPP_PROJ) $(OPT_PROJ) $(SOURCE)

SOURCE=.\encoder.c
"$(INTDIR)\encoder.obj" : $(SOURCE) "$(INTDIR)"
	$(CPP) $(CPP_PROJ) $(OPT_PROJ) $(SOURCE)

SOURCE=.\interf_enc.c
"$(INTDIR)\interf_enc.obj" : $(SOURCE) "$(INTDIR)"
	$(CPP) $(CPP_PROJ) $(OPT_PROJ) $(SOURCE)

SOURCE=.\sp_enc.c
"$(INTDIR)\sp_enc.obj" : $(SOURCE) "$(INTDIR)"
	$(CPP) $(CPP_PROJ) $(OPT_PROJ) $(SOURCE)
	

	






