#include "Makefile.h"

/**************************************************************************/

/* Set some defaults */
AFLAGS=rv
RANLIB=ranlib
FC=f77
CFLAGS= -g
LFLAGS=

#ifdef _AIX
CFLAGS= -g
LFLAGS=
#endif

#ifdef SVR3
CFLAGS=-g
LFLAGS=-lmld
AFLAGS=cuvs
RANLIB=file
#endif

#ifdef __sgi
CFLAGS=-g
/* If you do not want NIS support compiled into DQS under IRIX, remove*/
/* -lsun from the LFLAGS. */
LFLAGS=-lmld -lsun
AFLAGS=cuvs
#ifdef mips_sgi_irix64_6_0_1
CFLAGS= -g -mips2
LFLAGS= -mips2
#endif
#undef RANLIB
RANLIB=file
#endif

#ifdef sparc_sun_sunos4_1_1
#define sun
#endif

#ifdef sparc_sun_solaris2_3
CFLAGS=-g  -DSVR4 -DSOLARIS23
RANLIB=file
LFLAGS=-lelf -lsocket -lnsl  -lthread -lkvm
#define solaris
#else
/* SunOS */
#ifdef sun
CFLAGS=-g
LFLAGS=
RANLIB=ranlib
#endif
#endif

#ifdef sparc_sun_solaris2_4
CFLAGS=-g -DSOLARIS24
RANLIB=file
LFLAGS=-lelf -lsocket -lnsl  -lthread -lkvm
#define solaris
#endif

#ifdef sparc_sun_solaris2_5

CFLAGS=-g  -DSOLARIS25 -DSOLARIS24 -I/usr/openwin/include
RANLIB=file 
LFLAGS=-lelf -lsocket -lnsl  -lthread -lkvm
#define solaris
#endif

#ifdef sparc_sun_solaris2_6

CFLAGS=-g -DSOLARIS26  -DSOLARIS25 -DSOLARIS24 -I/usr/openwin/include
RANLIB=file
LFLAGS=-lelf -lsocket -lnsl  -lthread -lkvm
#define solaris
#endif

#ifdef ultrix
#ifndef vax
CFLAGS=-g
LFLAGS=
#endif
#endif

#ifdef ultrix
#ifdef vax
CFLAGS=-g
LFLAGS=
#endif
#endif

#ifdef _UNICOS
CFLAGS=-g -I/usr/local/include
LFLAGS=-L/usr/local/lib -lalloca
AFLAGS=cuv
RANLIB=file
#endif

#ifdef __hpux
CFLAGS=
LFLAGS=
#endif

#ifdef NeXT
CFLAGS = -posix
LFLAGS = -posix
#endif

#ifdef SPEW
#endif



/*************************************************************************/



CFILES = main.c get_make.c get_dqs.c get_conf_file.c 			\
	get_resolve_file.c etc_services.c script_config.c 	\
	do_host_ck.c generate_makefile.c dqs_getdomainname.c

OBJS = main.o get_make.o get_dqs.o get_conf_file.o get_resolve_file.o 	\
	etc_services.o  script_config.o  do_host_ck.o		\
	generate_makefile.o dqs_getdomainname.o

all: config host_ck  

config: $(OBJS)
	$(CC) -o config $(OBJS)  $(LFLAGS) $(LIBS)

host_ck: do_host_ck.o host_ck.o dqs_getdomainname.o
	$(CC) -o host_ck do_host_ck.o host_ck.o dqs_getdomainname.o $(LFLAGS) $(LIBS)

clean:
	rm -f *.o resolve_file conf_file  config *.log core core.* *~
	rm -f *.bak header host_ck  #*

header:
	rm -f header
	desc.pl $(CFILES) > header



lines:
	wc -l $(CFILES) main.h




