On Fri, Aug 24, 2007 at 02:51:14PM +0000, Homam Dabis wrote:
> Could someone please give me a step by step as to how to add a new gfx driver
> to the makefiles/configure files.
Not sure if a diff counts as a step by step but here it is anyway.
Replace all occurances newgfx with the name of your gfxdriver.
If the gfxdriver has any special build dependencies you need to test
for them in configure.in.
gfxdrivers/newgfx/Makefile.am may need modifications depending on the
dependencies (eg. to link it against some extra libraries) and/or
source layout of your gfxdriver (you need mention all source files in
libdirectfb_newgfx_la_SOURCES).
diff --git a/configure.in b/configure.in
index 4df1fb5..e2be5cc 100644
--- a/configure.in
+++ b/configure.in
@@ -858,6 +858,7 @@ i830=no
mach64=no
matrox=no
neomagic=no
+newgxf=no
nsc=no
cle266=no
unichrome=no
@@ -877,7 +878,7 @@ AC_ARG_WITH(gfxdrivers,
[ 'all' builds all drivers (default), 'none' builds
none ]
[ Possible gfxdrivers are: ]
[ ati128, cle266, cyber5k, i810, i830, mach64,
matrox,]
-[ neomagic, nsc, nvidia, radeon, savage,]
+[ neomagic, newgfx, nsc, nvidia, radeon, savage,]
[ sis315, tdfx, unichrome, vmware],
gfxdrivers="$withval",[gfxdrivers="all"])
if test "$gfxdrivers" = "all"; then
@@ -889,6 +890,7 @@ if test "$gfxdrivers" = "all"; then
checkfor_mach64=yes
checkfor_matrox=yes
checkfor_neomagic=no
+ checkfor_newgfx=yes
checkfor_nsc=no
checkfor_nvidia=no
checkfor_radeon=yes
@@ -928,6 +930,9 @@ else
neomagic)
checkfor_neomagic=yes
;;
+ newgfx)
+ checkfor_newgfx=yes
+ ;;
nsc)
checkfor_nsc=yes
;;
@@ -1002,6 +1007,10 @@ if test "$checkfor_neomagic" = "yes" && test
"$have_sysio" = "yes"; then
neomagic=yes
fi
+if test "$checkfor_newgfx" = "yes"; then
+ newgfx=yes
+fi
+
if test "$checkfor_i810" = "yes" && test "$have_sysio" = "yes"; then
i810=yes
fi
@@ -1318,6 +1327,7 @@ AM_CONDITIONAL(GFX_I830, test "$i830" = "yes")
AM_CONDITIONAL(GFX_MACH64, test "$mach64" = "yes")
AM_CONDITIONAL(GFX_MATROX, test "$matrox" = "yes")
AM_CONDITIONAL(GFX_NEOMAGIC, test "$neomagic" = "yes")
+AM_CONDITIONAL(GFX_NEWGFX, test "$newgfx" = "yes")
AM_CONDITIONAL(GFX_NSC, test "$nsc" = "yes")
AM_CONDITIONAL(GFX_NVIDIA, test "$nvidia" = "yes")
AM_CONDITIONAL(GFX_RADEON, test "$radeon" = "yes")
@@ -1483,6 +1493,7 @@ gfxdrivers/i830/Makefile
gfxdrivers/mach64/Makefile
gfxdrivers/matrox/Makefile
gfxdrivers/neomagic/Makefile
+gfxdrivers/newgfx/Makefile
gfxdrivers/nsc/Makefile
gfxdrivers/nsc/include/Makefile
gfxdrivers/nvidia/Makefile
@@ -1598,6 +1609,7 @@ Building Graphics Drivers:
Intel i830 $i830
Matrox $matrox
NeoMagic $neomagic
+ NewGfx $newgfx
NSC Geode $nsc
nVidia $nvidia
S3 Savage $savage
diff --git a/gfxdrivers/Makefile.am b/gfxdrivers/Makefile.am
index ebf2202..ef5227e 100644
--- a/gfxdrivers/Makefile.am
+++ b/gfxdrivers/Makefile.am
@@ -42,6 +42,12 @@ else
NEOMAGIC_DIR =
endif
+if GFX_NEWGFX
+NEWGFX_DIR = newgfx
+else
+NEWGFX_DIR =
+endif
+
if GFX_NSC
GEODE_DIR = nsc
else
@@ -105,6 +111,7 @@ SUBDIRS = \
$(TDFX_DIR) \
$(NVIDIA_DIR) \
$(NEOMAGIC_DIR) \
+ $(NEWGFX_DIR) \
$(SAVAGE_DIR) \
$(SIS315_DIR) \
$(I810_DIR) \
diff --git a/gfxdrivers/newgfx/Makefile.am b/gfxdrivers/newgfx/Makefile.am
new file mode 100644
index 0000000..032282d
--- /dev/null
+++ b/gfxdrivers/newgfx/Makefile.am
@@ -0,0 +1,31 @@
+## Makefile.am for DirectFB/gfxdrivers/newgfx
+
+INCLUDES = \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/systems \
+ -I$(top_srcdir)/src
+
+newgfx_LTLIBRARIES = libdirectfb_newgfx.la
+
+if BUILD_STATIC
+newgfx_DATA = $(newgfx_LTLIBRARIES:.la=.o)
+endif
+
+newgfxdir = $(MODULEDIR)/gfxdrivers
+
+libdirectfb_newgfx_la_SOURCES = \
+ newgfx.c \
+ newgfx.h
+
+libdirectfb_newgfx_la_LDFLAGS = \
+ -export-dynamic \
+ -avoid-version \
+ $(DFB_LDFLAGS)
+
+libdirectfb_newgfx_la_LIBADD = \
+ $(top_builddir)/lib/direct/libdirect.la \
+ $(top_builddir)/src/libdirectfb.la
+
+include $(top_srcdir)/rules/libobject.make
--
Ville Syrjälä
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users