#
#
#**************************************************************************
#*
#* 		  Copyright (c) 1992 Silicon Graphics, Inc.
#*			All Rights Reserved
#*
#*	   THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI
#*
#* The copyright notice above does not evidence any actual of intended
#* publication of such source code, and is an unpublished work by Silicon
#* Graphics, Inc. This material contains CONFIDENTIAL INFORMATION that is
#* the property of Silicon Graphics, Inc. Any use, duplication or
#* disclosure not specifically authorized by Silicon Graphics is strictly
#* prohibited.
#*
#* RESTRICTED RIGHTS LEGEND:
#*
#* Use, duplication or disclosure by the Government is subject to
#* restrictions as set forth in subdivision (c)(1)(ii) of the Rights in
#* Technical Data and Computer Software clause at DFARS 52.227-7013,
#* and/or in similar or successor clauses in the FAR, DOD or NASA FAR
#* Supplement. Unpublished - rights reserved under the Copyright Laws of
#* the United States. Contractor is SILICON GRAPHICS, INC., 2011 N.
#* Shoreline Blvd., Mountain View, CA 94039-7311
#**************************************************************************
#*
#* Makefile - lib/oam	The messages library.
#*
#* $Revision: 1.3 $
#*
#*
#**************************************************************************

DEPTH = ../..

# use make, instead of smake. smake confuses the make while generating
# the OAMSRC files.
MAKE = make

LPDEFS = $(DEPTH)/lpdefs

include $(LPDEFS)

LIBRARY = liblpoam.a

LCINCS = -I$(LPINC) -I$(INC)
LCOPTS = -fullwarn 

ARFLAGS = crls
LINTFLAGS = -u -z -y 

# LDIRT defines the intermediate files that make will remove
# by using target clean.
LDIRT = $(OAMSRC) $(LPINC)/oam_def.h xx??


TARGETS = $(LIBRARY)


OAMSRC = \
	e_adm__msgs.c \
	e_can__msgs.c \
	e_cmb__msgs.c \
	e_dat__msgs.c \
	e_fl__msgs.c \
	e_for__msgs.c \
	e_lp__msgs.c \
	e_lpp__msgs.c \
	e_lpu__msgs.c \
	e_mov__msgs.c \
	e_sch__msgs.c \
	e_sht__msgs.c \
	e_stat__msgs.c \
	e_sys__msgs.c

NORMSRC = \
	agettxt.c \
	buffers.c \
	fmtmsg.c \
	outmsg.c \
	retmsg.c \
	vfmtmsg.c

CFILES = $(OAMSRC) $(NORMSRC)

default all: $(TARGETS)


include $(COMMONRULES)


$(LIBRARY): $(OBJECTS)
	$(AR) $(ARFLAGS) $@ $(OBJECTS)

$(OAMSRC): gen-text
	sh gen-text

$(OBJECTS): $(LPINC)/oam_def.h

$(LPINC)/oam_def.h: msg.source gen-defs gen-text
	/bin/rm -f $(LPINC)/oam_def.h	
	sh gen-defs > $(LPINC)/oam_def.h

