Commit 28569c25 authored by Brian Paul's avatar Brian Paul

use ASM_API variable, bug 4415

parent 68d43614
......@@ -26,7 +26,8 @@ ifeq ($(CPU), x86)
-DUSE_3DNOW_ASM \
-DUSE_SSE_ASM
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
CC = gcc
CXX = g++
......
......@@ -6,4 +6,5 @@ include $(TOP)/configs/freebsd-dri
CONFIG_NAME = freebsd-dri-x86-64
ASM_FLAGS = -DUSE_X86_64_ASM
ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API)
ASM_SOURCES = $(X86-64_SOURCES)
ASM_API = $(X86-64_API)
......@@ -10,3 +10,4 @@ PIC_FLAGS =
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
......@@ -17,7 +17,8 @@ HAVE_X86 = $(shell uname -m | grep 'i[3-6]86' >/dev/null && echo yes)
ifeq ($(HAVE_X86), yes)
CFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
CXXFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
endif
# Directories
......
......@@ -13,4 +13,5 @@ ARCH_FLAGS = -m32
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
......@@ -8,7 +8,8 @@ CONFIG_NAME = linux-dri-x86-64
ARCH_FLAGS = -m64
ASM_FLAGS = -DUSE_X86_64_ASM
ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API)
ASM_SOURCES = $(X86-64_SOURCES)
ASM_API = $(X86-64_API)
LIB_DIR = $(TOP)/lib64
......
......@@ -16,6 +16,7 @@ GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
......@@ -24,6 +24,7 @@ GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lX
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
MKLIB_OPTIONS = -arch icc
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
......@@ -10,3 +10,4 @@ PIC_FLAGS =
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
......@@ -5,4 +5,5 @@ include $(TOP)/configs/linux
CONFIG_NAME = linux-x86
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
......@@ -6,7 +6,8 @@ CONFIG_NAME = linux-x86-64
ARCH_FLAGS = -m64
ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API)
ASM_SOURCES = $(X86-64_SOURCES)
ASM_API = $(X86-64_API)
ASM_FLAGS = -DUSE_X86_64_ASM
LIB_DIR = $(TOP)/lib64
......
......@@ -15,7 +15,8 @@ CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199
GLUT_CFLAGS = -fexceptions
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread
......
......@@ -15,7 +15,8 @@ CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199
GLUT_CFLAGS = -fexceptions
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lXCB
......
......@@ -16,7 +16,8 @@ ARCH_FLAGS ?=
DEFINES = -D_REENTRANT -DUSE_XSHM
ASM_SOURCES = $(SPARC_SOURCES) $(SPARC_API)
ASM_SOURCES = $(SPARC_SOURCES)
ASM_API = $(SPARC_API)
ASM_FLAGS = -DUSE_SPARC_ASM
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
......
......@@ -3,10 +3,7 @@ include $(TOP)/configs/current
DEFINES += -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER
C_SOURCES = \
$(TOP)/src/mesa/glapi/glapi.c \
$(TOP)/src/mesa/glapi/glthread.c \
$(TOP)/src/mesa/main/dispatch.c \
SOURCES = \
glcontextmodes.c \
clientattrib.c \
compsize.c \
......@@ -33,15 +30,15 @@ C_SOURCES = \
glx_query.c \
glx_texture_compression.c \
dri_glx.c \
XF86dri.c \
XF86dri.c
X86_SOURCES = $(TOP)/src/mesa/x86/glapi_x86.S
X86-64_SOURCES = $(TOP)/src/mesa/x86-64/glapi_x86-64.S
include $(TOP)/src/mesa/sources
# ASM_SOURCES = $(X86_SOURCES)
MESA_ASM_API = $(addprefix $(TOP)/src/mesa/, $(ASM_API))
MESA_GLAPI_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_SOURCES))
MESA_GLAPI_OBJECTS = $(addprefix $(TOP)/src/mesa/, $(GLAPI_OBJECTS))
OBJECTS = $(C_SOURCES:.c=.o) \
$(ASM_SOURCES:.S=.o)
OBJECTS = $(SOURCES:.c=.o) $(MESA_GLAPI_OBJECTS)
INCLUDES = -I. \
-I$(TOP)/include \
......@@ -75,9 +72,10 @@ $(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
-install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
depend: $(C_SOURCES) $(ASM_SOURCES) Makefile
depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_ASM_API) Makefile
touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES)
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \
$(MESA_GLAPI_SOURCES) $(MESA_ASM_API)
# Emacs tags
......
......@@ -16,7 +16,6 @@ MAIN_SOURCES = \
main/convolve.c \
main/debug.c \
main/depth.c \
main/dispatch.c \
main/dlist.c \
main/drawpix.c \
main/enable.c \
......@@ -59,6 +58,7 @@ MAIN_SOURCES = \
main/vtxfmt.c
GLAPI_SOURCES = \
main/dispatch.c \
glapi/glapi.c \
glapi/glthread.c
......@@ -302,6 +302,10 @@ SOLO_SOURCES = \
# $(SLANG_C_SOURCES)
CORE_SOURCES = \
$(GLAPI_SOURCES) \
$(SOLO_SOURCES)
### Object files
......@@ -311,7 +315,7 @@ SOLO_OBJECTS = \
GLAPI_OBJECTS = \
$(GLAPI_SOURCES:.c=.o) \
$(ASM_API_SOURCES:.S=.o)
$(ASM_API:.S=.o)
CORE_OBJECTS = $(SOLO_OBJECTS) $(GLAPI_OBJECTS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment