DCE Application Programming Guide

Sample Mixed-Language Application
HP NonStop DCE Application Programming Guide429551-003
B-9
The README File
The README File
The README file is shown in Figure B-7 on page B-10.
Figure B-6. The Make File in a Mixed-Language Application
#
# Makefile for simple client-server example.
#
INT=turnaround
DCE=/opt/dcelocal
DCELIB=-L $(DCE)/lib
LIBS=$(DCELIB) -l dce
IDL=$(DCE)/bin/idl -cc_opt ‘-g’
CC=/nonnative/bin/c89 -g
COBOL=/bin/cobol -g -c -Wcobol=”ansi”
default: client server
client : client.c $(INT).h $(INT)_cstub.o
$(CC) -o client $(LIBS) $(INT)_cstub.o client.c
server : server.c $(INT).h $(INT)_sstub.o $(INT)_cob.o
$(CC) -o server $(LIBS) $(INT)_cob.o $(INT)_sstub.o server.c
$(INT)_cob.o : $(INT).cbl
$(COBOL) -o $(INT)_cob.o $(INT).cbl
$(INT)_cstub.o $(INT)_sstub.o $(INT).h : $(INT).idl $(INT).acf
$(IDL) $(IFLAGS) $(INT).idl
clean:
rm -f client server $(INT).h $(INT)_cstub.o $(INT)_sstub.o
rm -f $(INT)_cob.o