Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 25

Advertising
background image

Using the API

2–9

Publication 1747-6.5.3 June 1998

Sample Windows NT MAKE file for Borland compilers

The following sample file shows how to use a Borland MAKE file. The bold
headings indicate the statements you need to modify for your environment.

#************************************************************************
#
# Title: Makefile for Open Controller API Sample
#
# Abstract:
# This file is used by the Borland MAKE utility to build the
# sample application.
#
# Environment:
# 1747-OCE Open Controller
# Microsoft Windows NT 4.0
# Borland C++ Compiler
#
# (c)Copyright Allen-Bradley
#
#************************************************************************
#----------------------------------------------
# Paths to Tools
#
# Note: Modify the following paths to
# correspond to your environment.
#
#----------------------------------------------
CPATH = D:\BC5 # Location of Borland tools
CC = $(CPATH)\bin\Bcc32 # compiler
LINK = $(CPATH)\bin\TLink32 # linker
MAKE = $(CPATH)\bin\Make # make utility

#----------------------------------------------
# Path to API Library and Include file
#
# Note: Modify the following path to
# correspond to your environment.
#
#----------------------------------------------
APIDLL = ..\api\lib\ocapi.dll # Path to Open Controller API library
APIINC = ..\api\include # Path to Open Controller API include file
APILIB = .\ocapi.lib # Borland compatible import library

#----------------------------------------------
# Options
#----------------------------------------------
CFLAGS = -c -v -4 -tWM -w -I$(APIINC)
LFLAGS = -v -Tpe -d -c -ap -r

#----------------------------------------------
# Final Target
#----------------------------------------------
sample.exe : sample.obj $(APILIB) sampleb.mak
$(LINK) @&&|
$(LFLAGS) +
D:\BC5\LIB\c0x32.obj +
$*.obj, $*.exe, $*.map
D:\BC5\LIB\import32.lib +
D:\BC5\LIB\cw32mt.lib +
$(APILIB)

Advertising
This manual is related to the following products: