# MAKEFILE for ActiveX SDK Sample, FrameWrk class library # # George Cross, Borland C++ Developer Support, March 1997 # # Comments: Makefile for MAKE.EXE from Borland C++Builder. # # Not dependent on BUILTINS.MAK, BCC32.CFG, TLINK32.CFG, PATH or # any other environment variables. # # This makefile is dependent however on the tool MAKERSP.EXE found # in the directory \source\rtl\tools\. # # The FrameWrk class library is a collection of C++ classes which # wrap ActiveX interfaces and API only for ActiveX controls or # what was formerly known as automation servers. The header # files for this library are in the directory # INETSDK\SAMPLES\BASECTL\INCLUDE # # MAKE Static version of the RTL used in all cases # MAKE -DRELEASE Non-debug version # # Changes: # ------- # The following changes to source files were necessary in order to build # this sample using Borland C++Builder. # # 1. Microsoft code often uses anonymous structures and unions which are # illegal in ANSI C++. tagVARIANT (OAIDL.H) is one significant # structure which uses anonymous structures and unions. # # Borland's compiler has a -VF option for MFC compatability. This # allows anonymous structures and unions amongst other things. # # I went through all the source files and changed references to # anonymous union and structure members to be named. So you don't # need -VF for this source. Please note to this affect you have # to define NONAMELESSUNION as I've done below. # # But with other Microsoft code which uses anonymous unions and structures # you don't need to change the source code. Just turn on Borland's -VF # switch. # # # CTLMISC.CPP - lines 1298,1299,1300,1301,1332,1449 require names for the # nested unions and structures of the tagVARIANT structure. Eg. What was, # # # v.vt = VT_EMPTY; # v.lVal = 0; # # # Is now changed to, # # # v.n1.n2.vt = VT_EMPTY; # v.n1.n2.n3.vt = 0; # # # CTLPSST.CPP - lines 494,495,497,499,501,580,581,586 require names for the # nested unions and structures of the tagVARIANT structure. (See 2. above) # # # INTERNET.CPP - line 212, required a name for the nested union of the # tagSTGMEDIUM structure. See WIN32\OBJIDL.H for tagSTGMEDIUM structure. # # pstgmed->pstm; # # Became, # # pstgmed->u.pstm # # # EXTOBJ.CPP - lines 314,388,390 required names for the nested unions # and structures of the tagVARIANT structure. (See 2. above) # # # 2. CTLVIEW.CPP - line 222, # # # #if STRICT # # was changed to, # # #ifdef STRICT # # 3. IPSERVER.CPP - Change line 74 from # # BOOL WINAPI DllMain # # to # # BOOL WINAPI # #ifdef __BORLANDC__ # DllEntryPoint # #else # DllMain # #endif # # 4. CTLHELP.CPP - line 38, 'static' seems to mean something different for # MS VC++. In Borland C++ we take it to mean file scope only for variables. # The line, # # static const GUID ...(etc.) # # Was changed to, # # #ifndef __BORLANDC__ # static # #endif # const GUID ...(etc.) # # 5. AUTOOBJ.CPP - line 499 had to include __stdcall in the function decl. # CLASSF.CPP - line 128, 146 did the same # CTLMISC.CPP - line 408, 425 also # UNKNOWN.CPP - line 85, 103 # EXTOBJ.CPP - line 208, 214, 226, 240, 276 # # # # .autodepend #these directives tell MAKE to compare time/date .cacheautodepend #of ALL files (.h,.cpp,.c...) which build an obj. #These are not effective if the obj is built #with the -X option BCC32 = $(MAKEDIR)\bcc32.exe TLIB = $(MAKEDIR)\tlib.exe MAKERSP = $(MAKEDIR)\..\source\rtl\tools\makersp.exe BASECTLDIR = .. #parent of FrameWrk's Include and Lib dirs PROJ = CTLFW32 OBJS= AutoObj.Obj ClassF.Obj CtlEmbed.Obj CtlHelp.Obj CtlMisc.Obj \ CtlOCX96.Obj CtlPsst.Obj CtlView.Obj CtlWrap.Obj Debug.Obj \ Globals.Obj Internet.Obj IPServer.Obj PropPage.Obj StdEnum.Obj \ Unknown.Obj ExtObj.Obj Util.Obj CDEFINES = -DSTRICT \ -DNONAMELESSUNION PCH = -Hc -H"ipserver.h" -H=$(PROJ).csm INCDIR = $(BASECTLDIR)\include;$(MAKEDIR)\..\include\; #Include path CFLAGS = $(CDEFINES) -I$(INCDIR) $(PCH) -c -K #Compile options LFLAGS = /P32 #Lib options !if $d(RELEASE) CFLAGS = $(CFLAGS) -O1 -k- -w- LFLAGS = $(LFLAGS) /0 !else CFLAGS = $(CFLAGS) -v -r- -Od LFLAGS = $(LFLAGS) !endif $(PROJ).lib: bcc.cfg tlib.rsp $(OBJS) #Target $(TLIB) $& $(LFLAGS) @tlib.rsp, $&.lst bcc.cfg: copy &&| $(CFLAGS) | $. tlib.rsp : #Response files $(MAKERSP) "-+!s &\n" &&| $(OBJS) | > $. .cpp.obj: $(BCC32) +bcc.cfg { $& } clean: @del $(PROJ).lib *.obj *.rsp *.lst *.t?2 *.bak *.?0? *.csm *.cfg