Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/107776

From BetaArchive Wiki
Knowledge Base


Sample .MAK for Compiling VB Custom Control in Borland C++ 3.1

Article ID: 107776

Article Last Modified on 1/8/2003



APPLIES TO

  • Microsoft Visual Basic 3.0 Professional Edition



This article was previously published under Q107776

SUMMARY

This article gives a sample .MAK file for compiling a Microsoft Visual Basic custom control using Borland C++ version 3.1. Sample C code is not provided with this example.

Borland C++ is manufactured by Borland International, Inc., a vendor independent of Microsoft. We make no warranty, implied or otherwise, regarding this product's performance or reliability.

MORE INFORMATION

Run the MAKE utility without the -N compatibility option when using the sample .MAK file below.

SAMPLE.MAK

.nosilent
OBJPATH = ..\obj\               # comment to prevent trailing \ 
MAINTPATH = ..\maint\           # comment to prevent trailing \ 
BMPFILES = winqcd.bmp winqcu.bmp winqeu.bmp winqmu.bmp
DLGFILES =
HDRFILES = $(KMSTOOLS)\kms-win.h winq.h icdefs.h vbdefs.h
OBJFILES = $(OBJPATH)winqmain.obj $(OBJPATH)winqsubs.obj
           $(OBJPATH)winqfile.obj
# $(OBJPATH)splay.obj
RESFILES = $(KMSTOOLS)\kms-res.h winq-res.h

.path.obj = $(OBJPATH)
.path.res = $(OBJPATH)
.path.rsp = $(MAINTPATH)
.path.sym = $(OBJPATH)

LIBPATH = $(BORPATH)\LIB;c:\vb3.0\cdk;c:\idk\lib\win
CDEFS = -DSTRICT
MEM = s
DLL = !
MODEL = $(MEM)$(DLL)
CFLAGS = -n$(OBJPATH) -m$(MODEL) -WD /I$(KMSTOOLS) /I$(BORPATH)/include
/Ic:\vb3.0\cdk /Ic:\idk\include

#       Implicit rules

!if $d(OBJPATH)
.rc.res:
      $(RC) $(RFLAGS) -r $&.rc
      copy  $&.res $(OBJPATH)$&.res
      del   $&.res
!else
.rc.res:
      $(RC) $(RFLAGS) -r $&.rc
!endif

#       Links

winq100.vbx: $(MAINTPATH)bcc.rsp $(OBJFILES) winq.res winq.def
    $(LNK) /Twd/v/x/P-/L$(LIBPATH) @&&|
c0d$(MEM) $(OBJFILES)
$<
$(OBJPATH)$&.map
vbapi.lib cwc.lib icwin.lib import
winq.def
|
    rc $(OBJPATH)winq.res $<

winq.res: $(BMPFILES) $(DLGFILES) $(RESFILES) winq.rc

$(MAINTPATH)bcc.rsp: $(MAINTPATH)makefile.mak
    copy &&|
$(CDEFS) $(CFLAGS)
| $(MAINTPATH)bcc.rsp

#       Compiles

winqinc.sym: $(MAINTPATH)bcc.rsp winqinc.cpp $(RESFILES) $(HDRFILES)
     del $(OBJPATH)*.sym
     $(CC) -H=$(OBJPATH)winqinc.sym @$(MAINTPATH)bcc.rsp {$&.cpp }

$(OBJPATH)winqmain.obj:
     $(MAINTPATH)bcc.rsp winqinc.sym $(RESFILES) $(HDRFILES)
winqmain.cpp
     $(CC) -H=$(OBJPATH)winqmain.sym @$(MAINTPATH)bcc.rsp {$&.cpp }

$(OBJPATH)winqsubs.obj: $(MAINTPATH)bcc.rsp winqinc.sym $(RESFILES)
     $(HDRFILES)
winqsubs.cpp
     $(CC) -H=$(OBJPATH)winqinc.sym @$(MAINTPATH)bcc.rsp {$&.cpp }

$(OBJPATH)winqfile.obj: $(MAINTPATH)bcc.rsp winqinc.sym $(RESFILES)
     $(HDRFILES)
winqfile.cpp
     $(CC) -H=$(OBJPATH)winqinc.sym @$(MAINTPATH)bcc.rsp {$&.cpp }

# $(OBJPATH)splay.obj: $(MAINTPATH)bcc.rsp $(RESFILES) $(HDRFILES)
splay.cpp
#      $(CC) @$(MAINTPATH)bcc.rsp {$&.cpp }
                


Additional query words: 3.00

Keywords: KB107776