# Make file for dpp directory
# Things you might want to change.  Pass them in on the command line:
# ROOT - should point to the root where the commands will be installed
#        (e.g. /deliver/INETSVCS/indnetwk)

ROOT=

PRODUCTS= /usr/contrib/bin/ddfa_dev_mig \
	/usr/examples/ddfa/dp \
	/usr/sbin/dpp

SRCS=   decode.c display_msg.c dpp.c process.c store_login.c
OBJS=   decode.o display_msg.o dpp.o process.o store_login.o

HDRS=	decodex.h display_msg.h display_msgx.h processx.h store_loginx.h

# Defaults file containing the shell, compiler options, etc
BUILDRULES=/source/INETSVCS/$(LOGNAME)/config/defaults

include ${BUILDRULES}

INCLUDES=-I../include -I/usr/include

#Install database name
INSTALLDB=/source/INETSVCS/$(LOGNAME)/config/installdb

#Script called to parse the install deliverable
INSTALLSCPT=/source/INETSVCS/$(LOGNAME)/config/install_script

default: all

all: clean build install

clean:
	$(RM) -f *.o
	$(RM) -f core
	$(RM) -f dpp

build: dpp

decode.o:  display_msg.h display_msgx.h ../include/dpp_const.h

display_msg.o:  display_msg.h

dpp.o:  display_msgx.h processx.h decodex.h store_loginx.h \
	display_msg.h ../include/dpp_const.h

process.o:  display_msg.h display_msgx.h ../include/dpp_const.h

store_login.o:  display_msg.h display_msgx.h \
		../include/dpp_const.h ../include/store_login.h

dpp: $(SRCS)
	$(ECHO) "Building dpp. . ."
	$(CC) -c $(CFLAGS) $(INCLUDES) $(SRCS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS)
	
install:
	for file in $(PRODUCTS) ; do \
		$(INSTALLSCPT) $$file $(INSTALLDB) ;  \
	done

