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

Last reviewed: February 18, 1996
Article ID: Q107776
The information in this article applies to:

- Professional Edition of Microsoft Visual Basic for Windows,

  version 3.0

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 reference words: 3.00
KBCategory: kbtool kbprg
KBSubcategory: TlsCDK


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 18, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.