freedreno/ir3: use env_var_as_unsigned()
[mesa.git] / src / gallium / drivers / freedreno / Makefile.am
index b6dbbd191833013f6ba92fbd09e0512a3ab69208..39887e13e379ca3e5b8d3079490d7a684208edad 100644 (file)
@@ -1,31 +1,50 @@
+include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
-noinst_LTLIBRARIES = libfreedreno.la
-
 AM_CFLAGS = \
        -Wno-packed-bitfield-compat \
-       -I$(top_srcdir)/src/gallium/drivers \
-       -I$(top_srcdir)/src/gallium/drivers/freedreno/a3xx \
-       -I$(top_srcdir)/src/gallium/drivers/freedreno/a2xx \
-       $(GALLIUM_CFLAGS) \
-       $(FREEDRENO_CFLAGS) \
-       $(VISIBILITY_CFLAGS)
+       -I$(top_srcdir)/src/gallium/drivers/freedreno/ir3 \
+       -I$(top_srcdir)/src/freedreno \
+       -I$(top_builddir)/src/compiler/nir \
+       -I$(top_srcdir)/src/compiler/nir \
+       $(GALLIUM_DRIVER_CFLAGS)
 
-SUBDIRS = a2xx a3xx
+MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
+ir3/ir3_nir_trig.c: ir3/ir3_nir_trig.py $(top_srcdir)/src/compiler/nir/nir_algebraic.py
+       $(MKDIR_GEN)
+       $(AM_V_GEN) $(PYTHON) $(PYTHON_FLAGS) $(srcdir)/ir3/ir3_nir_trig.py -p $(top_srcdir)/src/compiler/nir > $@ || ($(RM) $@; false)
+
+noinst_LTLIBRARIES = libfreedreno.la
 
 libfreedreno_la_SOURCES = \
-       freedreno_util.c \
-       freedreno_fence.c \
-       freedreno_resource.c \
-       freedreno_surface.c \
-       freedreno_draw.c \
-       freedreno_state.c \
-       freedreno_texture.c \
-       freedreno_context.c \
-       freedreno_screen.c \
-       freedreno_gmem.c
-
-libfreedreno_la_LIBADD = \
-       a3xx/libfd3xx.la \
-       a2xx/libfd2xx.la
+       $(C_SOURCES) \
+       $(a2xx_SOURCES) \
+       $(a3xx_SOURCES) \
+       $(a4xx_SOURCES) \
+       $(a5xx_SOURCES) \
+       $(a6xx_SOURCES) \
+       $(ir3_SOURCES) \
+       $(ir3_GENERATED_FILES)
+
+BUILT_SOURCES := $(ir3_GENERATED_FILES)
+CLEANFILES := $(BUILT_SOURCES)
+EXTRA_DIST = ir3/ir3_nir_trig.py
+
+noinst_PROGRAMS = ir3_compiler
+
+# XXX: Required due to the C++ sources in libnir
+nodist_EXTRA_ir3_compiler_SOURCES = dummy.cpp
+ir3_compiler_SOURCES = \
+       ir3/ir3_cmdline.c
+
+ir3_compiler_LDADD = \
+       libfreedreno.la \
+       $(top_builddir)/src/gallium/auxiliary/libgallium.la \
+       $(top_builddir)/src/compiler/nir/libnir.la \
+       $(top_builddir)/src/compiler/glsl/libstandalone.la \
+       $(top_builddir)/src/util/libmesautil.la \
+       $(top_builddir)/src/mesa/libmesagallium.la \
+       $(top_builddir)/src/freedreno/libfreedreno_drm.la \
+       $(GALLIUM_COMMON_LIB_DEPS)
 
+EXTRA_DIST += meson.build