home *** CD-ROM | disk | FTP | other *** search
- # Makefile : Builds the PHONE BOOK application
- #
- # Usage: NMAKE PHBOOK (build PHBOOK.EXE)
- # or: NMAKE -f phbook clean (erase all compiled files)
- #
- # option: DEBUG=[0|1] (DEBUG not defined is equivalent to DEBUG=0)
-
- # This is a part of the Microsoft Foundation Classes C++ library.
- # Copyright (C) 1992 Microsoft Corporation
- # All rights reserved.
- #
- # This source code is only intended as a supplement to the
- # Microsoft Foundation Classes Reference and Microsoft
- # QuickHelp documentation provided with the library.
- # See these sources for detailed information regarding the
- # Microsoft Foundation Classes product.
-
- CPPFLAGS= /DWINVER=0x0300 /AM /W3 /Zp /GA /GEs /G2
- LINKFLAGS=/NOD /ONERROR:NOEXE
- DIR=WIN
-
- !if "$(DEBUG)"=="1"
- CPPFLAGS=/D_DEBUG $(CPPFLAGS) /Od /Zi /f /Fo$*.OBJ
- LINKFLAGS=$(LINKFLAGS) /COD
- LIBS=mafxcwd libw mlibcew commdlg
- !else
- CPPFLAGS=$(CPPFLAGS) /Oselg /Gs /Fo$*.OBJ
- LINKFLAGS=$(LINKFLAGS)
- LIBS=mafxcw libw mlibcew commdlg
- !endif
-
- .cpp{$(DIR)}.obj:
- $(CPP) /c $(CPPFLAGS) $<
-
- .rc{$(DIR)}.res:
- $(RC) $(RFLAGS) /r /fo $@ $<
-
- phbook.exe : $(DIR)\phbook.exe
- copy $** $@
-
- $(DIR)\phbook.exe: $(DIR) $(DIR)\person.obj $(DIR)\view.obj \
- $(DIR)\database.obj phbook.def $(DIR)\phbook.res
- link $(LINKFLAGS) @<<
- $(DIR)\person $(DIR)\view $(DIR)\database,
- $@,
- NUL,
- $(LIBS),
- phbook.def;
- <<
- rc -30 /k /t $(DIR)\phbook.res
-
- $(DIR):
- @IF NOT EXIST $(DIR)\*.* MD $(DIR)
-
-
- person.obj : person.h
- database.h : person.h
- database.obj : database.h
- view.obj : view.h database.h resource.h
- phbook.res : resource.h phbook.ico phbook.rc phbook.dlg
-
- clean:
- -del $(DIR)\person.obj
- -del $(DIR)\view.obj
- -del $(DIR)\phbook.res
- -del $(DIR)\database.obj
- -del $(DIR)\phbook.exe
-