# Make file for cmds/bin 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/NFS/indnetwk)

ROOT=

PRODUCTS=/usr/bin/domainname

SRCS= domainname.c

OBJS= domainname.o

INCLUDES= -I/source/NFS/${LOGNAME}/include -I/usr/include

CCFLAGS= $(INCLUDES) $(CFLAGS)

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

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

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

include ${BUILDRULES}

default: all

all: clean build install

clean:
	$(RM) -f *.o domainname

build: domainname

domainname: $(OBJS)
	$(ECHO) "Building domainname..."
	$(CC) -c $(CCFLAGS) $(SRCS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS)

install:
	for file in $(PRODUCTS) ; do \
		$(INSTALLSCPT) $$file $(INSTALLDB) ;  \
	done

