# 
# Midway Distributed Shared Memory System
# Copyright (c) 1994 Carnegie Mellon University
# All Rights Reserved.
# 
# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright
# notice and this permission notice appear in all copies of the
# software, derivative works or modified versions, and any portions
# thereof, and that both notices appear in supporting documentation.
# 
# CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
# CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
# ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
#
# must use gcc compiler when profiling
#CC = cc
CC = /usr/misc/bin/gcc
OLDCC = /bin/cc

COMMONFLAGS = -I. -I.. -I../smexec -I../gprof
#COPTS = -MD $(COMMONFLAGS)
COPTS = -MD $(COMMONFLAGS)
#COPTS = -MD $(COMMONFLAGS) -DMIDWAY_WIRE_MEMORY

# Define macros for network calls (can also be defined on command line,
# i.e. make "NETFLAGS=-DFAST_UDP"
#UDP#NETFLAGS = 
# This one for user library UDP
# Application must also link with libsockets.a
#UDP#NETFLAGS = -DFAST_UDP
#NETFLAGS = -DFAST_UDP --warning -- reset if want atm & udp. sigh.

# This one for ATM  [CAN REMOVE - 8 jan 94 mjz]
#ATM#NETFLAGS = -DATM_IFACE
NETFLAGS = -DSET_PRIORITY


# define as -pg for profiling. leave blank to compiler without profiling
#WAS#PROFILE =
# PROFILE = -pg -DPROFILE

# profiling for dirty bit code. Makes dbit code a factor of 10 more expensive.
PROFILE_DBITS = 
#WAS#PROFILE_DBITS = -DPROFILE

#
# Define -DBENCHMARK to compile code for benchmarking.
# Define -DPAGE_BASED to compile page-based version of midway
#

CPPFLAGS = ${COPTS}
#WAS#CFLAGS = ${COPTS} -O -DOMITSHARED $(NETFLAGS) -DBENCHMARK -DFAST_STATS
#WAS#CFLAGS = ${COPTS} -g -DOMITSHARED $(NETFLAGS) -DFAST_STATS
CFLAGS = ${COPTS} -g -DOMITSHARED $(NETFLAGS) -DFAST_STATS -DSTOP_ON_ERROR


#I386_LIBFLAGS = -v -L/usr/lib
I386_LIBFLAGS = -v
LIBFLAGS = -L. ${${TARGET_MACHINE}_LIBFLAGS}

PMAX_ASFLAGS= -O -nocpp
ASFLAGS = ${${TARGET_MACHINE}_ASFLAGS}

I = -c -d -v
