diff options
Diffstat (limited to 'mesalib/src/gallium')
-rw-r--r-- | mesalib/src/gallium/.gitignore | 1 | ||||
-rw-r--r-- | mesalib/src/gallium/Automake.inc | 5 | ||||
-rw-r--r-- | mesalib/src/gallium/Makefile.template | 73 | ||||
-rw-r--r-- | mesalib/src/gallium/auxiliary/Makefile | 47 | ||||
-rw-r--r-- | mesalib/src/gallium/auxiliary/Makefile.am | 51 | ||||
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_pack_color.h | 2 |
6 files changed, 58 insertions, 121 deletions
diff --git a/mesalib/src/gallium/.gitignore b/mesalib/src/gallium/.gitignore deleted file mode 100644 index 5fc607b9e..000000000 --- a/mesalib/src/gallium/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Makefile diff --git a/mesalib/src/gallium/Automake.inc b/mesalib/src/gallium/Automake.inc new file mode 100644 index 000000000..fabc2af9a --- /dev/null +++ b/mesalib/src/gallium/Automake.inc @@ -0,0 +1,5 @@ +GALLIUM_CFLAGS = \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/src/gallium/include \ + -I$(top_srcdir)/src/gallium/auxiliary \ + $(DEFINES) diff --git a/mesalib/src/gallium/Makefile.template b/mesalib/src/gallium/Makefile.template deleted file mode 100644 index 036c11986..000000000 --- a/mesalib/src/gallium/Makefile.template +++ /dev/null @@ -1,73 +0,0 @@ -# src/gallium/Makefile.template - -# Template makefile for gallium libraries. -# -# Usage: -# The minimum that the including makefile needs to define -# is TOP, LIBNAME and one of of the *_SOURCES. -# -# Optional defines: -# LIBRARY_INCLUDES are appended to the list of includes directories. -# LIBRARY_DEFINES is not used for makedepend, but for compilation. - -### Basic defines ### - -OBJECTS = $(C_SOURCES:.c=.o) \ - $(CPP_SOURCES:.cpp=.o) \ - $(ASM_SOURCES:.S=.o) - -INCLUDES = \ - -I. \ - -I$(TOP)/src/gallium/include \ - -I$(TOP)/src/gallium/auxiliary \ - -I$(TOP)/src/gallium/drivers \ - $(LIBRARY_INCLUDES) - -ifeq ($(MESA_LLVM),1) -LIBRARY_DEFINES += $(LLVM_CFLAGS) -endif - - -##### TARGETS ##### - -default: depend lib$(LIBNAME).a $(PROGS) - -lib$(LIBNAME).a: $(OBJECTS) $(EXTRA_OBJECTS) Makefile $(TOP)/src/gallium/Makefile.template - $(MKLIB) -o $(LIBNAME) -static $(OBJECTS) $(EXTRA_OBJECTS) - -depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES) - rm -f depend - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(GENERATED_SOURCES) 2> /dev/null - -$(PROGS): % : %.o $(PROGS_DEPS) - $(LD) $(LDFLAGS) $(filter %.o,$^) -o $@ -Wl,--start-group $(LIBS) -Wl,--end-group - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find $(TOP)/src/gallium/include -name \*.h` - -# Remove .o and backup files -clean: - rm -f $(OBJECTS) $(GENERATED_SOURCES) $(PROGS) lib$(LIBNAME).a depend depend.bak $(CLEAN_EXTRA) - -# Dummy target -install: - @echo -n "" - -##### RULES ##### - -%.s: %.c - $(CC) -S $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@ - -%.o: %.c - $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@ - -%.o: %.cpp - $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(LIBRARY_DEFINES) $< -o $@ - -%.o: %.S - $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@ - - -sinclude depend diff --git a/mesalib/src/gallium/auxiliary/Makefile b/mesalib/src/gallium/auxiliary/Makefile deleted file mode 100644 index 72208f1a7..000000000 --- a/mesalib/src/gallium/auxiliary/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -TOP = ../../.. -include $(TOP)/configs/current - -LIBNAME = gallium - -# get source lists -include Makefile.sources - -C_SOURCES += $(GENERATED_SOURCES) - -ifeq ($(MESA_LLVM),1) -C_SOURCES += \ - $(GALLIVM_SOURCES) -CPP_SOURCES += \ - $(GALLIVM_CPP_SOURCES) - -# LLVM >= 3.2 requires -fno-rtti -ifeq ($(shell expr `echo $(LLVM_VERSION) | sed -e 's/\([0-9]\)\.\([0-9]\)/\10\2/g'` \>= 302),1) -CXXFLAGS += -fno-rtti -endif -endif - - -include ../Makefile.template - -default install clean: %: subdirs-% - -subdirs-%: - @for dir in $(SUBDIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE) $*) || exit 1; \ - fi \ - done - -indices/u_indices_gen.c: indices/u_indices_gen.py - $(PYTHON2) $< > $@ - -indices/u_unfilled_gen.c: indices/u_unfilled_gen.py - $(PYTHON2) $< > $@ - -util/u_format_srgb.c: util/u_format_srgb.py - $(PYTHON2) $< > $@ - -util/u_format_table.c: util/u_format_table.py util/u_format_pack.py util/u_format_parse.py util/u_format.csv - $(PYTHON2) util/u_format_table.py util/u_format.csv > $@ - -# DO NOT DELETE diff --git a/mesalib/src/gallium/auxiliary/Makefile.am b/mesalib/src/gallium/auxiliary/Makefile.am new file mode 100644 index 000000000..b8ac7c9dd --- /dev/null +++ b/mesalib/src/gallium/auxiliary/Makefile.am @@ -0,0 +1,51 @@ +AUTOMAKE_OPTIONS = subdir-objects + +include Makefile.sources +include $(top_srcdir)/src/gallium/Automake.inc + +noinst_LTLIBRARIES = libgallium.la + +AM_CFLAGS = \ + -I$(top_srcdir)/src/gallium/auxiliary/util \ + $(GALLIUM_CFLAGS) + +libgallium_la_SOURCES = \ + $(C_SOURCES) \ + $(GENERATED_SOURCES) + +if HAVE_MESA_LLVM + +AM_CFLAGS += \ + $(LLVM_CFLAGS) + +AM_CXXFLAGS = \ + $(GALLIUM_CFLAGS) \ + $(LLVM_CXXFLAGS) + +if LLVM_NEEDS_FNORTTI + +AM_CXXFLAGS += -fno-rtti + +endif + +libgallium_la_SOURCES += \ + $(GALLIVM_SOURCES) \ + $(GALLIVM_CPP_SOURCES) + +endif + +indices/u_indices_gen.c: $(srcdir)/indices/u_indices_gen.py + $(AM_V_GEN) $(PYTHON2) $< > $@ + +indices/u_unfilled_gen.c: $(srcdir)/indices/u_unfilled_gen.py + $(AM_V_GEN) $(PYTHON2) $< > $@ + +util/u_format_srgb.c: $(srcdir)/util/u_format_srgb.py + $(AM_V_GEN) $(PYTHON2) $< > $@ + +util/u_format_table.c: $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format_pack.py $(srcdir)/util/u_format_parse.py $(srcdir)/util/u_format.csv + $(AM_V_GEN) $(PYTHON2) $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format.csv > $@ + +#XXX: Delete this when all targets are converted to automake. +all-local: libgallium.la + ln -f $(builddir)/.libs/libgallium.a $(builddir)/libgallium.a diff --git a/mesalib/src/gallium/auxiliary/util/u_pack_color.h b/mesalib/src/gallium/auxiliary/util/u_pack_color.h index 50ec226d8..6c6d9669c 100644 --- a/mesalib/src/gallium/auxiliary/util/u_pack_color.h +++ b/mesalib/src/gallium/auxiliary/util/u_pack_color.h @@ -329,6 +329,8 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc, /** * Note rgba outside [0,1] will be clamped for int pixel formats. + * This will not work (and might not really be useful with float input) + * for pure integer formats (which lack the pack_rgba_float function). */ static INLINE void util_pack_color(const float rgba[4], enum pipe_format format, union util_color *uc) |