rbug: Add to all targets that link against trace
[mesa.git] / src / gallium / targets / xorg-i965 / Makefile
1 TOP = ../../../..
2 include $(TOP)/configs/current
3
4 TARGET = i965g_drv.so
5 CFILES = $(wildcard ./*.c)
6 OBJECTS = $(patsubst ./%.c,./%.o,$(CFILES))
7
8 CFLAGS = -DHAVE_CONFIG_H \
9 -g -Wall -Wimplicit-function-declaration -fPIC \
10 $(shell pkg-config --cflags pixman-1 xorg-server libdrm xproto) \
11 -I$(TOP)/src/gallium/include \
12 -I$(TOP)/src/gallium/drivers \
13 -I$(TOP)/src/gallium/auxiliary \
14 -I$(TOP)/src/mesa \
15 -I$(TOP)/include \
16 -I$(TOP)/src/egl/main
17
18 LIBS = \
19 $(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a \
20 $(TOP)/src/gallium/winsys/i965/drm/libi965drm.a \
21 $(TOP)/src/gallium/drivers/i965/libi965.a \
22 $(TOP)/src/gallium/drivers/trace/libtrace.a \
23 $(TOP)/src/gallium/drivers/rbug/librbug.a \
24 $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
25 $(GALLIUM_AUXILIARIES)
26
27 TARGET_STAGING = $(TOP)/$(LIB_DIR)/gallium/$(TARGET)
28 #############################################
29
30 all default: $(TARGET) $(TARGET_STAGING)
31
32 $(TARGET): $(OBJECTS) Makefile $(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a $(LIBS)
33 $(TOP)/bin/mklib -noprefix -o $@ \
34 $(OBJECTS) $(LIBS) $(shell pkg-config --libs libdrm) -ldrm_intel
35
36 $(TOP)/$(LIB_DIR)/gallium:
37 mkdir -p $@
38
39 $(TARGET_STAGING): $(TARGET) $(TOP)/$(LIB_DIR)/gallium
40 $(INSTALL) $(TARGET) $(TOP)/$(LIB_DIR)/gallium
41
42 clean:
43 rm -rf $(OBJECTS) $(TARGET)
44
45 install:
46 $(INSTALL) -d $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
47 $(MINSTALL) -m 755 $(TARGET) $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
48
49 .PHONY = all clean install