# ============================================================================ # File: M A K E F I L E # # NMAKE description file for the OLE2.0 User Interface DLL # # Copyright (C) Microsoft Corporation, 1992-1993. All Rights Reserved. # ============================================================================ # # Usage Notes: # ----------- # # This makefile is designed to be used in two steps. The first time you # call the makefile, it generates a file called UIMAKE.INI. The second time # you call the makefile, it reads settings from UIMAKE.INI and actually # performs the build. See the section below "UIMAKE.INI" for more information # on this file. # # 1. Initial Step -- Before building your library for the first time, you # need to run one of the following commands. (This step will only be needed # to run again if you want to build a different variant of the library, for # instance if you want to switch from a DEBUG to a RETAIL build). # # NMAKE DEBUG - Prepares for building DEBUG DLL version # NMAKE RETAIL - Prepares for building RETAIL DLL version # NMAKE DEBUGLIB - Prepares for building DEBUG static LIB version # NMAKE RETAILIB - Prepares for building RETAIL static LIB version # # This step builds the UIMAKE.INI file, which contains the settings # which specify what version of the library you want to build. # # 2. Build Step # # NMAKE # # This second step reads the settings in the UIMAKE.INI file and builds # the requested library. # # # UIMAKE.INI # ---------- # # This file is used to specify which variant of the library to build, # as well as details like which compiler and linker options to use. The # file is created based on the settings in the "MAKE PARAMETERS" section # of this makefile. # # For most builds, using the default settings will work fine, but if you # need to change how you build the library, the UIMAKE.INI file is a # simple way to make this change without changing the makefile. # # The following lists a few of the settings in the UIMAKE.INI 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=[S|M|C|L] -- The memory model. Only available # on static .LIB version. This flag is # also included (but not used) in the DLL # version of UIMAKE.INI in order to allow # switching between the DLL and LIB version. # LIBNAME= -- The library name. For building your own # library (other than the ones for the samples), # this must be set to a unique name for your # application. # LANG= -- Used for international versions of this # library. Specifies which directory the # resources come from. Default is USA # # ============================================================================ # ---------------------------------------------------------------------------- # U I M A K E . I N I # ---------------------------------------------------------------------------- # XXXXXXX DOS=1 !ifndef LANG LANG=USA !endif !if [if not exist uimake.ini dir uimake.ini >nul] != 0 #!if [test -f uimake.ini] != 0 LIBNAME= MODEL=M RESOURCE=RESOURCE !ifndef REL_DIR @echo REL_DIR not defined REL_DIR=c:\ole2samp\release !endif !ifndef OLERELDIR @echo OLEREL_DIR not defined OLEREL_DIR=c:\ole2samp\release !endif GOAL: DEBUG !else !include "uimake.ini" GOAL: PRELUDE $(LIBNAME).$(BUILD) !endif !if "$(INSTALL_DIR)"=="" INSTALL_DIR = $(REL_DIR) !endif #use src/tok pairs to build if localized version !if ("$(LANG)"!="USA") && ("$(LANG)"!="usa") SRCTOK=1 !endif # ---------------------------------------------------------------------------- # O B J E C T F I L E L I S T # ---------------------------------------------------------------------------- UI_COBJS = \ D^\ole2ui.obj\ 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^\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\ UI_DLLOBJS = \ D^\dllfuncs.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 \ $(RESOURCE)\STATIC\default.ico \ $(RESOURCE)\STATIC\bang.ico \ $(RESOURCE)\STATIC\egares.bmp \ $(RESOURCE)\STATIC\hivgares.bmp \ $(RESOURCE)\STATIC\vgares.bmp \ $(RESOURCE)\$(LANG)\strings.rc \ $(RESOURCE)\$(LANG)\busy.dlg \ $(RESOURCE)\$(LANG)\convert.dlg \ $(RESOURCE)\$(LANG)\fileopen.dlg \ $(RESOURCE)\$(LANG)\icon.dlg \ $(RESOURCE)\$(LANG)\insobj.dlg \ $(RESOURCE)\$(LANG)\links.dlg \ $(RESOURCE)\$(LANG)\pastespl.dlg \ $(RESOURCE)\$(LANG)\prompt.dlg \ $(RESOURCE)\ole2ui.rcv \ $(RESOURCE)\$(LANG)\verlocal.h \ # ---------------------------------------------------------------------------- # D E B U G S T A T I C L I B M A K E P A R A M E T E R S # ---------------------------------------------------------------------------- DEBUGLIB: DbgUI DbgUI: @echo Creating DEBUG LIB <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 #select language for version resource if localized version !if ("$(LANG)"!="USA") && ("$(LANG)"!="usa") RFLAGS=$(RFLAGS) -D VER_LOC !endif .SUFFIXES: .c .asm .obj .res .rc .def .bmp .ico .exe .dll .cod .str O=.\$(OBJ)^\ # ---------------------------------------------------------------------------- # I N F E R E N C E R U L E S # ---------------------------------------------------------------------------- !ifndef SRCTOK # compile C file without precompiled headers into object directory\NOPC # dont compile c files etc for lcoalized builds. {}.c{$(O)NOPC\}.obj: @echo °°°°°°°°°°°°°°°°°°°°°°°°° Compiling $(@B).c °°°°°°°°°°°°°°°°°°°°°°°°° !ifdef DOS SET CL=$(CFLAGS) $(CC) -Fo$(O)NOPC\$(@B) $(@B).c !else !undef _FILE_ $(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 !undef _FILE_ # $(CC) $(CFLAGS) -Yuole2ui.h -Fp$(O)precomp.pch -D_FILE_=\"$(*B).c\" -Fo$(O)$(@B) $(@B).c $(CC) $(CFLAGS) -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 !undef _FILE_ $(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 !undef _FILE_ # $(CC) $(CFLAGS) -Yuole2ui.h -Fp$(O)precomp.pch -D_FILE_=\"$(*B).cpp\" -Fo$(O)$(@B) $(@B).cpp $(CC) $(CFLAGS) -D_FILE_=\"$(*B).cpp\" -Fo$(O)$(@B) $(@B).cpp !endif !endif #endif SRCTOK {}.rc{$(O)}.res: @echo ²²²²²²²²²²²²²²²²²²² Resource Compiling $(@B).res ²²²²²²²²²²²²²²²²²²²² $(RS) -I $(RESOURCE)\$(LANG);$(RESOURCE)\static;$(RESOURCE) -FO $(O)$(@B).res -DWIN32 -DUNICODE -R $(RFLAGS) $(@B).rc -del $(LIBNAME).dll !ifndef SRCTOK {}.c.cod: @echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ Making $(@B).cod ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ !ifdef DOS SET CL=$(CFLAGS) -f -Fc $(CC) $(@B).c !else !undef _FILE_ $(CC) $(CFLAGS) -f- -Fc -D_FILE_=\"$(*B).c\" $(@B).c !endif !endif # rules for creating rc & dlg files for localized verisons from src/tok pairs !ifdef SRCTOK $(RESOURCE)\$(LANG)\busy.dlg : $(RESOURCE)\$(LANG)\busy.tok $(RESOURCE)\src\busy.src tok -q -f $*.tok $(RESOURCE)\src\$(@B).src > $@ $(RESOURCE)\$(LANG)\convert.dlg : $(RESOURCE)\$(LANG)\convert.tok $(RESOURCE)\src\convert.src tok -q -f $*.tok $(RESOURCE)\src\$(@B).src > $@ $(RESOURCE)\$(LANG)\fileopen.dlg : $(RESOURCE)\$(LANG)\fileopen.tok $(RESOURCE)\src\fileopen.src tok -q -f $*.tok $(RESOURCE)\src\$(@B).src > $@ $(RESOURCE)\$(LANG)\icon.dlg : $(RESOURCE)\$(LANG)\icon.tok $(RESOURCE)\src\icon.src tok -q -f $*.tok $(RESOURCE)\src\$(@B).src > $@ $(RESOURCE)\$(LANG)\insobj.dlg : $(RESOURCE)\$(LANG)\insobj.tok $(RESOURCE)\src\insobj.src tok -q -f $*.tok $(RESOURCE)\src\$(@B).src > $@ $(RESOURCE)\$(LANG)\links.dlg : $(RESOURCE)\$(LANG)\links.tok $(RESOURCE)\src\links.src tok -q -f $*.tok $(RESOURCE)\src\$(@B).src > $@ $(RESOURCE)\$(LANG)\pastespl.dlg : $(RESOURCE)\$(LANG)\pastespl.tok $(RESOURCE)\src\pastespl.src tok -q -f $*.tok $(RESOURCE)\src\$(@B).src > $@ $(RESOURCE)\$(LANG)\prompt.dlg : $(RESOURCE)\$(LANG)\prompt.tok $(RESOURCE)\src\prompt.src tok -q -f $*.tok $(RESOURCE)\src\$(@B).src > $@ $(RESOURCE)\$(LANG)\strings.rc : $(RESOURCE)\$(LANG)\strings.tok $(RESOURCE)\src\strings.src tok -q -f $*.tok $(RESOURCE)\src\$(@B).src > $@ !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=$(OLEREL_DIR);$(INCLUDE) set LIB=$(OLEREL_DIR);$(LIB) !endif # ---------------------------------------------------------------------------- # G O A L T A R G E T S # ---------------------------------------------------------------------------- !include "depend" CLEAN: CleanUp GOAL CleanUp: -echo y|del .\$(OBJ)\*.* -del $(LIBNAME).dll -del $(LIBNAME).lib !ifndef SRCTOK $(O)precomp.pch: precomp.c !ifdef DOS SET CL=$(CFLAGS) -Fp$(O)precomp.pch -Ycole2ui.h $(CC) -Fo$(O)$(@B) precomp.c !else !undef _FILE_ @echo Precompiling Header Files.... $(CC) $(CFLAGS) -Fp$(O)precomp.pch -Ycole2ui.h -D_FILE_=\"precomp.c\" -Fo$(O)$(@B) precomp.c !endif !endif $(O)ole2ui.res: ole2ui.rc $(RES) ole2ui.rc : $(RESOURCE)\$(LANG)\strings.rc # # Build .LIB static library # $(LIBNAME).lib: $(LIBOBJS) $(PRECOMPOBJ) -del $(O)$(LIBNAME).lib lib @<< $(O)$(LIBNAME).lib y $(PRECOMPOBJ: = +) $(LIBOBJS: = +) << copy $(O)$(LIBNAME).lib $(LIBNAME).lib # # Build .DLL dynamic-link library # # HACK! # XXXXX # after echo LIBRARY $(LIBNAME) INITINSTANCE $(O)$(LIBNAME).exe: $(LIBOBJS) $(PRECOMPOBJ) $(DLLOBJS) $(O)ole2ui.res defoleui.def @echo ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄį Linking UILibrary ®ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ -del $(LIBNAME).def @echo Creating <<$(LIBNAME).def LIBRARY ole2ui DESCRIPTION 'OLE 2.0 UI Support Library.' <> $(LIBNAME).def $(LK) @<< $(LFLAGS) $(LIBOBJS: = ^ ) $(DLLOBJS: = ^ ) $(O)$(LIBNAME).res $(UILIBS) /DEF:$(LIBNAME).def <