Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 31
Publication 1747-UM002A-US-P - June 2000
Using the API 2-9
# 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)
|
clean:
del *.exe
del *.obj
del *.map
del *.lib
rebuild:
$(MAKE) -f sampleb.mak clean
$(MAKE) -f sampleb.mak
.c.obj:
$(CC) $(CFLAGS) $*.c
#----------------------------------------------
# Create a Borland-compatible import library
#----------------------------------------------
$(APILIB): $(APIDLL)
implib $(APILIB) $(APIDLL)
sample.obj: sample.c $(APIINC)\ocapi.h sampleb.mak