Sample dos make file for borland compilers -5, Sample dos make file for borland compilers – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 21

Advertising
background image

Using the API

2–5

Publication 1747-6.5.3 June 1998

Sample DOS 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
# MS-DOS

# Borland C/C++ Compiler (16-bit)

#

#************************************************************************
#

# Paths to Tools

#
# Note: Modify the following paths to
# correspond to your environment.
#
#----------------------------------------------
CPATH = D:\BC5 # Location of Borland tools
CC = $(CPATH)\bin\Bcc # compiler
LINK = $(CPATH)\bin\TLink # linker
MAKE = $(CPATH)\bin\Make # make utility

#----------------------------------------------
# Path to API Library and Include file
#
# Note: Modify the following path to
# correspond to your environment.
#
#----------------------------------------------
APILIB = ..\ocapil.lib # Path to Open Controller API library
APIINC = .. # Path to Open Controller API include file

#----------------------------------------------
# Options
#----------------------------------------------
CFLAGS = -c -v- -w -ml -I$(APIINC)
LFLAGS = -v- -Tde -d -c

sample.exe : sample.obj $(APILIB) sampleb.mak
$(LINK) $(LFLAGS) c0l sample.obj, $*.exe, $*.map, $(APILIB) cl

clean:
del *.exe
del *.obj
del *.map

rebuild:
$(MAKE) clean
$(MAKE)
.c.obj:
$(CC) $(CFLAGS) $*.c

sample.obj: sample.c $(APIINC)\ocapi.h
sampleb.mak

Advertising
This manual is related to the following products: