#
#
#  This directory builds the dso.
#
#
#  To compile with debug, use the env var CPP_DEBUG:
#
#	setenv CPP_DEBUG -g
#
#
#  To customize the include path or compile flags,
#  use these macros located below in this file:
#
#	LC++INCS	to modify include path
#	LC++OPTS	to modify compile flags


#  SITEROOT defines the "Site" directory of the development tree.
#  It is a relative path from this current directory. All other
#  variables in this Makefile should be relative to SITEROOT.
#
SITEROOT    = $(GAMES_LOCATION)
INCDIR      = $(SITEROOT)/include
INCOM		= $(ALIAS_LOCATION)/ODS/Common/include 

#  Include SGI common definitions.
#
include	/usr/include/make/commondefs



#  Source files for this directory.
#
CFILES 	 =	 
C++FILES =OMtest.c++	



#  Local macros used on the compile line. Use the env var
#  CPP_DEBUG to turn on debug (setenv CPP_DEBUG -g).
#
LCINCS		= -I. -I$(INCDIR) -I$(INCOM)
LCOPTS		= ${C_DEBUG} -fullwarn -D_SVR4_SOURCE -D_SGI_SOURCE -DMOTIF -DXT_CODE

LC++INCS	= -I. -I$(INCDIR) -I$(INCOM)
LC++OPTS	= ${CPP_DEBUG} -fullwarn -D_SVR4_SOURCE -D_SGI_SOURCE -DMOTIF -DXT_CODE



#  Targets for this Makefile.
#
TARGETS	=	OMtest

default:	$(TARGETS)



# Include SGI common rules. This line must be after
# the first rule in this Makefile.
#
include $(COMMONRULES)


#  Convert a C++ source file (.c++) to an object file (.o)
#
.c++.o:
	@echo "\nCompiling $*.c++"
	$(C++) $(C++FLAGS) -c -o $@ $<


#  Convert a C source file (.c) to an object file (.o)
#
.c.o:
	@echo "\nCompiling $*.c"
	$(CC) -c $(CFLAGS) -o $@ $<


#  Convert a UIM/X interface file (.if) to an object file (.o)
#
UXCGEN      = $(SITEROOT)/bin/uxcgen
UXCFLAGS    = -a -h -x

.SUFFIXES:  .if

#.if.c:
#	@echo "\nProcessing $*.if"
#	$(UXCGEN) $(UXCFLAGS) $*.if
#	@echo "\nPassing $*.h through ExternC.awk"
#	awk -f ExternC.awk $*.h > $*.h,new
#	mv $*.h,new $*.h


#  Link the OMtest DSO.
#
OMtest: OMtest.o
	@echo "\nCreating DSO object $@"
#	$(C++) -shared -o $@ OMtest.o 
	ld -shared -o $@ OMtest.o 
