#
#  Directory: Site/dso/Playstation
#
#  This directory builds GetD3D
#
#
#  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
#
#
#  This Makefile still has these following external references:
#
#	/remote/dolphin/swre3/Server/uimx_2.6/bin/uxcgen
#	../../include/
#



#  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

DTOBJS      = $(GAMES_LOCATION)/lib/libDtOMio.so \
              $(GAMES_LOCATION)/lib/libDtIMF.so \
              $(GAMES_LOCATION)/lib/libDtUt.so



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



#  Source files for this directory.
#
CFILES =

C++FILES =      getdirect3d.c++


#  User Interface files for this directory.
#
UIFILES =	

UISOURCES =	$(UIFILES:.if=.c)
UIOBJECTS =	$(UISOURCES:.c=.o)

OBJ1 = 		getdirect3d.o

OBJ2 = 	

OBJ3 = 	

#  Files created by this Makefile which
#  need to be removed by clean & clobber.

LDIRT =		so_locations \
		GetD3D


#  Local macros used on the compile line. Use the env var
#  CPP_DEBUG to turn on debug (setenv CPP_DEBUG -g).
#
LC++INCS	= -I. -I$(INCDIR) -I$(ALIAS_LOCATION)/ODS/Common/include
LC++OPTS	= ${CPP_DEBUG} -fullwarn -D_SVR4_SOURCE -D_SGI_SOURCE -DMOTIF -DXT_CODE

LCINCS		= -I. -I$(INCDIR)
LCOPTS		= ${CPP_DEBUG} -fullwarn -D_SVR4_SOURCE -D_SGI_SOURCE -DMOTIF -DXT_CODE



#  Targets for this Makefile.
#
TARGETS	=	GetD3D

default:	$(TARGETS)



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


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


#  Convert a C source file (.c) to an object file (.o)
#
.c.o:
	$(CC) -c $(CFLAGS) -Xcpluscomm -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 Direct3D DSO.
#
GetD3D: $(OBJ1) $(UIOBJECTS) $(DTOBJS)
#	$(C++) -shared -o $@ $(OBJ1) $(UIOBJECTS)
	ld -shared -o $@ $(OBJ1) $(UIOBJECTS) $(DTOBJS)
