199 lines
5.2 KiB
Plaintext
199 lines
5.2 KiB
Plaintext
# ============================================================================
|
||
# File: M A K E F I L E
|
||
#
|
||
# NMAKE description file for the SIMPSVR (in-place server) sample
|
||
#
|
||
# This is a part of the Microsoft OLE 2.0 sample library.
|
||
# Copyright (C) Microsoft Corporation, 1992-1993. All Rights Reserved.
|
||
# ============================================================================
|
||
#
|
||
# Usage: NMAKE (build DEBUG exe)
|
||
# NMAKE DEBUG=0 (build RELEASE exe)
|
||
#
|
||
# ============================================================================
|
||
|
||
DEBUG=1
|
||
WIN32=1
|
||
MACHINE_TYPE=i386
|
||
APPNAME=simpsvr
|
||
LANG=USA
|
||
|
||
OPSYS=NT1X
|
||
EXPORT=1
|
||
|
||
#############################################################################
|
||
# The following needs to be changed when we ship the sample app. Plus the
|
||
# locations of simpsvr.exe and the UI libraries. (Look for D_LIBS, R_LIBS,
|
||
# and $(APPNAME).exe) Also, we don't need the EXPORT above.
|
||
#
|
||
|
||
!if "$(OPSYS)"=="NT1X"
|
||
OBJDIR=OBJi1d
|
||
|
||
# Location for NT SDK headers and libraries
|
||
NT_INC_DIR=$(IMPORT)\$(OPSYS)\h\sdk;$(IMPORT)\$(OPSYS)\h\sdk\crt;
|
||
NT_LIB_DIR=$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)
|
||
!else
|
||
OBJDIR=OBJidd
|
||
|
||
# Location for Chicago SDK headers and libraries
|
||
NT_INC_DIR=$(IMPORT)\CHICAGO\h;$(IMPORT)\CHICAGO\h\crt;
|
||
NT_LIB_DIR=$(IMPORT)\CHICAGO\lib
|
||
!endif
|
||
|
||
# path for OLE headers and libraries
|
||
!if "$(EXPORT)"=="1"
|
||
OLE232_INC_DIR=$(CAIROLE)\h\export;$(NT_INC_DIR)
|
||
!else
|
||
OLE232_INC_DIR=$(CAIROLE)\h;$(CAIROLE)\common;$(NT_INC_DIR)
|
||
!endif # EXPORT
|
||
|
||
OLE232_LIB_DIR=$(CAIROLE)\ilib\$(OBJDIR);$(NT_LIB_DIR)
|
||
|
||
# location of the UI libraries
|
||
OLE2UI_DIR=..\ole2ui
|
||
OLE2UI_LIB_DIR=..\ole2ui\$(OBJDIR)
|
||
|
||
# tools that we are using in this build
|
||
CL=$(IMPORT)\n386\bin\cl
|
||
LINK=$(COMMON)\bin\link
|
||
RC=$(COMMON)\bin\rc
|
||
|
||
# Ensure that "nmake clean" will pick this file to do the cleaning.
|
||
NMAKE=nmake -f makefile.new
|
||
|
||
# The location of resources from the UI library
|
||
RES=RESOURCE
|
||
|
||
#############################################################################
|
||
|
||
GOAL: set_vars $(APPNAME).exe
|
||
|
||
PCH=pre
|
||
|
||
SRCS=$(PCH).cpp app.cpp $(APPNAME).cpp icf.cpp iec.cpp ioipo.cpp ips.cpp \
|
||
doc.cpp ido.cpp ioipao.cpp ioo.cpp obj.cpp
|
||
|
||
INCS=$(PCH).h $(APPNAME).h obj.h ioipao.h ioipo.h ioo.h ips.h ido.h iec.h \
|
||
app.h doc.h
|
||
|
||
OBJS=$(SRCS:cpp=obj)
|
||
|
||
#############################################################################
|
||
|
||
#
|
||
# Set the resource directories. These are the directories where we pull our
|
||
# resources from. You may need to change these to point to the proper location
|
||
# of the OLE2UI resources, or just copy all the .DLG and .BMP files into your
|
||
# project's directory.
|
||
#
|
||
|
||
!if "$(RES_DIRS)"==""
|
||
RES_DIRS = $(OLE2UI_DIR)\$(RES)\STATIC;$(OLE2UI_DIR)\$(RES)\$(LANG)
|
||
!endif
|
||
|
||
!if "$(WIN32)"=="1"
|
||
#
|
||
# 32-bit C/C++ Compiler
|
||
#
|
||
G_LIBS=advapi32.lib crtdll.lib gdi32.lib kernel32.lib user32.lib ntdll.lib \
|
||
ole232.lib storag32.lib compob32.lib
|
||
WIN32FLAGS= /DUNICODE /D_WINDOWS /D_UNICODE /DINC_OLE2 /D_MT /DSTRICT \
|
||
/Di386=1 /D_X86_=1
|
||
# For Chicago Build
|
||
!if "$(OPSYS)"=="DOS"
|
||
WIN32FLAGS=$(WIN32FLAGS) /D_INC_OLE /DWIN32=200 /D_CHICAGO_=200
|
||
!else
|
||
WIN32FLAGS=$(WIN32FLAGS) /DWIN32=100
|
||
!endif
|
||
G_CPPFLAGS=/G4f /W3 /Zp8 /Gz $(WIN32FLAGS) /Gys /Yu$(PCH).h
|
||
D_CPPFLAGS=/Z7 /Od /D_DEBUG /DDBG=1
|
||
R_CPPFLAGS=/O1 /Gs /Ogit
|
||
G_LINKFLAGS=/NOD /MACHINE:$(MACHINE_TYPE) /SECTION:.rsrc,r \
|
||
/SECTION:.guids,r /merge:.CRT=.data /STACK:16384
|
||
D_LINKFLAGS=/DEBUGTYPE:both,fixup /DEBUG:mapped,full
|
||
R_LINKFLAGS=/RELEASE
|
||
D_LIBS=$(OLE2UI_DIR)\$(OBJDIR)\ole2uixd.lib #..\lib\moleuicd
|
||
R_LIBS=$(OLE2UI_DIR)\$(OBJDIR)\ole2uix.lib #..\lib\moleuic
|
||
!else
|
||
#
|
||
# 16-bit C/C++ Compiler
|
||
#
|
||
G_LIBS=ole2 compobj storage libw shell
|
||
G_CPPFLAGS=/AM /G2 /W3 /Zp /Yu$(PCH).h /GA /GEs
|
||
D_CPPFLAGS=/Zi /Od /f /D_DEBUG
|
||
R_CPPFLAGS=/O1 /Gs
|
||
G_LINKFLAGS=/NOD /ONERROR:NOEXE /NOE /BATCH /STACK:16384
|
||
D_LINKFLAGS=/COD
|
||
R_LINKFLAGS=/FAR /PACKC
|
||
D_LIBS=mlibcew ..\lib\moleuicd
|
||
R_LIBS=mlibcew ..\lib\moleuic
|
||
!endif
|
||
|
||
!if "$(DEBUG)"=="0"
|
||
CPPFLAGS=$(G_CPPFLAGS) $(R_CPPFLAGS)
|
||
LINKFLAGS=$(G_LINKFLAGS) $(R_LINKFLAGS)
|
||
LIBS=$(R_LIBS) $(G_LIBS)
|
||
!else
|
||
CPPFLAGS=$(G_CPPFLAGS) $(D_CPPFLAGS)
|
||
LINKFLAGS=$(G_LINKFLAGS) $(D_LINKFLAGS)
|
||
LIBS=$(D_LIBS) $(G_LIBS)
|
||
!endif #//DEBUG
|
||
|
||
#############################################################################
|
||
|
||
set_vars:
|
||
set INCLUDE=$(OLE232_INC_DIR);$(OLE2UI_DIR);$(INCLUDE)
|
||
set LIB=$(OLE232_LIB_DIR);$(OLE2UI_LIB_DIR);$(LIB)
|
||
|
||
#############################################################################
|
||
|
||
$(APPNAME).exe: $(OBJS) $(APPNAME).def $(APPNAME).res
|
||
!if "$(WIN32)"=="1"
|
||
$(LINK) $(LINKFLAGS) @<<
|
||
$(OBJS: = ^
|
||
)
|
||
$(LIBS: = ^
|
||
)
|
||
$(APPNAME).res
|
||
/MAP:$(APPNAME).map
|
||
/OUT:$(APPNAME).exe
|
||
<<
|
||
!else
|
||
$(LINK) $(LINKFLAGS) @<<
|
||
$(OBJS: = +^
|
||
),
|
||
$(APPNAME),
|
||
$(APPNAME),
|
||
$(LIBS: = +^
|
||
),
|
||
$(APPNAME);
|
||
<<
|
||
$(RC) /k /t $(APPNAME).res
|
||
!endif
|
||
|
||
$(PCH).obj: $(INCS) $(PCH).cpp
|
||
$(NMAKE) clean
|
||
$(CL) $(CPPFLAGS) /Yc$(PCH).h /c $(PCH).cpp
|
||
|
||
.cpp.obj:
|
||
$(CL) @<<
|
||
$(CPPFLAGS) /c $<
|
||
<<
|
||
|
||
$(APPNAME).res: resource.h $(APPNAME).h
|
||
$(RC) /r /I$(RES_DIRS) $(APPNAME).rc
|
||
|
||
clean:
|
||
if exist $(APPNAME).exe erase $(APPNAME).exe
|
||
if exist *.pch erase *.pch
|
||
if exist *.obj erase *.obj
|
||
if exist *.sbr erase *.sbr
|
||
if exist *.pdb erase *.pdb
|
||
if exist *.map erase *.map
|
||
if exist *.res erase *.res
|
||
if exist *.aps erase *.aps
|
||
if exist *.bsc erase *.bsc
|
||
if exist *.wsp erase *.wsp
|
||
if exist *.vcw erase *.vcw
|
||
|