Status: not-applied diff -ruN -x Makefile.in -x configure h3/glide3/src/makefile.autoconf.am h3/glide3/src/makefile.autoconf.am --- h3/glide3/src/makefile.autoconf.am 2003-08-24 07:16:56.000000000 +0200 +++ h3/glide3/src/makefile.autoconf.am 2003-08-24 07:14:48.000000000 +0200 @@ -101,7 +101,7 @@ endif if GL_AMD3D -GL_AMD3D_SRC = xtexdl_3dnow.S xdraw2_3dnow.S xdraw3_3dnow.S xdraw2_def.S xdraw3_def.S +GL_AMD3D_SRC = xtexdl_3dnow.S xdraw2_3dnow.S xdraw3_3dnow.S endif if HAL_CSIM @@ -159,6 +159,15 @@ endif +if FX_GLIDE_C_CPU_DETECT +CPUSOURCES = cpu_alpha.c +cpudtect.o cpudtect.lo: cpu_alpha.c +else +CPUSOURCES = cpudtect.S +cpudtect.o cpudtect.lo: cpudtect.S + libtool --mode=compile $(CCAS) $(CCASFLAGS) $(CPPASFLAGS) -DUSE_PACKET_FIFO=1 -c -o $@ $< +endif + if DRI_BUILD gglide.c: $(top_srcdir)/h3/glide3/src/gglide.c.dri rm -f gglide.c @@ -213,7 +222,7 @@ gbanner.c gerror.c gaa.c gdraw.c \ gglide.c distate.c gstrip.c distrip.c \ diget.c glfb.c gsst.c gtex.c gtexdl.c \ - fifo.c xtexdl_def.c cpudtect.S \ + fifo.c xtexdl_def.c $(CPUSOURCES) \ $(VGLIDE_SRC) $(ASMTRISETUP) $(GL_AMD3D_SRC) libglide3_la_LDFLAGS = -version-info 13:0:10 diff -ruN -x Makefile.in -x configure h5/glide3/src/makefile.autoconf.am h5/glide3/src/makefile.autoconf.am --- h5/glide3/src/makefile.autoconf.am 2003-08-24 07:16:56.000000000 +0200 +++ h5/glide3/src/makefile.autoconf.am 2003-08-24 07:15:51.000000000 +0200 @@ -178,10 +178,16 @@ libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s $(RM) -f $*.tmp.s +if FX_GLIDE_C_CPU_DETECT +CPUSOURCES = cpu_alpha.c +cpudtect.o cpudtect.lo: cpu_alpha.c +else +CPUSOURCES = cpudtect.s cpudtect.o cpudtect.lo: cpudtect.s $(PREPROCESSOR) -DUSE_PACKET_FIFO=1 $< > $*.tmp.s libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s $(RM) -f $*.tmp.s +endif # # Library definitions. @@ -190,7 +196,7 @@ FX_GLIDE_CTRISETUP_SRC = gxdraw.c else if GL_AMD3D -FX_GLIDE_CTRISETUP_SRC = xdraw2_3dnow.s xdraw3_3dnow.s xtexdl_3dnow.s xdraw2_def.s xdraw3_def.s +FX_GLIDE_CTRISETUP_SRC = xdraw2_3dnow.s xdraw3_3dnow.s else FX_GLIDE_CTRISETUP_SRC = xdraw2_def.s xdraw3_def.s endif @@ -226,7 +232,7 @@ gbanner.c gerror.c gaa.c gdraw.c \ gglide.c distate.c gstrip.c distrip.c \ diget.c glfb.c gsst.c gtex.c gtexdl.c \ - fifo.c cpudtect.s xtexdl_def.c $(VGLIDE_SRC) + fifo.c $(CPUSOURCES) xtexdl_def.c $(VGLIDE_SRC) libglide3_la_LDFLAGS = -version-info 13:0:10 libglide3_la_LIBADD = $(WHOLE_LIBS) $(LINK_LIBS) diff -ruN -x Makefile.in -x configure h5/glide3/src/makefile.linux h5/glide3/src/makefile.linux --- h5/glide3/src/makefile.linux 2000-11-17 22:31:06.000000000 +0100 +++ h5/glide3/src/makefile.linux 2003-08-24 07:14:48.000000000 +0200 @@ -45,6 +45,13 @@ FX_GLIDE_REAL_HW= 1 FX_GLIDE_NO_FIFO= 1 +MACHINETYPE=$(shell $(BUILD_ROOT_SWLIBS)/include/make/machinetype) +ifeq ($(MACHINETYPE),alpha) +FX_GLIDE_CTRISETUP = 1 +else +FX_GLIDE_CTRISETUP = 0 +endif + HWSPEC = fifo.c LCDEFS += -DH3 $(CMDXPORTDEFS) INITLIB = $(BUILD_ROOT)/$(FX_GLIDE_HW)/lib$(FX_GLIDE_HW)init.a @@ -202,8 +209,6 @@ LAINCS = -I$(BUILD_ROOT)/$(FX_GLIDE_HW)/include LAOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS) -AFILES = $(ASMTRISETUP) cpudtect.s - # sources HEADERS = glide.h glidesys.h glideutl.h g3ext.h PRIVATE_HEADERS = fxglide.h gsstdef.h fxinline.h fxcmd.h fxsplash.h @@ -213,7 +218,7 @@ CFILES += gsplash.c g3df.c gu.c gthread.c \ gpci.c diglide.c disst.c ditex.c \ gbanner.c gerror.c gaa.c gdraw.c gglide.c $(GLIDE3FILES) \ - glfb.c gsst.c gtex.c gtexdl.c $(HWSPEC) + glfb.c gsst.c gtex.c gtexdl.c cpudtect.c $(HWSPEC) OFILES = $(CFILES:.c=.o) @@ -273,46 +278,30 @@ PREPROCESSOR=cpp %.o: %.s - $(PREPROCESSOR) $(PREPROCESSOR_FLAGS) $< > $*.tmp.s + $(PREPROCESSOR) $< > $*.tmp.s $(CC) $(AFLAGS) -c -o $@ $*.tmp.s $(RM) -f $*.tmp.s xdraw2.o : xdraw2.s xdraw2.inc.s fxgasm.h xdraw3.o : xdraw3.s fxgasm.h -cpudtect.o: cpudtect.s # 3DNow!(tm) dependencies # XXX_def.obj targets are the default targets - ifneq ($(GL_AMD3D),) -# I have to copy the build rule from above, because the _def/_3dnow -# causes the object file names not to match up with the source file names. -# And I need to selectively enable the 3DNow flags. - xdraw2_def.o: xdraw2.s xdraw2.inc.s fxgasm.h - $(PREPROCESSOR) $< > $*.tmp.s - $(CC) $(AFLAGS) -c -o $@ $*.tmp.s - $(RM) -f $*.tmp.s + $(CC) $(AFLAGS) -c -o $@ xdraw2.s xdraw2_3dnow.o: xdraw2.s xdraw2.inc.s fxgasm.h - $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s - $(CC) $(AFLAGS) -c -o $@ $*.tmp.s - $(RM) -f $*.tmp.s + $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xdraw2.s xdraw3_def.o: xdraw3.s fxgasm.h - $(PREPROCESSOR) $< > $*.tmp.s - $(CC) $(AFLAGS) -c -o $@ $*.tmp.s - $(RM) -f $*.tmp.s + $(CC) $(AFLAGS) -c -o $@ xdraw3.s xdraw3_3dnow.o: xdraw3.s fxgasm.h - $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s - $(CC) $(AFLAGS) -c -o $@ $*.tmp.s - $(RM) -f $*.tmp.s + $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xdraw3.s xtexdl_3dnow.o: xtexdl.s fxgasm.h - $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s - $(CC) $(AFLAGS) -c -o $@ $*.tmp.s - $(RM) -f $*.tmp.s + $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xtexdl.s endif # GL_AMD3D