Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 28

Publication 1747-UM002A-US-P - June 2000
2-6 Using the API
#
# 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 /nologo /G3 /W3 /AL /Oi /D /Gx- /I $(APIINC)
LFLAGS = /MAP:A /NOI /PACKC
sample.exe : sample.obj $(APILIB) samplem.mak
$(LINK) $(LFLAGS) sample.obj, $*.exe, $*.map, $(APILIB), nul.def
clean:
del *.exe
del *.obj
del *.map
rebuild:
$(MAKE) -f samplem.mak clean
$(MAKE) -f samplem.mak
.c.obj:
$(CC) $(CFLAGS) $*.c
sample.obj: sample.c $(APIINC)\ocapi.h
samplem.mak
Sample Windows NT MAKE file for Microsoft compilers
The following sample file shows how to use a Microsoft MAKE file.
The bold headings indicate the statements you need to modify for
your environment.
#************************************************************************
# Title: Makefile for Open Controller NT API Sample
#
# Abstract:
# This file is used by the Microsoft NMake utility to build the
# sample application.
#
# Environment:
# 1747-OCE Open Controller
# Microsoft Windows NT 4.0
# Microsoft Visual C++
#
# (c)Copyright Allen-Bradley
#
#************************************************************************
#----------------------------------------------
# Note: The environment variable LIB
# must be set to the path to the
# Microsoft C library files.
# For example:
#
# set LIB=D:\MSDEV\LIB
#
#----------------------------------------------