XCOMM
XCOMM This is an Imakefile for the ffb driver.  
XCOMM
XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile,v 1.7 2002/09/16 18:06:01 eich Exp $

#define IHaveModules
#include <Server.tmpl>

#if BuildXF86DRI
DRISRCS = ffb_dri.c
DRIOBJS = ffb_dri.o
DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri -I$(TOP)/include
DRIDEFINES = $(GLX_DEFINES)
#endif

#if defined(AsVISOption) && defined(UseElfFormat)
VISOBJS = VISmoveImage.o ffb_asm.o
VISOPTIONS = -DUSE_VIS
ASVISOPTION = AsVISOption
GCCVISOPTION = -Wa,$(ASVISOPTION)
#if AsOutputArchSize == 32
#define FFBCObjectRule(name)						@@\
name.o: name.c								@@\
	ObjectCompile(-mv8 -mtune=ultrasparc \
		$(GCCVISOPTION) $(VISOPTIONS) $(DRIDEFINES))		@@\
	dd if=/dev/zero bs=1 count=3 2>/dev/null | \
		dd of=$@ bs=1 count=3 seek=36 conv=notrunc 2>/dev/null	@@\
	dd if=/dev/zero bs=1 count=1 2>/dev/null | \
		tr '\000' '\002' | \
		dd of=$@ bs=1 count=1 seek=19 conv=notrunc 2>/dev/null	@@\
									@@\
name.i: name.c								@@\
	CPPOnlyCompile(name.c,-mv8 \
		$(GCCVISOPTION) $(VISOPTIONS) $(DRIDEFINES))		@@\
									@@\
CenterLoadTarget(debug_src,name.c,NullParameter,$(ALLDEFINES) -mv8 \
	$(GCCVISOPTION) $(VISOPTIONS) $(DRIDEFINES))
#define FFBsObjectRule(name)						@@\
name.o: name.s								@@\
	$(RM) $@							@@\
	$(CPP) $*.s | $(AS) $(GCCVISOPTION) -o $@ -			@@\
	dd if=/dev/zero bs=1 count=3 2>/dev/null | \
		dd of=$@ bs=1 count=3 seek=36 conv=notrunc 2>/dev/null	@@\
	dd if=/dev/zero bs=1 count=1 2>/dev/null | \
		tr '\000' '\002' | \
		dd of=$@ bs=1 count=1 seek=19 conv=notrunc 2>/dev/null
#else
#define FFBCObjectRule(name) SpecialCObjectRule(name,,$(GCCVISOPTION) $(VISOPTIONS) $(DRIDEFINES))
#define FFBsObjectRule(name)						@@\
name.o: name.s								@@\
	$(RM) $@							@@\
	$(CPP) $*.s | $(AS) $(GCCVISOPTION) -o $@ -
#endif
#else
VISOBJS =
VISOPTIONS =
ASVISOPTION =
#define FFBCObjectRule(name)
#define FFBsObjectRule(name)
#endif

SRCS = ffb_driver.c ffb_accel.c ffb_attr.c ffb_stip.c ffb_bcopy.c \
       ffb_cplane.c ffb_fspans.c ffb_point.c ffb_seg.c ffb_plygon.c \
       ffb_line.c ffb_glyph.c ffb_frect.c ffb_circle.c ffb_checks.c \
       ffb_stubs.c ffb_gc.c ffb_gspans.c ffb_sspans.c ffb_zeroarc.c \
       ffb_cursor.c ffb_dga.c ffb_dac.c ffb_wid.c ffb_dbe.c $(DRISRCS)
OBJS = ffb_driver.o ffb_accel.o ffb_attr.o ffb_stip.o ffb_bcopy.o \
       ffb_cplane.o ffb_fspans.o ffb_point.o ffb_seg.o ffb_plygon.o \
       ffb_line.o ffb_glyph.o ffb_frect.o ffb_circle.o ffb_checks.o \
       ffb_stubs.o ffb_gc.o ffb_gspans.o ffb_sspans.o ffb_zeroarc.o \
       ffb_cursor.o ffb_dga.o ffb_dac.o ffb_wid.o ffb_dbe.o $(VISOBJS) \
       $(DRIOBJS)

#if defined(XF86DriverSDK)
INCLUDES = -I. -I../../include
#else
INCLUDES = -I. -I$(XF86COMSRC) -I$(XF86OSSRC) \
           -I$(SERVERSRC)/mfb -I$(SERVERSRC)/mi \
           -I$(SERVERSRC)/Xext -I$(SERVERSRC)/cfb \
	   -I$(SERVERSRC)/dbe \
	   -I$(XF86SRC)/xf8_32wid \
	   -I$(XF86SRC)/ramdac \
	   -I$(XF86SRC)/ddc \
	   -I$(XF86SRC)/i2c \
           -I$(FONTINCSRC) -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
	   -I$(EXTINCSRC) \
	   $(DRIINCLUDES)
#endif

#if MakeHasPosixVariableSubstitutions
SubdirLibraryRule($(OBJS))
#endif

ModuleObjectRule()

ObjectModuleTarget(sunffb,$(OBJS))

InstallObjectModule(sunffb,$(MODULEDIR),drivers)

#if !defined(XF86DriverSDK)
InstallModuleManPage(sunffb)
#endif

FFBCObjectRule(ffb_accel)
FFBCObjectRule(ffb_driver)
FFBCObjectRule(ffb_attr)
FFBCObjectRule(ffb_stip)
FFBCObjectRule(ffb_bcopy)
FFBCObjectRule(ffb_cplane)
FFBCObjectRule(ffb_fspans)
FFBCObjectRule(ffb_point)
FFBCObjectRule(ffb_seg)
FFBCObjectRule(ffb_plygon)
FFBCObjectRule(ffb_line)
FFBCObjectRule(ffb_glyph)
FFBCObjectRule(ffb_frect)
FFBCObjectRule(ffb_circle)
FFBCObjectRule(ffb_checks)
FFBCObjectRule(ffb_stubs)
FFBCObjectRule(ffb_gc)
FFBCObjectRule(ffb_gspans)
FFBCObjectRule(ffb_sspans)
FFBCObjectRule(ffb_zeroarc)
FFBCObjectRule(ffb_cursor)
FFBCObjectRule(ffb_dga)
FFBCObjectRule(ffb_dac)
FFBCObjectRule(ffb_wid)
FFBCObjectRule(ffb_dbe)
FFBsObjectRule(VISmoveImage)
FFBsObjectRule(ffb_asm)
#if BuildXF86DRI
FFBCObjectRule(ffb_dri)
#endif

DependTarget()
