Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

503 lines
16 KiB

# ============================================================================
# File: MAKELIB
#
# NMAKE description file to build STATIC version of OLE2.0 User Interface LIB
#
# Copyright (C) Microsoft Corporation, 1992-1993. All Rights Reserved.
# ============================================================================
#
# Usage Notes:
# -----------
#
# This makefile is designed to be used in one step. This makefile does
# NOT use the file called UIMAKE.INI. This makefile builds the following
# libraries (depending on the value of "LIBFORDLL" and "DEBUG"):
# OLE2UIX.LIB -- static RETAIL library to be used with EXE's
# OLE2UIXD.LIB -- static DEBUG library to be used with EXE's
#
# OLE2UID.LIB -- static RETAIL library to be used with DLL's
# OLE2UIDD.LIB -- static DEBUG library to be used with DLL's
#
# It is NOT necessary to build custom versions of the static
# library version of OLE2UI. Everyone can use the same static OLE2UI
# libraries as built by this makefile.
#
# NMAKE -F MAKELIB
# NMAKE -F MAKELIB DEBUG=0
# NMAKE -F MAKELIB LIBFORDLL=1
# NMAKE -F MAKELIB LIBFORDLL=1 DEBUG=0
#
#
# The following lists a few of the settings in this makefile file which
# you might change, and what effect those changes might have. For a
# complete listing of all the available options and how they are used,
# see the makefile below.
#
# MODEL=[M|L] -- The memory model. (Default: M)
# DEBUG=[0|1] -- Enable DEBUG or RETAIL version (Default: 1)
# LIBFORDLL=[0|1] -- Enable DEBUG or RETAIL version (Default: 0)
# SAMPLIB_DIR -- Directory to install built .LIB file
# (Default: \ole2\samp\bin)
# SAMPINC_DIR -- Directory to install public header files
# (Default: \ole2\samp\include)
# OLELIB_DIR -- Directory for OLE2 libraries
# (Default: \ole2\bin)
# OLEINC_DIR -- Directory for OLE2 public header files
# (Default: \ole2\include)
#
# Comments:
# --------
#
# In order to use the static library form of the OLE2UI library then you must
# include "ole2ui.rc" resource file in your applications resource file. Also
# "OleUIInitialize" must be called before calling any library functions.
# This is called typically before entering the main message loop in an EXE
# and called from LibMain for an in-proc server (DLL). Two unique strings
# should be passed as paramters to OleUIInitialize. These strings are used
# as class names for two custom controls used in the OLE2UI dialogs.
# Before shutting down "OleUIUninitialize" must be called in order to clean up
# resources used by the OLE2UI library. In an EXE, this is typically called
# after leaving the main message loop; in an DLL, this is typically called
# from the DLL's WEP function.
# If the OLE2UI library is used in DLL form then explicitly including the
# "ole2ui.rc" resource file and calling OleUIInitialize/OleUIUninitialize
# is NOT necessary.
# ============================================================================
DEBUG=1
MODEL=M
LIBFORDLL=0
NOASSERT=1
OLE201=1
DOS=1
!if "$(OPSYS)"=="DOS"
OBJDIR=objidd
!else
OBJDIR=obji1d
!endif
!ifndef SAMPINC_DIR
SAMPINC_DIR=..\include
!endif
!ifndef SAMPLIB_DIR
SAMPLIB_DIR=..\lib
!endif
!ifndef OLEINC_DIR
!if "$(OPSYS)"=="DOS"
OLEINC_DIR=..\..\include;$(CAIROLE)\h\export;$(IMPORT)\CHICAGO\h;\
$(IMPORT)\CHICAGO\h\crt;$(COMMON)\ih;$(COMMON)\types
!else
OLEINC_DIR=..\..\include;$(CAIROLE)\h\export;$(IMPORT)\$(OPSYS)\h\sdk;\
$(IMPORT)\$(OPSYS)\h\sdk\crt;$(COMMON)\ih;$(COMMON)\types
!endif
!endif
!ifndef OLELIB_DIR
!if "$(OPSYS)"=="DOS"
OLELIB_DIR=..\..\lib;$(CAIROLE)\ilib\$(OBJDIR);$(IMPORT)\chicago\lib
!else
OLELIB_DIR=..\..\lib;$(CAIROLE)\ilib\$(OBJDIR)
!endif
!endif
!if ("$(OLE201)"=="1")
MISCFLAGS=/DOLE201
!endif
!if ("$(NOASSERT)"=="1")
MISCFLAGS=$(MISCFLAGS) /DNOASSERT
!endif
!if ("$(DEBUG)"=="1")
MSG=DEBUG Static LIB Version
#CFLAGS=-c -Od -GA2s -W3 -Zpei -A$(MODEL) -D_DEBUG
!ifdef WIN16
LFLAGS=/MAP:FULL /CO /LINE /NOD /NOE /SE:300 /NOPACKCODE
!else
LFLAGS=/MAP:$(O)$(LIBNAME).map /DEBUGTYPE:CV /NOD /NOPACK
!endif
CC=$(IMPORT)\n386\bin\cl
AS=$(IMPORT)\n386\bin\masm
RS=$(IMPORT)\n386\bin\rc
LINK=$(COMMON)\bin\link $(LFLAGS)
LIB=lib
!if ("$(LIBFORDLL)"=="1")
#
# Build DEBUG OLE2UI library for use with DLL's (eg. in-proc server objects)
#
MSG=DEBUG Static LIB Version (for use with DLL's)
LIBNAME=OLE2UIDD
OBJ=OLE2UIDD
CFLAGS=-c -Od -W3 -Zpei -D_DEBUG -DDLL_VER -D_WINDLL -DLIBNAME=\"$$(LIBNAME)\"
!ifdef WIN16
CFLAGS=$(CFLAGS) -GD -GEd -AMw
UILIBS=ldllcew libw ole2 storage shell
!else
CFLAGS=$(CFLAGS) -Gd -DWIN32 -DUNICODE -D_UNICODE -D_INC_OLE -D_X86_ $(MISCFLAGS)
UILIBS=libw32.lib storag32.lib shell32.lib
!if "$(OLE201)"=="1"
UILIBS=$(UILIBS) ole2w32.lib
!else
UILIBS=$(UILIBS) ole232.lib
!endif
!endif
LIBOBJS = $(UI_COBJS:D^\=OLE2UIDD^\) $(UI_NOPCOBJS:D^\=OLE2UIDD\NOPC^\)
!else
#
# Build DEBUG OLE2UI library for use with EXE's
#
MSG=DEBUG Static LIB Version (for use with EXE's)
LIBNAME=OLE2UIXD
OBJ=OLE2UIXD
CFLAGS=-c -Od -W3 -Zpei #-D_DEBUG
!ifdef WIN16
CFLAGS=$(CFLAGS) -GA2s -A$(MODEL)
UILIBS=mlibcew libw ole2 storage shell
!else
CFLAGS=$(CFLAGS) -Gs -DWIN32 -DUNICODE -D_UNICODE -D_INC_OLE -D_X86_ $(MISCFLAGS)
!if "$(OPSYS)"=="DOS"
UILIBS= $(IMPORT)\CHICAGO\lib\advapi32.lib \
$(IMPORT)\CHICAGO\lib\comdlg32.lib \
$(IMPORT)\CHICAGO\lib\crtdll.lib \
$(IMPORT)\CHICAGO\lib\gdi32.lib \
$(IMPORT)\CHICAGO\lib\kernel32.lib \
$(IMPORT)\CHICAGO\lib\libcmt.lib \
$(IMPORT)\CHICAGO\lib\shell32.lib \
$(IMPORT)\CHICAGO\lib\user32.lib \
$(IMPORT)\CHICAGO\lib\wsock32.lib
!else
UILIBS= $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\advapi32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\comdlg32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\crtdll.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\gdi32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\kernel32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\libcmt.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\shell32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\user32.lib
!endif
UILIBS= $(UILIBS) \
$(CAIROLE)\ilib\$(OBJDIR)\ole2w32.lib \
$(CAIROLE)\ilib\$(OBJDIR)\storag32.lib \
$(CAIROLE)\ilib\$(OBJDIR)\compob32.lib
!endif
LIBOBJS = $(UI_COBJS:D^\=OLE2UIXD^\) $(UI_NOPCOBJS:D^\=OLE2UIXD\NOPC^\)
!endif
!else
#CFLAGS=-c -Os -GA2s -W3 -Zpe -A$(MODEL)
!ifdef WIN16
LFLAGS=/MAP:FULL /LINE /NOD /NOE /SE:300 /NOPACKCODE
!else
LFLAGS=/MAP:$(O)$(LIBNAME).map /NOD /NOPACK
!endif
CC=$(IMPORT)\n386\bin\cl
AS=$(IMPORT)\n386\bin\masm
RS=$(IMPORT)\n386\bin\rc
LINK=$(COMMON)\bin\link $(LFLAGS)
LIB=lib
!if ("$(LIBFORDLL)"=="1")
#
# Build RETAIL OLE2UI library for use with DLL's (eg. in-proc server objects)
#
MSG=RETAIL Static LIB Version (for use with DLL's)
LIBNAME=OLE2UID
OBJ=OLE2UID
CFLAGS=-c -Os -D_WINDLL -W3 -Zpe
!ifdef WIN16
CFLAGS=$(CFLAGS) -GD -GEd -A$(MODEL)
UILIBS=ldllcew libw ole2 storage shell
!else
CFLAGS=$(CFLAGS) -Gd -DWIN32 -DUNICODE -D_UNICODE -D_INC_OLE -D_X86_ $(MISCFLAGS)
!if "$(OPSYS)"=="DOS"
UILIBS= $(IMPORT)\CHICAGO\lib\advapi32.lib \
$(IMPORT)\CHICAGO\lib\comdlg32.lib \
$(IMPORT)\CHICAGO\lib\crtdll.lib \
$(IMPORT)\CHICAGO\lib\gdi32.lib \
$(IMPORT)\CHICAGO\lib\kernel32.lib \
$(IMPORT)\CHICAGO\lib\libcmt.lib \
$(IMPORT)\CHICAGO\lib\shell32.lib \
$(IMPORT)\CHICAGO\lib\user32.lib
!else
UILIBS= $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\advapi32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\comdlg32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\crtdll.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\gdi32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\kernel32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\libcmt.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\shell32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\user32.lib
!endif
UILIBS= $(UILIBS) \
$(CAIROLE)\ilib\$(OBJDIR)\ole2w32.lib \
$(CAIROLE)\ilib\$(OBJDIR)\storag32.lib \
$(CAIROLE)\ilib\$(OBJDIR)\compob32.lib
!endif
LIBOBJS = $(UI_COBJS:D^\=OLE2UID^\) $(UI_NOPCOBJS:D^\=OLE2UID\NOPC^\)
!else
#
# Build RETAIL OLE2UI library for use with EXE's
#
MSG=RETAIL Static LIB Version (for use with EXE's)
LIBNAME=OLE2UIX
OBJ=OLE2UIX
CFLAGS=-c -Os -W3 -Zpe
!ifdef WIN16
CFLAGS=$(CFLAGS) -GA2s -GEs -A$(MODEL)
UILIBS=mlibcew libw ole2 storage shell
!else
CFLAGS=$(CFLAGS) -Gs -DWIN32 -DUNICODE -D_UNICODE -D_INC_OLE -D_X86_ $(MISCFLAGS)
!if "$(OPSYS)"=="DOS"
UILIBS= $(IMPORT)\CHICAGO\lib\advapi32.lib \
$(IMPORT)\CHICAGO\lib\comdlg32.lib \
$(IMPORT)\CHICAGO\lib\crtdll.lib \
$(IMPORT)\CHICAGO\lib\gdi32.lib \
$(IMPORT)\CHICAGO\lib\kernel32.lib \
$(IMPORT)\CHICAGO\lib\libcmt.lib \
$(IMPORT)\CHICAGO\lib\shell32.lib \
$(IMPORT)\CHICAGO\lib\user32.lib
!else
UILIBS= $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\advapi32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\comdlg32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\crtdll.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\gdi32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\kernel32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\libcmt.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\shell32.lib \
$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\user32.lib
!endif
UILIBS= $(UILIBS) \
$(CAIROLE)\ilib\$(OBJDIR)\ole2w32.lib \
$(CAIROLE)\ilib\$(OBJDIR)\storag32.lib \
$(CAIROLE)\ilib\$(OBJDIR)\compob32.lib
!endif
LIBOBJS = $(UI_COBJS:D^\=OLE2UIX^\) $(UI_NOPCOBJS:D^\=OLE2UIX\NOPC^\)
!endif
!endif
GOAL: PRELUDE $(LIBNAME).LIB
# ----------------------------------------------------------------------------
# O B J E C T F I L E L I S T
# ----------------------------------------------------------------------------
UI_COBJS = \
D^\busy.obj\
D^\common.obj\
D^\convert.obj\
D^\dbgutil.obj\
D^\drawicon.obj\
D^\hatch.obj\
D^\icon.obj\
D^\iconbox.obj\
D^\insobj.obj\
D^\links.obj\
D^\msgfiltr.obj\
D^\enumfetc.obj\
D^\enumstat.obj\
D^\objfdbk.obj\
D^\ole2ui.obj\
D^\olestd.obj\
D^\targtdev.obj\
D^\oleutl.obj\
D^\pastespl.obj\
D^\regdb.obj\
D^\resimage.obj\
D^\utility.obj\
UI_NOPCOBJS = \
D^\geticon.obj\
D^\dballoc.obj\
D^\suminfo.obj\
D^\stdpal.obj\
PRECOMPOBJ= $(O)precomp.obj
PRECOMP=$(O)precomp.pch
# ----------------------------------------------------------------------------
# R E S O U R C E L I S T
# ----------------------------------------------------------------------------
RES = \
busy.h \
common.h \
convert.h \
edlinks.h \
geticon.h \
icon.h \
iconbox.h \
insobj.h \
msgfiltr.h \
enumfetc.h \
ole2ui.h \
pastespl.h \
resimage.h \
dballoc.h \
suminfo.h \
stdpal.h \
.SUFFIXES: .c .cpp .obj
O=.\$(OBJ)^\
!if [if not exist $(OBJ)\*. md $(OBJ) >nul]
!error Object subdirectory $(OBJ)\ could not be created
!endif
!if [if not exist $(OBJ)\NOPC\*. md $(OBJ)\NOPC > nul]
!error non-precompiled header object subdirectory $(OBJ)\NOPC\ could not be created
!endif
# ----------------------------------------------------------------------------
# I N F E R E N C E R U L E S
# ----------------------------------------------------------------------------
# compile C file without precompiled headers into object directory\NOPC
# dont compile c files etc for lcoalized builds.
{}.c{$(O)NOPC\}.obj:
@echo Are you compiling with OLE 2.01 ??????
@echo °°°°°°°°°°°°°°°°°°°°°°°°° Compiling $(@B).c °°°°°°°°°°°°°°°°°°°°°°°°°
!ifdef DOS
SET CL=$(CFLAGS)
$(CC) -Fo$(O)NOPC\$(@B) $(@B).c
!else
$(CC) $(CFLAGS) -D_FILE_=\"$(*B).c\" -Fo$(O)NOPC\$(@B) $(@B).c
!endif
# compile C file into object directory
{}.c{$(O)}.obj:
@echo °°°°°°°°°°°°°°°°°°°°°°°°° Compiling $(@B).c °°°°°°°°°°°°°°°°°°°°°°°°°
!ifdef DOS
SET CL=$(CFLAGS) -Yuole2ui.h -Fp$(O)precomp.pch
$(CC) -Fo$(O)$(@B) $(@B).c
!else
$(CC) $(CFLAGS) -Yuole2ui.h -Fp$(O)precomp.pch -D_FILE_=\"$(*B).c\" -Fo$(O)$(@B) $(@B).c
!endif
# compile CPP file without precompiled headers into object directory\NOPC
# dont compile cpp files etc for lcoalized builds.
{}.cpp{$(O)NOPC\}.obj:
@echo °°°°°°°°°°°°°°°°°°°°°°°°° Compiling $(@B).cpp °°°°°°°°°°°°°°°°°°°°°°°°°
!ifdef DOS
SET CL=$(CFLAGS)
$(CC) -Fo$(O)NOPC\$(@B) $(@B).cpp
!else
$(CC) $(CFLAGS) -D_FILE_=\"$(*B).cpp\" -Fo$(O)NOPC\$(@B) $(@B).cpp
!endif
# compile CPP file into object directory
{}.cpp{$(O)}.obj:
@echo °°°°°°°°°°°°°°°°°°°°°°°°° Compiling $(@B).cpp °°°°°°°°°°°°°°°°°°°°°°°°°
!ifdef DOS
SET CL=$(CFLAGS) -Yuole2ui.h -Fp$(O)precomp.pch
$(CC) -Fo$(O)$(@B) $(@B).cpp
!else
$(CC) $(CFLAGS) -Yuole2ui.h -Fp$(O)precomp.pch -D_FILE_=\"$(*B).cpp\" -Fo$(O)$(@B) $(@B).cpp
!endif
# ----------------------------------------------------------------------------
# D E P E N D F I L E C R E A T I O N
# ----------------------------------------------------------------------------
UI_CFILE = $(UI_COBJS:.obj=.c) $(UI_DLLOBJS:.obj=.c)
UI_NOPCFILE = $(UI_NOPCOBJS:.obj=.c)
DEPEND: nul
@echo Making a NEW dependancy file.
mkdep -p $$(O) -s .obj $(UI_CFILE:D^\=) > tmp.tmp
sed "s/:/: $$(PRECOMP)/g" < tmp.tmp > depend
-del tmp.tmp
mkdep -p $$(O)NOPC\ -s .obj $(UI_NOPCFILE:D^\=) >> depend
mkdep -p $$(O) -s .pch precomp.c >> depend
# ----------------------------------------------------------------------------
# W E L C O M E B A N N E R
# ----------------------------------------------------------------------------
PRELUDE:
@echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
@echo º Makefile for UILibrary º
@echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
@echo $(MSG)
!ifndef SRCTOK
set INCLUDE=$(OLEINC_DIR);$(INCLUDE)
set LIB=$(OLELIB_DIR);$(LIB)
!endif
# ----------------------------------------------------------------------------
# G O A L T A R G E T S
# ----------------------------------------------------------------------------
!include "depend"
CLEAN: CleanUp
CleanUp:
-echo y|del .\$(OBJ)\*.*
-echo y|del .\$(OBJ)\NOPC\*.*
-del $(LIBNAME).lib
$(O)precomp.pch: precomp.c
!ifdef DOS
SET CL=$(CFLAGS) -Fp$(O)precomp.pch -Ycole2ui.h
$(CC) -Fo$(O)$(@B) precomp.c
!else
$(CC) $(CFLAGS) -Fp$(O)precomp.pch -Ycole2ui.h -D_FILE_=\"precomp.c\" -Fo$(O)$(@B) precomp.c
!endif
#
# Build .LIB static library
#
$(LIBNAME).lib: $(LIBOBJS) $(PRECOMPOBJ)
-del $(O)$(LIBNAME).lib
!ifdef WIN16
lib @<<
$(O)$(LIBNAME).lib
y
$(PRECOMPOBJ: = +) $(LIBOBJS: = +)
<<
!else
$(LINK) @<<
/OUT:$(O)$(LIBNAME).lib
/MACHINE:i386
$(PRECOMPOBJ: = ) $(LIBOBJS: = ) $(UILIBS)
<<
!endif
copy $(O)$(LIBNAME).lib $(LIBNAME).lib
# install built library and public header files to release directories
install:
copy $(LIBNAME).lib $(SAMPLIB_DIR)
copy ole2ui.h $(SAMPINC_DIR)
copy olestd.h $(SAMPINC_DIR)
copy msgfiltr.h $(SAMPINC_DIR)
copy enumfetc.h $(SAMPINC_DIR)
# EOF ========================================================================