#
# nasd/kernel_generate/dux/rpcgen/Makefile
#
# Author: Jim Zelenka
#
#
# Copyright (c) of Carnegie Mellon University, 1999.
#
# Permission to reproduce, use, and prepare derivative works of
# this software for internal use is granted provided the copyright
# and "No Warranty" statements are included with all reproductions
# and derivative works. This software may also be redistributed
# without charge provided that the copyright and "No Warranty"
# statements are included in all redistributions.
#
# NO WARRANTY. THIS SOFTWARE IS FURNISHED ON AN "AS IS" BASIS.
# CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER
# EXPRESSED OR IMPLIED AS TO THE MATTER INCLUDING, BUT NOT LIMITED
# TO: WARRANTY OF FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY
# OF RESULTS OR RESULTS OBTAINED FROM USE OF THIS SOFTWARE. CARNEGIE
# MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH RESPECT
# TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.
#

THE_TOP=${MAKETOP}/kernel/nasd/.

VPATH = $(THE_TOP)/rpcgen:$(THE_TOP)/common

OFILES = \
	nasd_getopt.o \
	nasd_rpcgen.o \
	nasd_rpcgen_cpp.o \
	nasd_rpcgen_math.o \
	nasd_rpcgen_output_c.o \
	nasd_rpcgen_output_dceidl.o \
	nasd_rpcgen_output_marshall.o \
	nasd_rpcgen_output_usc.o \
	nasd_rpcgen_parse.o \
	nasd_rpcgen_tab.o

PROGRAMS = nasd_rpcgen
OTHERS			= build_inst
CCTYPE			= host
DDIR			= ../../../../bin
INCFLAGS		= -I$(THE_TOP)/include -I../../include -I/usr/include

ILIST   = ${PROGRAMS}
IDIR    = /usr/sys/bin/

include ${MAKEFILEPATH}/standard.mk
include ${MAKEFILEPATH}/programs.mk
include ${MAKEFILEPATH}/objects.mk
include ${MAKEFILEPATH}/others.mk
include ${MAKEFILEPATH}/nasd.mk

build_inst:
	@-if [ -d ${DDIR} ]; \
	then \
		cmp -s nasd_rpcgen ${DDIR}/nasd_rpcgen  || { \
			rm -f ${DDIR}/nasd_rpcgen; \
			echo "cp nasd_rpcgen ${DDIR}/nasd_rpcgen";\
			cp nasd_rpcgen ${DDIR}/nasd_rpcgen;\
		} ;\
	else \
		mkdir ${DDIR}; \
		echo "cp nasd_rpcgen ${DDIR}/nasd_rpcgen";\
		cp nasd_rpcgen ${DDIR}/nasd_rpcgen; \
	fi

