1# src/gallium/targets/gbm/Makefile
2
3TOP = ../../../..
4include $(TOP)/configs/current
5
6GBM_BACKEND = gbm_gallium_drm
7GBM_SOURCES = gbm.c
8
9GBM_INCLUDES = \
10	       -I$(TOP)/include \
11	       -I$(TOP)/src/gallium/state_trackers/gbm \
12	       -I$(TOP)/src/gbm/main \
13	       -I$(TOP)/src/gallium/auxiliary \
14	       -I$(TOP)/src/gallium/winsys \
15	       -I$(TOP)/src/gallium/include
16
17GBM_LIBS = $(LIBUDEV_LIBS) $(LIBDRM_LIBS) -lm \
18	   $(TOP)/src/gallium/state_trackers/gbm/libgbm.a \
19	   $(GALLIUM_PIPE_LOADER_LIBS) $(GALLIUM_AUXILIARIES)
20
21GBM_CFLAGS = \
22	     -DPIPE_SEARCH_DIR=\"$(PIPE_INSTALL_DIR)\" \
23             $(GALLIUM_PIPE_LOADER_DEFINES) \
24	     $(LIBUDEV_CFLAGS) \
25	     $(LIBDRM_CFLAGS)
26
27GBM_EXTRA_TARGETS = pipes
28GBM_EXTRA_INSTALL = install-pipes
29GBM_EXTRA_CLEAN = clean-pipes
30
31include $(TOP)/src/gbm/backends/Makefile.template
32
33PIPE_SRC_DIR = $(TOP)/src/gallium/targets/pipe-loader
34PIPE_INSTALL_DIR = $(INSTALL_LIB_DIR)/gbm
35
36pipes:
37	@$(MAKE) -C $(PIPE_SRC_DIR)
38install-pipes:
39	@$(MAKE) -C $(PIPE_SRC_DIR) PIPE_INSTALL_DIR=$(PIPE_INSTALL_DIR) install
40clean-pipes:
41	@$(MAKE) -C $(PIPE_SRC_DIR) clean
42