
# Project: asfrecorder - makefile for NMAKE.EXE

!if "$(GUI)" == ""
GUI = none
!endif

OUTDIR=.
INTDIR=source
SRCDIR=source

!if "$(GUI)" != ""
GUIDIR=source\$(GUI)
!endif

ALL : "$(OUTDIR)\ASFRecorder.exe"


# for cleaning up

CLEAN :
	-@erase "$(OUTDIR)\asfrecorder.bsc"

	-@erase "$(INTDIR)\asfrecorder.obj"
	-@erase "$(GUIDIR)\wingui.obj"
	-@erase "$(GUIDIR)\CmdLine.obj"
	-@erase "$(GUIDIR)\wingui.res"

# this stuff generated by VC++ project file

	-@erase "$(INTDIR)\vc60.idb"
	-@erase "$(INTDIR)\vc60.pdb"
	-@erase "$(INTDIR)\asfrecorder.pch"
	-@erase "$(INTDIR)\asfrecorder.sbr"

	-@erase "$(GUIDIR)\vc60.idb"
	-@erase "$(GUIDIR)\vc60.pdb"
	-@erase "$(GUIDIR)\wingui.pch"
	-@erase "$(GUIDIR)\wingui.sbr"
	-@erase "$(GUIDIR)\wingui.plg"
	-@erase "$(GUIDIR)\wingui.bsc"
	-@erase "$(GUIDIR)\wingui.aps"

	-@erase "$(GUIDIR)\CmdLine.sbr"
	-@erase "$(GUIDIR)\CmdLine.pch"

	-@erase "asfrecorder.ncb"
	-@erase "asfrecorder.pdb"
	-@erase "asfrecorder.ilk"
	-@erase "asfrecorder.opt"
	-@erase "asfrecorder.plg"


# common compiler and linker executables/options/libraries

CPP=cl.exe
CPP_OPTS=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /c
LINK32=link.exe
LINK32_OBJS= "$(INTDIR)\asfrecorder.obj"
LINK32_LIBS=ws2_32.lib
LINK32_FLAGS=/nologo /PDB:NONE /incremental:no /machine:I386 /out:"$(OUTDIR)\ASFRecorder.exe" 
RSC=rc.exe


# add compiler and linker options for console version

!if "$(GUI)" == "none"

CPP_OPTS = $(CPP_OPTS) /D "_CONSOLE" 
LINK32_FLAGS= $(LINK32_FLAGS) /subsystem:console 
LINK32_LIBS=setargv.obj $(LINK32_LIBS)

!endif


# add compiler and linker options for Windows GUI

!if "$(GUI)" == "wingui"

CPP_OPTS = $(CPP_OPTS) /D "GUI"

LINK32_OBJS = $(LINK32_OBJS) "$(GUIDIR)\wingui.obj" "$(GUIDIR)\CmdLine.obj" "$(GUIDIR)\wingui.res"

LINK32_FLAGS= $(LINK32_FLAGS) /NODEFAULTLIB /subsystem:windows,4.0 /entry:WinMainCRTStartup

LINK32_LIBS= msvcrt.lib libc.lib oldnames.lib kernel32.lib advapi32.lib version.lib largeint.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib strmbase.lib quartz.lib $(LINK32_LIBS) 

!endif


# source/target file dependencies

"$(INTDIR)\asfrecorder.obj" : "$(SRCDIR)\asfrecorder.c"
   $(CPP) $(CPP_OPTS) "$(SRCDIR)\asfrecorder.c" /Fo$@

!if "$(GUI)" == "wingui"

"$(GUIDIR)\wingui.res" : "$(GUIDIR)\wingui.rc" "$(GUIDIR)\resource.h"
   $(RSC) $(RES_OPTS) /fo$@ "$(GUIDIR)\wingui.rc"

"$(GUIDIR)\wingui.obj" : "$(GUIDIR)\wingui.c" "$(GUIDIR)\global.h" "$(GUIDIR)\CmdLine.c"
   $(CPP) $(CPP_OPTS) "$(GUIDIR)\wingui.c" /Fo$@

"$(GUIDIR)\CmdLine.obj" : "$(GUIDIR)\CmdLine.c" "$(GUIDIR)\CmdLine.h"
   $(CPP) $(CPP_OPTS) "$(GUIDIR)\CmdLine.c" /Fo$@

!endif


# linkage

"$(OUTDIR)\ASFRecorder.exe" : $(LINK32_OBJS)
    $(LINK32) $(LINK32_FLAGS) $(LINK32_OBJS) $(LINK32_LIBS)
