summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/egl_xlib/Makefile
blob: a33a50ec22bbefce8c9601012f16af190e89b649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# src/gallium/winsys/egl_xlib/Makefile

# Build softpipe/xlib/EGL driver library/object: "egl_softpipe.so"


TOP = ../../../..
include $(TOP)/configs/current


DRIVER_NAME = egl_softpipe.so


INCLUDE_DIRS = \
	-I$(TOP)/include \
	-I$(TOP)/src/egl/main \
	-I$(TOP)/src/mesa \
	-I$(TOP)/src/mesa/main \
	-I$(TOP)/src/gallium/include \
	-I$(TOP)/src/gallium/drivers \
	-I$(TOP)/src/gallium/auxiliary

WINSYS_SOURCES = \
	egl_xlib.c \
	sw_winsys.c

WINSYS_OBJECTS = $(WINSYS_SOURCES:.c=.o)


LIBS = \
	$(GALLIUM_DRIVERS) \
	$(GALLIUM_AUXILIARIES)

# XXX temporary (should create a separate lib with the GL API funcs and
# mesa code, as done for ES 1.x, 2.x, OpenVG, etc)
UNUSED_LIBS = \
	$(TOP)/src/mesa/libglapi.a \
	$(TOP)/src/mesa/libmesagallium.a \


LOCAL_CFLAGS = -D_EGL_PLATFORM_X=1


.c.o:
	$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@


.PHONY: library


default: depend library Makefile


library: $(TOP)/$(LIB_DIR)/$(DRIVER_NAME)


# Make the egl_softpipe.so library
$(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(WINSYS_OBJECTS) $(LIBS)
	$(TOP)/bin/mklib -o $(DRIVER_NAME) \
		-linker "$(CC)" \
		-noprefix \
		-install $(TOP)/$(LIB_DIR) \
		$(MKLIB_OPTIONS) $(WINSYS_OBJECTS) \
		-Wl,--whole-archive $(LIBS) -Wl,--no-whole-archive


depend: $(ALL_SOURCES)
	@ echo "running $(MKDEP)"
	@ rm -f depend  # workaround oops on gutsy?!?
	@ touch depend
	@ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
		> /dev/null 2>/dev/null


install: default
	$(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
	@if [ -e $(TOP)/$(LIB_DIR) ]; then \
		$(MINSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(INSTALL_DIR)/$(LIB_DIR); \
	fi


# Emacs tags
tags:
	etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h

clean:
	-rm -f *.o *~ *.bak


include depend