gallium-intel: Improve Xorg Makefile a bit
[mesa.git] / src / gallium / winsys / drm / intel / xorg / Makefile
1 TARGET = modesetting_drv.so
2 CFILES = $(wildcard ./*.c)
3 OBJECTS = $(patsubst ./%.c,./%.o,$(CFILES))
4 TOP = ../../../../../..
5
6 include $(TOP)/configs/current
7
8 INCLUDES = \
9 $(shell pkg-config --cflags-only-I pixman-1 xorg-server libdrm xproto) \
10 -I../gem \
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/drm/intel/gem/libinteldrm.a \
21 $(TOP)/src/gallium/drivers/i915simple/libi915simple.a \
22 $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
23 $(GALLIUM_AUXILIARIES)
24
25 DRIVER_DEFINES = \
26 -DHAVE_CONFIG_H
27
28
29 #############################################
30
31
32
33 all default: $(TARGET)
34
35 $(TARGET): $(OBJECTS) Makefile $(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a $(LIBS)
36 $(TOP)/bin/mklib -noprefix -o $@ \
37 $(OBJECTS) $(LIBS) $(shell pkg-config --libs libdrm) -ldrm_intel
38
39 clean:
40 rm -rf $(OBJECTS) $(TARGET)
41
42 install:
43 $(INSTALL) -d $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
44 $(MINSTALL) -m 755 $(TARGET) $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
45
46
47 ##############################################
48
49
50 .c.o:
51 $(CC) -c $(CFLAGS) $(INCLUDES) $(DRIVER_DEFINES) $< -o $@
52
53
54 ##############################################
55
56 .PHONY = all clean install