Remove allegro driver
[mesa.git] / src / mesa / drivers / directfb / Makefile
1 # src/mesa/drivers/directfb/Makefile
2
3 TOP = ../../../..
4
5 include $(TOP)/configs/current
6
7
8 INCLUDE_DIRS = \
9 -I$(TOP)/include \
10 -I$(TOP)/src/mesa \
11 -I$(TOP)/src/mesa/main \
12 -I$(TOP)/src/mesa/glapi \
13 -I$(TOP)/src/mesa/math \
14 -I$(TOP)/src/mesa/tnl \
15 -I$(TOP)/src/mesa/shader \
16 -I$(TOP)/src/mesa/swrast \
17 -I$(TOP)/src/mesa/swrast_setup
18
19 DFB_CFLAGS = $(shell pkg-config --cflags directfb)
20 DFB_MODULEDIR = $(shell pkg-config --variable=moduledir directfb-internal)
21
22 DIRECTFBGL_MESA_SOURCES = ../common/driverfuncs.c idirectfbgl_mesa.c
23
24 DIRECTFBGL_MESA_OBJECTS = $(DIRECTFBGL_MESA_SOURCES:.c=.o)
25
26 DIRECTFBGL_MESA = libidirectfbgl_mesa.so
27
28 LIBS = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mesa/libglapi.a
29
30
31 .c.o:
32 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DFB_CFLAGS) $< -o $@
33
34
35 default: directfb-libgl directfbgl_mesa
36
37
38 # XXX this used to be in src/mesa/Makefile and is probably broken now
39 directfb-libgl: $(LIBS)
40 @ $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
41 -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
42 -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(LIBS) \
43 $(GL_LIB_DEPS)
44
45
46
47 # Mesa DirectFBGL module
48 directfbgl_mesa: $(DIRECTFBGL_MESA_OBJECTS)
49 $(CC) -shared $(CFLAGS) $(DIRECTFBGL_MESA_OBJECTS) -o $(DIRECTFBGL_MESA) \
50 -Wl,-soname -Wl,$(DIRECTFBGL_MESA) -L$(TOP)/$(LIB_DIR) -lGL -lm
51
52
53 install:
54 @if test -d $(DFB_MODULEDIR); then \
55 echo "Installing DirectFBGL module."; \
56 else \
57 echo "*** Failed to determine DirectFB module's directory."; \
58 echo "*** Installation aborted."; \
59 exit 1; \
60 fi;
61 test -d $(DFB_MODULEDIR)/interfaces/IDirectFBGL/ || mkdir $(DFB_MODULEDIR)/interfaces/IDirectFBGL/
62 install -m 755 $(DIRECTFBGL_MESA) $(DFB_MODULEDIR)/interfaces/IDirectFBGL/
63
64
65 clean:
66 -rm -f *.o *.so
67