# MAKEFILE for MS ActiveX Template Library 1.1, REGISTER.DLL # # George Cross, Borland C++ Developer Support, January 1997 # # Comments: # --------- # Makefile for Borland C++Builder. # # MAKE Static version of the RTL used # MAKE -DDEBUG Debug version # # This makefile is not dependent any environment variables, .CFG file # or BUILTINS.MAK. # # Requirements: # ------------ # The following are necessary when building the ATL 1.1 using # Borland C++Builder v.1.0. # # 1. Obtain the latest MIDL compiler, MIDL.EXE, from the latest Microsoft # Win32SDK found in the directory MSTOOLS\BIN\I386\. It is available # from my websight for your convenience. # # 2. Obtain the .IDL files from the latest Microsoft Win32SDK in the # directory MSTOOLS\INCLUDE\. Borland doesn't ship these files at # this time but they are available on my webpage because we should. # Hopefully we will soon. See changes to these files below. # # The ActiveX SDK already has several .IDL files in the INETSDK\INCLUDE\ # directory, but you need the ones above as well. # If any file appears in both directories, please delete the older one. # # 3. To generate .h and .c files from .idl files using MIDL.EXE, use # for example, # # midl.exe /cpp_cmd \bcb\bin\cpp32.exe # /cpp_opt "-P- -oCON" # /I \bcb\include;\mstools\include # inetsdk.idl # # For more information on using CPP32.EXE and MIDL.EXE, please see # BC5\HELP\BCTOOLS.HLP. # # # # Changes: # -------- # The following changes to the source files were necessary to build the # ATL REGISTER.DLL with C++Builder. Most have to do with giving names to # anonymous unions and structures which are illegal in ANSI C++. # # Because I am thorough and don't want to support illegal syntax, I # have made the changes for you in this archive to irradicate the code # of anonymous unions and structures. You can however, have our Borland # compiler accept these things by using the MFC compatability option, -VF. # It is as easy as that, no further changes ! Our compiler is so good. # # 1. cbuilder\include\win32\rpcndr.h # - the following lines were added to line 2630. This is to accomodate # code generated from the new MIDL.EXE 3.01. # # #if _MSC_VER >= 1100 # #define DECLSPEC_UUID(x) __declspec(uuid(x)) # #else # #define DECLSPEC_UUID(x) # #endif # # 2. Win32SDK .idl files # - Please download from my sight and put in \MSTOOLS\INCLUDE. # # 3. ..\..\..\include\oaidl.idl # Since CPP32.EXE can't handle some uuid's (see BCTOOLS.HLP), certain # uuid's had to be wrapped with quotation marks. The following lines # were changed: 908,1686,1719,1752 # # 4. ..\..\..\include\objidl.idl # As above, the following lines were changed: 200,219,564,598,720,1347, # 1760,1813,1833,1878,1960,2311,2725. # # 5. .\stdafx.h # - excludes several "#pragma comment" statments for Microsoft import # libraries. The records in these MS libraries are already in # cbuilder\lib\import32.lib or cbuilder\lib\ole2w32.lib. # - includes _ASSERT and _ASSERTE macros so that we can exclude # crtdbg.h by defining _ATL_NO_DEBUG_CRT # # 6. ..\..\..\include\atlcom.h # - line 151 and 176 had to be changed to use named unions instead of # nameless unions. # # vt = VT_BSTR; # became, # n1.n2.vt = VT_BSTR; # # - the same kind of deal was necessary for lines 152 and 177. # # 7. ..\..\..\include\atlimpl.cpp # - gave names to the anonymous union of tagVARIANT around lines 69ff. # The same kind of deal as was with item 2 above. # # 8. .\static\statreg.cpp # - again, in about 23 statements gave names to the anonymous union in # the tagVARIANT structure. # # 9. .\static\statreg.cpp # - _alloca had to be changed to alloca in line 811. # # 10. .\register.cpp # - line 27, DllEntryPoint was added. Microsoft uses DllMain but we # uses DllEntryPoint # # PROJ = register INFHEADER= $(PROJ).h OBJS = $(PROJ).obj regobj.obj stdafx.obj RESES = $(PROJ).res BCC = $(MAKEDIR)\bcc32.exe TLINK = $(MAKEDIR)\tlink32.exe BRCC = $(MAKEDIR)\brcc32.exe CPP = $(MAKEDIR)\cpp32.exe MIDL = \win32sdk\mstools\bin\i386\midl.exe CDEFINES = -DSTRICT \ -DUNICODE -D_UNICODE \ -D_ATL_MIN_CRT \ -D_ATL_STATIC_REGISTRY \ -D_ATL_NO_DEBUG_CRT \ -DNONAMELESSUNION INCDIR = $(MAKEDIR)\..\include;..\..\..\include #Include path LIBDIR = $(MAKEDIR)\..\lib #Library path CFLAGS = $(CDEFINES) -I$(INCDIR) -c -w-inl -w-aus -w-pia #Compile options LFLAGS = /Tpd /aa /c /x /L$(LIBDIR) #Link options !if "$(DEBUG)" == "1" #Debug info included or not.. CFLAGS = $(CFLAGS) -v LFLAGS = $(LFLAGS) /v !endif $(PROJ).dll: $(INFHEADER) $(OBJS) $(RESES) $(TLINK) $(LFLAGS) @&&| c0d32w $(OBJS) #Startup and objs $& #Target #Map file cw32mt import32 #Static and import libraries #Module definition file $(RESES) #Resources | .cpp.obj: $(BCC) $(CFLAGS) $& .rc.res: $(BRCC) $(RFLAGS) $< .idl.h: $(MIDL) @&&| /I \win32sdk\mstools\include #path to imported .idl files /cpp_cmd $(CPP) #preprocessor /cpp_opt "-oCON -P-" #preprocessor options $< | clean: @del $(PROJ).dll $(PROJ).h $(PROJ)_?.c $(PROJ).tlb \ dlldata.c *.obj *.map *.res *.csm /s