# Misc tools and flags
MKLIB_OPTIONS =
MKDEP = makedepend
-MKDEP_OPTIONS = -Y -fdepend
+MKDEP_OPTIONS = -fdepend
MAKE = make
# Library names (base name)
WARN_FLAGS = -Wall
OPT_FLAGS = -O
-CFLAGS = -DDRI_NEW_INTERFACE_ONLY -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math -I/usr/local/include -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
+X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
+CFLAGS = -DDRI_NEW_INTERFACE_ONLY -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math -I/usr/local/include $(X11_INCLUDES)
CXXFLAGS = -DDRI_NEW_INTERFACE_ONLY -Wall -g -ansi -pedantic -fPIC
ASM_SOURCES =
CXX = g++
WARN_FLAGS = -Wall
-OPT_FLAGS = -O
-SOURCE_FLAGS = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
- -D_BSD_SOURCE -D_GNU_SOURCE
+OPT_FLAGS = -O -g
PIC_FLAGS = -fPIC
-CFLAGS = -DDRI_NEW_INTERFACE_ONLY $(WARN_FLAGS) -g $(OPT_FLAGS) $(ASM_FLAGS) \
- -std=c99 $(PIC_FLAGS) -ffast-math $(SOURCE_FLAGS) -DPTHREADS \
- -DUSE_EXTERNAL_DXTN_LIB=1 \
- -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
-CXXFLAGS = -DDRI_NEW_INTERFACE_ONLY $(WARN_FLAGS) -g $(OPT_FLAGS) -fPIC \
- $(SOURCE_FLAGS)
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
+ -D_BSD_SOURCE -D_GNU_SOURCE \
+ -DDRI_NEW_INTERFACE_ONLY -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1
+
+X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
+
+CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(ASM_FLAGS) -std=c99 $(PIC_FLAGS) -ffast-math \
+ $(DEFINES)
+
+CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) \
+ $(DEFINES)
+
ASM_SOURCES =
CC = gcc
CXX = g++
-CFLAGS = -DDRI_NEW_INTERFACE_ONLY -m64 -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -D_GNU_SOURCE -D__AMD64__ -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
+DEFINES = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -D_GNU_SOURCE -D__AMD64__
-CXXFLAGS = -DDRI_NEW_INTERFACE_ONLY -m64 -Wall -g -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D__AMD64__
+CFLAGS = -m64 -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math $(DEFINES)
+CXXFLAGS = -m64 -Wall -g -ansi -pedantic -fPIC $(DEFINES)
+
+X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
#ASM_SOURCES = $(X86_SOURCES)
depend: $(SOURCES)
touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null 2>&1
+ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null
# Emacs tags
depend: $(SOURCES)
touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null 2>&1
+ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null
include depend
@ echo "running $(MKDEP)"
@ touch depend
@ $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(SOURCES) \
- > /dev/null 2>&1
+ > /dev/null
include depend
# what's included by any source file.
depend: $(SOURCES)
touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null 2>&1
+ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null
# Emacs tags
tags:
depend: $(GLW_SOURCES)
touch depend
$(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(GLW_SOURCES) \
- > /dev/null 2>&1
+ > /dev/null
include depend
depend: $(C_SOURCES) $(ASM_SOURCES)
touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \
- > /dev/null 2>&1
+ > /dev/null
# Emacs tags
OBJECTS = $(C_SOURCES:.c=.o) \
$(ASM_SOURCES:.S=.o)
-INCLUDES = -I. $(INCLUDE_DIRS)
-
-INCLUDE_DIRS = \
+INCLUDES = -I. \
-I$(TOP)/include \
-I$(TOP)/include/GL/internal \
-I$(TOP)/src/mesa \
-I$(TOP)/src/mesa/swrast_setup \
-I$(TOP)/src/mesa/drivers/dri/common \
-I$(DRM_SOURCE_PATH)/libdrm \
- -I$(DRM_SOURCE_PATH)/shared
+ -I$(DRM_SOURCE_PATH)/shared \
+ $(X11_INCLUDES)
##### RULES #####
depend: $(C_SOURCES) $(ASM_SOURCES)
touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \
- > /dev/null 2>&1
+ > /dev/null
# Emacs tags
depend: $(ALL_SOURCES)
@ echo "running $(MKDEP)"
@ touch depend
- @ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(ALL_SOURCES) \
- > /dev/null 2>&1
+ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
+ > /dev/null
# Emacs tags
# GLU_DIR = $(TOP)/src/glu/mesa
ifeq ($(GLU_DIR),)
- # By default, we build the SGI GLU implementation
+# By default, we build the SGI GLU implementation
GLU_DIR = $(TOP)/src/glu/sgi
endif
ifeq ($(CPU), x86)
DRIVER_SOURCES += $(addprefix ../../, $(X86_API))
else
- # No GL API PPC optimization yet
+# No GL API PPC optimization yet
endif
-
+
DRIVER_OBJECTS = $(DRIVER_SOURCES:.c=.o)
DRIVER_OBJECTS := $(DRIVER_OBJECTS:.S=.o)
$(MESA_MODULES):
cd $(TOP)/src/mesa; $(MAKE) mesa.a ;
-
+
$(GLU_MODULES):
cd $(GLU_DIR); $(MAKE) $(subst $(GLU_DIR)/,,$(GLU_MODULES)) ;
-
+
$(LIB_DIR):
mkdir $(LIB_DIR)
depend: $(DRIVER_SOURCES) $(GLU_SOURCES)
touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(DRIVER_SOURCES) $(GLU_SOURCES) > /dev/null 2>&1
+ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(DRIVER_SOURCES) $(GLU_SOURCES) > /dev/null
clean:
rm -f depend $(OBJECTS)
-
+
include depend
# what's included by any source file.
depend: $(C_SOURCES) $(ASM_SOURCES)
touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \
- > /dev/null 2>&1
+ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \
+ > /dev/null
# Emacs tags
# what's included by any source file.
depend: $(C_SOURCES) $(ASM_SOURCES)
touch depend
- $(MKDEP) $(MKDEP_OPTIONS) -Y $(INCLUDES) \
- $(C_SOURCES) $(ASM_SOURCES) > /dev/null 2>&1
+ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) \
+ $(C_SOURCES) $(ASM_SOURCES)
dri.a: $(OBJECTS)
X86_SOURCES = r200_vtxtmp_x86.S
SYMLINKS = \
- server/radeon_dri.c \
- server/radeon_dri.h \
- server/radeon.h \
- server/radeon_macros.h \
- server/radeon_reg.h
+ server/radeon_dri.c
+
##### TARGETS #####
include ../Makefile.template
+INCLUDES += -I../radeon/server
+
$(SYMLINKS):
mkdir -p server
for i in $(SYMLINKS) ; do rm -f $$i && test -f ../radeon/$$i && ln -s ../../radeon/$$i $$i ; done
depend: $(C_SOURCES) $(ASM_SOURCES)
touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
- > /dev/null 2>&1
+ > /dev/null
# Emacs tags