PreviousNext

Building the greet Programs

The client side of the greet application is the greet_client program, which is built from the following:

· The user-written greet_client.c client module

· The IDL-compiler-generated greet_cstub.o client stub module

· The user-written util.c module containing the error-checking routine

· DCE libraries

The server side of the greet application is the greet_server program, which is built from the following:

· The user-written greet_server.c server module

· The user-written greet_manager.c manager module

· The user-written util.c module containing the error-checking routine

· The IDL-compiler-generated greet_sstub.o server stub module

· DCE libraries

These programs can be built by make with a makefile such as the following:

DCEROOT = /opt/dcelocal

CC = /bin/cc

IDL = idl

LIBDIRS = -L${DCEROOT}/usr/lib

LIBS = -ldce

LIBALL = ${LIBDIRS} ${LIBS}

INCDIRS = -I. -I${DCEROOT}/share/include

CFLAGS = -g ${INCDIRS}

IDLFLAGS = -v ${INCDIRS} -cc_cmd "${CC} ${CFLAGS} -c"

all: greet_client greet_server

greet.h greet_cstub.o greet_sstub.o: greet.idl

${IDL} ${IDLFLAGS} greet.idl

greet_client: greet.h greet_client.o util.o greet_cstub.o

${CC} -o greet_client greet_client.o greet_cstub.o util.o \

${LIBALL}

greet_server: greet.h greet_server.o greet_manager.o util.o \

greet_sstub.o

${CC} -o greet_server greet_server.o greet_manager.o \

greet_sstub.o util.o ${LIBALL}

greet_client.c greet_server.c util.c: util.h

greet_manager.c greet_client.c greet_server.c: greet.h