/*
 * NASD_site.def
 *
 * site-specific stuff, change it to suit your needs
 *
 * Author: Jim Zelenka
 */
/*
 * Copyright (c) of Carnegie Mellon University, 1996,1997,1998,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.
 */

/*
 * Use gcc with some anal options to catch errors
 */
/* #define DEBUG_COMPILE */

#ifdef ITOMF_NASD_DESTDIR
NASD_DESTDIR = ITOMF_NASD_DESTDIR
#else /* ITOMF_NASD_DESTDIR */
NASD_DESTDIR = /usr/nasd
#endif /* ITOMF_NASD_DESTDIR */

SED       = sed
AWK       = awk
CP        = cp
PIXIE     = pixie
RM        = /bin/rm -f
NASD_DIFF = /bin/diff

#ifdef LinuxArchitecture
NASD_DIFF = /usr/bin/diff
#if BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_DCE
DCEIDL = /opt/dce/bin/idl
IDLGENCFLAGS = -DDCE__USE_HYPER_LONGLONG=1
#endif /* BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_DCE */
MAKE = make -S
#ifdef i386Architecture
/*
 * For whatever reason, linux x86 boxes generate the wrong values
 * without -msoft-float. NetBSD gets it right, so go figure.
 */
/* -msoft-float removed by mju 2/24/98, on the theory that it's probably
 * been fixed by now.
 */
/* -O2 appears to work with DCE SNAP006, so we'll put it back in; however
 * if you have bizarre DCE-related problems, try taking it out.
 * mju 9-jul-98
 */
CC = /usr/bin/gcc
CPP=$(CC) -E -x c
CDEBUGFLAGS = -pipe -g -O2 -Wimplicit -Wreturn-type -Wswitch -Wcomment $(LCDEBUGFLAGS) -Werror
CVTTYPES_CFLAGS = -O3 -g
CRYPTOLIB_CFLAGS = -O3 -g
CCOPTIONS=
ARCHLIBS=
#endif /* i386Architecture */
#endif /* LinuxArchitecture */

#ifdef AlphaArchitecture
#if BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_DCE
DCEIDL=/bin/idl
#endif /* BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_DCE */
LEXLIB=-ll
CPP=/usr/bin/cpp
ARCHLIBS=
LEX=/usr/local/bin/flex -l
#ifndef DEBUG_COMPILE
IDLGENCFLAGS= -w1
CC = cc
CDEBUGFLAGS = -g3 -O2 $(LCDEBUGFLAGS) -Olimit 2048
NASD_DEFAULTCFLAGS = -w2
CVTTYPES_CFLAGS = -O3 -Olimit 4000
CRYPTOLIB_CFLAGS = -O3 -Olimit 4000
#else /* !DEBUG_COMPILE */
IDLGENCFLAGS=
CC = gcc -g -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wparentheses -Winline -Werror
CDEBUGFLAGS = -O
CVTTYPES_CFLAGS = -O
CRYPTOLIB_CFLAGS = -O
#endif /* !DEBUG_COMPILE */
#endif /* AlphaArchitecture */

#ifdef IRIXArchitecture
NASD_DEFAULTCFLAGS = -w2
EXTRA_LDOPTIONS = -Wl,-dont_warn_unused -Wl,-woff,85
CDEBUGFLAGS = -O2 -OPT:Olimit=6151 ${LCDEBUGFLAGS}
CVTTYPES_CFLAGS = -w2 -O2 -OPT:Olimit=6151
ARCHLIBS=-lpthread
#endif /* IRIXArchitecture */

/*
 * Set $MAKE to override the make definition, if necessary.
 */
#if defined(HPArchitecture) || defined(UltrixArchitecture) || defined(IRIXArchitecture) || defined(AIXArchitecture)
MAKE=gmake
#endif /* HPArchitecture || UltrixArchitecture || IRIXArchitecture || AIXArchitecture */

#ifdef SolarisArchitecture
MAKE=make
#endif /* SolarisArchitecture */

#if defined(NetBSDArchitecture) && defined(AlphaArchitecture)
CC = gcc
CDEBUGFLAGS = -g3 -O2 $(LCDEBUGFLAGS)
ARCHLIBS=
#endif /* NetBSDArchitecture && AlphaArchitecture */

#ifdef FreeBSDArchitecture
SHELL=/bin/sh
MAKE=gmake
CDEBUGFLAGS = -pthread -O2 -g -Wimplicit -Wreturn-type -Wswitch -Wcomment $(LCDEBUGFLAGS) -Werror
CVTTYPES_CFLAGS = -O3 -g
CRYPTOLIB_CFLAGS = -O3 -g
CCOPTIONS=
ARCHLIBS=
#endif /* FreeBSDArchitecture */

#ifdef AIXArchitecture
#if NASD_OSMajorVersion == 4
CC = cc_r
#else /* NASD_OSMajorVersion == 4 */
CC = cc
#endif /* NASD_OSMajorVersion == 4 */
CDEBUGFLAGS = -O
CVTTYPES_CFLAGS = -O
LEXLIB=-ll
ARCHLIBS=
#endif /* AIXArchitecture */

#ifdef SolarisArchitecture
CC = gcc -Wimplicit -Wreturn-type -Wswitch -Wcomment $(LCDEBUGFLAGS) -Werror
CDEBUGFLAGS = -g3 -O2 $(LCDEBUGFLAGS)
CVTTYPES_CFLAGS = -g3 -O2 $(LCDEBUGFLAGS)
CCOPTIONS=
ARCHLIBS=-lpthread
#endif /* SolarisArchitecture */

#ifdef UltrixArchitecture
CC = gcc
CDEBUGFLAGS = -g3 -O2 $(LCDEBUGFLAGS)
CCOPTIONS =
ARCHLIBS=
#endif /* UltrixArchitecture */

#ifdef HPArchitecture
CC = gcc
CDEBUGFLAGS = -g3 -O2 $(LCDEBUGFLAGS)
CCOPTIONS =
ARCHLIBS=
#endif /* HPArchitecture */

#ifdef MACH
CC = gcc
CDEBUGFLAGS = -g3 -O2 $(LCDEBUGFLAGS)
CCOPTIONS =
ARCHLIBS=
#endif /* MACH */

#ifdef AlphaArchitecture
#if BUILD_NASD_CMU_PDL > 0
PDLDIR = /usr/pdl
PDLARCHLIBS= -L$(PDLDIR)/lib -lpdl
PDLARCHDEFINES=-I$(PDLDIR)/include
#else BUILD_NASD_CMU_PDL > 0
PDLARCHLIBS=
PDLARCHDEFINES=
#endif /* BUILD_NASD_CMU_PDL > 0 */
ARCHLIBS=$(PDLARCHLIBS)
SARCHDEFINES = $(PDLARCHDEFINES)
#if BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_DCE
#ifndef DEBUG_COMPILE
RPCLIBS = -ldce -threads
#else /* !DEBUG_COMPILE */
RPCLIBS = -ldce -lpthreads -lc_r
#endif /* !DEBUG_COMPILE */
#endif /* BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_DCE */
#if BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_NONE
RPCLIBS = -threads
#endif /* BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_NONE */
#if BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_SRPC
RPCLIBS = -threads
#endif /* BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_SRPC */
#endif /* AlphaArchitecture */

#ifdef LinuxArchitecture
#undef StandardDefines
#define StandardDefines		-Dlinux -D__i386__ -DX_LOCALE
#if BUILD_NASD_CMU_PDL > 0
PDLDIR=/usr/pdl
PDLARCHLIBS=-L$(PDLDIR)/lib -Wl,-rpath $(PDLDIR)/lib -lpdl
PDLARCHDEFINES=-I$(PDLDIR)/include
#else /* BUILD_NASD_CMU_PDL > 0 */
PDLARCHLIBS=
PDLARCHDEFINES=
#endif /* BUILD_NASD_CMU_PDL > 0 */
ARCHLIBS = $(PDLARCHLIBS)
#if BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_DCE
SARCHDEFINESRPC = -I/opt/dce/share/include 
RPCLIBS = -L/opt/dce/usr/lib -Wl,-rpath /opt/dce/usr/lib -ldce -ldcethreads -lpthread
#endif /* BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_DCE */
#if BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_NONE
RPCLIBS = -lpthread
#endif /* BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_NONE */
#if BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_SRPC
RPCLIBS = -lpthread
#endif /* BUILD_NASD_RPC_PACKAGE == NASD_RPC_PACKAGE_SRPC */
SARCHDEFINES = $(SARCHDEFINESRPC) $(PDLARCHDEFINES) -D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS
#endif /* LinuxArchitecture */

#ifdef VxWorksArchitecture
#ifdef NASD_WIND_BASE
WIND_BASE = NASD_WIND_BASE
#else /* NASD_WIND_BASE */
WIND_BASE = no_WIND_BASE_was_set
#endif /* NASD_WIND_BASE */
#ifdef NASD_TGT_DIR
TGT_DIR = NASD_TGT_DIR
#else /* NASD_TGT_DIR */
TGT_DIR = no_TGT_DIR_was_set
#endif /* NASD_TGT_DIR */
WIND_HOST_TYPE = NASD_WIND_HOST_TYPE
#endif /* VxWorksArchitecture */

