genode/libports/lib/mk/gallium-aux.mk
2011-12-22 16:19:25 +01:00

53 lines
1.8 KiB
Makefile

include $(REP_DIR)/lib/mk/gallium.inc
GALLIUM_AUX_SRC_DIR = $(GALLIUM_SRC_DIR)/auxiliary
SUBDIRS = cso_cache draw indices os pipebuffer rbug rtasm tgsi translate util vl
# collect all source codes in 'SUBDIRS'
SRC_C := $(foreach subdir,$(SUBDIRS),$(wildcard $(GALLIUM_AUX_SRC_DIR)/$(subdir)/*.c))
# strip leading directories - keep only the file names
SRC_C := $(notdir $(SRC_C))
# add sources normally generated in 'indices' subdirectory
SRC_C += u_indices_gen.c u_unfilled_gen.c
# add sources normally generated in 'util' subdirectory
SRC_C += u_format_access.c u_format_table.c
# remove non-needed files from list
SRC_C := $(filter-out u_indices.c u_unfilled_indices.c u_debug_memory.c,$(SRC_C))
# definition of 'log2' that is missing in FreeBSD's libc
CC_OPT_u_math = -D'log2(x)=(log(x)/log(2))'
# dim build noise
CC_OPT_draw_vertex += -Wno-unused-but-set-variable
CC_OPT_draw_vs_varient += -Wno-enum-compare
CC_OPT_rbug_context += -Wno-unused-but-set-variable
CC_OPT_rbug_core += -Wno-unused-but-set-variable
CC_OPT_rbug_texture += -Wno-unused-but-set-variable
CC_OPT_tgsi_build += -Wno-uninitialized
CC_OPT_tgsi_build += -Wno-unused-but-set-variable
CC_OPT_u_cpu_detect += -Wno-pointer-sign
CC_OPT_u_debug_stack += -Wno-unused-but-set-variable
CC_OPT_u_format_access += -Wno-unused
CC_OPT_vl_mpeg12_mc_renderer += -Wno-enum-compare
u_%_gen.c: $(GALLIUM_SRC_DIR)/indices/u_%_gen.py
$(MSG_CONVERT)$@
@python $< > $@
#
# To generate 'u_format_pack.h' as well, so we explicitly state that
# 'u_format_access.c' depends on it.
#
u_format_access.c: u_format_pack.h
u_format_%.c u_format_%.h: $(GALLIUM_AUX_SRC_DIR)/util/u_format_%.py
$(MSG_CONVERT)$@
@python $< $(GALLIUM_AUX_SRC_DIR)/util/u_format.csv > $@
vpath %.c $(addprefix $(GALLIUM_AUX_SRC_DIR)/,$(SUBDIRS))