Merge branch 'gallium-tex-surfaces' into gallium-0.1
[mesa.git] / src / gallium / winsys / egl_xlib / Makefile
1 # src/gallium/winsys/egl_xlib/Makefile
2
3 # Build softpipe/xlib/EGL driver library/object: "softpipe_egl.so"
4
5
6 TOP = ../../../..
7 include $(TOP)/configs/current
8
9
10 LIBNAME = softpipe_egl.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 $(TOP)/src/mesa/libglapi.a \
32 $(TOP)/src/mesa/libmesa.a \
33 $(GALLIUM_AUXILIARIES)
34
35
36 LOCAL_CFLAGS = -D_EGL_PLATFORM_X=1
37
38
39 .SUFFIXES : .cpp
40
41 .c.o:
42 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@
43
44 .cpp.o:
45 $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $(LOCAL_CFLAGS) $< -o $@
46
47
48
49 default: $(TOP)/$(LIB_DIR)/$(LIBNAME)
50
51
52 # Make the softpipe_egl.so library
53 $(TOP)/$(LIB_DIR)/$(LIBNAME): $(WINSYS_OBJECTS) $(LIBS)
54 $(TOP)/bin/mklib -o $(LIBNAME) \
55 -linker "$(CC)" \
56 -noprefix \
57 -install $(TOP)/$(LIB_DIR) \
58 $(MKLIB_OPTIONS) $(WINSYS_OBJECTS) \
59 --start-group $(LIBS) --end-group
60
61 # $(GL_LIB_DEPS)
62
63
64 depend: $(ALL_SOURCES)
65 @ echo "running $(MKDEP)"
66 @ rm -f depend # workaround oops on gutsy?!?
67 @ touch depend
68 @ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
69 > /dev/null 2>/dev/null
70
71
72 install: default
73 $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
74 @if [ -e $(TOP)/$(LIB_DIR) ]; then \
75 $(INSTALL) $(TOP)/$(LIB_DIR)/$(LIBNAME) $(INSTALL_DIR)/$(LIB_DIR); \
76 fi
77
78
79 # Emacs tags
80 tags:
81 etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
82
83 clean:
84 -rm -f *.o *~ *.bak
85
86
87 include depend