PreviousNext

Makefile for the greet Application

The commands given in the preceding description for building the greet application have been simplified. Following is the actual Makefile, containing the complete commands for generating the application.

DCEROOT = /opt/dcelocal

CC = /bin/cc
IDL = idl
LIBDIRS = -L${DCEROOT}/usr/lib
LIBS = -ldce
LIBALL = ${LIBDIRS} ${LIBS}
INCDIRS = -I. -I${DCEROOT}/usr/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 \e
util.o ${LIBALL}

greet_server: greet.h greet_server.o greet_manager.o util.o \e
greet_sstub.o
${CC} -o greet_server greet_server.o greet_manager.o \e
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