#
# Copyright IBM Corporation 1987,1990
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permission notice appear in
# supporting documentation, and that the name of IBM not be
# used in advertising or publicity pertaining to distribution of the
# software without specific, written prior permission.
#
# IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
# IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
#
# PRPQ 5799-PFF (C) COPYRIGHT IBM CORPORATION 1987,1990
# LICENSED MATERIALS - PROPERTY OF IBM
# REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
#
# $Header: /andrew/X11/r3src/release/server/ddx/ibm/ibm8514/RCS/Imakefile,v 9.3 89/02/13 22:47:06 paul Exp $ 
# $Source: /andrew/X11/r3src/release/server/ddx/ibm/ibm8514/RCS/Imakefile,v $ 
SRCS =	 	brcBlit.c	\
		brcCmap.c	\
		brcCurs.c	\
		brcFillSp.c	\
		brcGC.c		\
		brcGetSp.c	\
		brcImg.c	\
		brcMono.c	\
		brcSuspScr.c	\
		brcIO.c		\
		brcUtils.c	\
		brcGBlt.c	\
		brcLine.c	\
		brcStip.c	\
		brcFont.c	\
		brcText.c	\
		brcPoly.c	\
		brcPgon.c	\
		brcOutL.c	\
		brcRect.c	\
		brcTile.c	\
		brcPushPxl.c	\
		brcOSD.c	\
		brcScrInfo.c	\
		brcData.c

#ifdef PS2Architecture
ASRCS =		blkout.s
#endif

COBJS = 	brcBlit.o	\
		brcCmap.o	\
		brcCurs.o	\
		brcFillSp.o	\
		brcGC.o		\
		brcGetSp.o	\
		brcImg.o	\
		brcMono.o	\
		brcSuspScr.o	\
		brcIO.o		\
		brcUtils.o	\
		brcGBlt.o	\
		brcLine.o	\
		brcStip.o	\
		brcFont.o	\
		brcText.o	\
		brcPoly.o	\
		brcPgon.o	\
		brcOutL.o	\
		brcRect.o	\
		brcTile.o	\
		brcPushPxl.o	\
		brcOSD.o	\
		brcScrInfo.o	\
		brcData.o

#if defined(PS2Architecture)
ASMOBJS =	blkout.o
#else
ASMOBJS =
#endif

OBJS =		$(COBJS) $(ASMOBJS)

#ifdef PS2Architecture
STD_DEFINES = ServerDefines OSDefines -DPCIO
#else
STD_DEFINES = ServerDefines OSDefines -DATRIO
#endif

CDEBUGFLAGS = ServerCDebugFlags 
SERVER = $(TOP)/server
DDX = $(SERVER)/ddx
DDXIBM = $(DDX)/ibm
INCLUDES = -I. -I$(DDXIBM)/OPERATING_SYSTEM -I$(DDX)/mfb -I$(DDX)/mi -I$(DDXIBM)/ppc -I$(SERVER)/include -I$(INCLUDESRC) -I$(DDXIBM)/common

LINTLIBS =	$(DDX)/mfb/llib-lmfb.ln $(DDX)/mi/llib-lmi.ln \
	$(DDXIBM)/ppc/llib-lppc.ln $(DDXIBM)/common/llib-libmcomm.ln 

NormalRelocatableTarget(ibm8514,$(OBJS))

#if DebugServer
DebuggedRelocatableTarget(ibm8514,$(OBJS))
#endif
#if ProfileServer
ProfiledRelocatableTarget(ibm8514,$(OBJS))
#endif

#ifdef LCGBUILD
	COMPILE_LIST = $(OBJS)
	BUILD_LIST = ibm8514.o
#endif

#if DebugServer && ProfileServer
DebuggedAndProfiledLibraryObjectRule()
.s.o:
	$(RM) -f m.s $@ debugger/$@ profiled/$@
	$(CPP) $(CFLAGS) $*.s > m.s
	$(AS) -o $@ m.s
	$(CP) $@ debugger/$@
	$(CP) $@ profiled/$@
	$(RM) -f m.s
#else
# if DebugServer
DebuggedLibraryObjectRule()
.s.o:
	$(RM) -f m.s $@ debugger/$@
	$(CPP) $(CFLAGS) $*.s > m.s
	$(AS) -o $@ m.s
	$(CP) $@ debugger/$@
	$(RM) -f m.s
# else
#  if ProfileServer
ProfiledLibraryObjectRule()
.s.o:
	$(RM) -f m.s $@ profiled/$@
	$(CPP) $(CFLAGS) $*.s > m.s
	$(AS) -o $@ m.s
	$(CP) $@ profiled/$@
	$(RM) -f m.s
#  else
NormalLibraryObjectRule()
.s.o:
	$(RM) -f m.s $@
	$(CPP) -E $(CFLAGS) $*.s > m.s
	$(AS) -o $@ m.s
	$(RM) -f m.s
#  endif
# endif
#endif

DependTarget()

#ifndef LCGBUILD
LintLibraryTarget(ibm8514,$(SRCS))
NormalLintTarget($(SRCS))
#endif
