!IF 0
Copyright (c) 1989-1996 Microsoft Corporation
Abstract:
This file specifies the target component being built and the list of
sources files needed to build that component. Also specifies optional
compiler switches and libraries that are unique for the component being
built. Makefile for project "foo".
!ENDIF
!IF "$(DEBUG)"=="1"
LDEFINES=$(LDEFINES) -debug:full -debugtype:both -pdb:none
CFLAGS=$(CFLAGS) -Z7 -Od
TYPE=debug
!ELSE
TYPE=retail
!ENDIF
PROJ=foo
OUTDIR=$(TYPE)_$(TARGETCPU)
OBJS= $(OUTDIR)\foo1.obj \
$(OUTDIR)\foo2.obj \
$(OUTDIR)\foo3.obj
GLOBAL_DEP= foo.h
CFLAGS= $(CFLAGS) -nologo -W3 -c
RFLAGSS= $(RFLAGS) -r
RC_FILE= foo.rc
RES_FILE=$(OUTDIR)\$(PROJ).res
I386EM_TARGETLIBS=user32.lib \
commctrl.lib \
kernel32.lib \
gdi32.lib \
mscvrt.lib
MIPSEM_TARGETLIBS=user32.lib \
commctrl.lib \
kernel32.lib \
gdi32.lib \
msvcrt.lib
SH3_TARGETLIBS=commctrl.lib \
coredll.lib \
libc.lib
R4100_TARGETLIBS=commctrl.lib \
coredll.lib \
libc.lib
!IF "$(TARGETCPU)"=="i386"
TARGETLIBS=$(I386EM_TARGETLIBS)
MACHINE_OPTION= $(TARGETCPU)
EXEENTRY = WinMainCRTStartup
!ENDIF
!IF "$(TARGETCPU)"=="MIPS"
TARGETLIBS=$(MIPSEM_TARGETLIBS)
MACHINE_OPTION= $(TARGETCPU)
EXEENTRY = WinMainCRTStartup
!ENDIF
!IF "$(TARGETCPU)"=="SH3"
TARGETLIBS=$(SH3_TARGETLIBS)
MACHINE_OPTION= $(TARGETCPU)
EXEENTRY = WinMain
!ENDIF
!IF "$(TARGETCPU)"=="R4100"
TARGETLIBS=$(R4100_TARGETLIBS)
MACHINE_OPTION= MIPS
EXEENTRY = WinMain
!ENDIF
$(OUTDIR)\$(PROJ).exe: $(OUTDIR) $(OBJS) $(RES_FILE)
link $(LDEFINES) $(OBJS) $(TARGETLIBS) $(RES_FILE) \
-out:$(OUTDIR)\$(PROJ).exe -entry:$(EXEENTRY) -machine:$(MACHINE_OPTION)
$(OBJS): $$(@B).c $(GLOBAL_DEP)
$(CC) $(CFLAGS) $(CDEFINES) $(@B).c -Fo$@
$(RES_FILE): $(RC_FILE) $(GLOBAL_DEP) $(OUTDIR)
rc $(RFLAGS) $(RDEFINES) /fo$(RES_FILE) $(RC_FILE)
"$(OUTDIR)" :
if not exist "$(OUTDIR)" mkdir "$(OUTDIR)"
clean:
del /q $(OUTDIR)
nmake