File: z02-64bit-port

package info (click to toggle)
glide 2002.04.10ds1-16
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 59,540 kB
  • sloc: ansic: 290,125; asm: 23,305; sh: 8,089; pascal: 3,854; makefile: 1,276; perl: 73
file content (168 lines) | stat: -rw-r--r-- 5,946 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
Status: not-applied

Index: b/glide3x/h3/glide3/src/makefile.autoconf.am
===================================================================
--- a/glide3x/h3/glide3/src/makefile.autoconf.am
+++ b/glide3x/h3/glide3/src/makefile.autoconf.am
@@ -101,7 +101,7 @@ endif
 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 @@ xtexdl_3dnow.lo: xtexdl.S fxgasm.h 
 
 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 @@ libglide3_la_SOURCES   = fxinline.h fxga
                          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
Index: b/glide3x/h5/glide3/src/makefile.autoconf.am
===================================================================
--- a/glide3x/h5/glide3/src/makefile.autoconf.am
+++ b/glide3x/h5/glide3/src/makefile.autoconf.am
@@ -178,10 +178,16 @@ xtexdl_3dnow.o xtexdl_3dnow.lo: xtexdl.s
 	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 @@ if FX_GLIDE_CTRISETUP
 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 @@ libglide3_la_SOURCES   = fxinline.h fxga
                          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)
 
Index: b/glide3x/h5/glide3/src/makefile.linux
===================================================================
--- a/glide3x/h5/glide3/src/makefile.linux
+++ b/glide3x/h5/glide3/src/makefile.linux
@@ -45,6 +45,13 @@ endif
 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 @@ LADEFS          +=      $(ASM_REGMAP_DEF
 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 @@ INSTALL_DESTINATION =   $(BUILD_ROOT)/$(
 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 @@ endif
 
 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