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