Merge commit 'origin/gallium-master-merge'
[mesa.git] / src / gallium / winsys / egl_xlib / Makefile
1 # src/gallium/winsys/egl_xlib/Makefile
2
3 # Build softpipe/xlib/EGL driver library/object: "egl_softpipe.so"
4
5
6 TOP = ../../../..
7 include $(TOP)/configs/current
8
9
10 DRIVER_NAME = egl_softpipe.so
11
12
13 INCLUDE_DIRS = \
14 -I$(TOP)/include \
15 -I$(TOP)/src/egl/main \
16 -I$(TOP)/src/mesa \
17 -I$(TOP)/src/mesa/main \
18 -I$(TOP)/src/gallium/include \
19 -I$(TOP)/src/gallium/drivers \
20 -I$(TOP)/src/gallium/auxiliary
21
22 WINSYS_SOURCES = \
23 egl_xlib.c \
24 sw_winsys.c
25
26 WINSYS_OBJECTS = $(WINSYS_SOURCES:.c=.o)
27
28
29 LIBS = \
30 $(GALLIUM_DRIVERS) \
31 $(GALLIUM_AUXILIARIES)
32
33 # XXX temporary (should create a separate lib with the GL API funcs and
34 # mesa code, as done for ES 1.x, 2.x, OpenVG, etc)
35 UNUSED_LIBS = \
36 $(TOP)/src/mesa/libglapi.a \
37 $(TOP)/src/mesa/libmesagallium.a \
38
39
40 LOCAL_CFLAGS = -D_EGL_PLATFORM_X=1
41
42
43 .c.o:
44 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@
45
46
47 .PHONY: library
48
49
50 default: depend library Makefile
51
52
53 library: $(TOP)/$(LIB_DIR)/$(DRIVER_NAME)
54
55
56 # Make the egl_softpipe.so library
57 $(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(WINSYS_OBJECTS) $(LIBS)
58 $(TOP)/bin/mklib -o $(DRIVER_NAME) \
59 -linker "$(CC)" \
60 -noprefix \
61 -install $(TOP)/$(LIB_DIR) \
62 $(MKLIB_OPTIONS) $(WINSYS_OBJECTS) \
63 --whole-archive $(LIBS) --no-whole-archive
64
65
66 depend: $(ALL_SOURCES)
67 @ echo "running $(MKDEP)"
68 @ rm -f depend # workaround oops on gutsy?!?
69 @ touch depend
70 @ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
71 > /dev/null 2>/dev/null
72
73
74 install: default
75 $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
76 @if [ -e $(TOP)/$(LIB_DIR) ]; then \
77 $(INSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(INSTALL_DIR)/$(LIB_DIR); \
78 fi
79
80
81 # Emacs tags
82 tags:
83 etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
84
85 clean:
86 -rm -f *.o *~ *.bak
87
88
89 include depend