Always pass -linker and -ldflags to mklib for shared libraries
[mesa.git] / src / egl / drivers / dri / Makefile
1 # src/egl/drivers/dri/Makefile
2
3 TOP = ../../../..
4 include $(TOP)/configs/current
5
6
7 ### Include directories
8 INCLUDE_DIRS = \
9 -I. \
10 -I/usr/include \
11 -I/usr/include/drm \
12 -I$(TOP)/include \
13 -I$(TOP)/include/GL/internal \
14 -I$(TOP)/src/mesa \
15 -I$(TOP)/src/mesa/main \
16 -I$(TOP)/src/mesa/glapi \
17 -I$(TOP)/src/mesa/math \
18 -I$(TOP)/src/mesa/transform \
19 -I$(TOP)/src/mesa/shader \
20 -I$(TOP)/src/mesa/swrast \
21 -I$(TOP)/src/mesa/swrast_setup \
22 -I$(TOP)/src/egl/main \
23 -I$(TOP)/src/mesa/drivers/dri/common
24
25
26 HEADERS = egldri.h
27
28 SOURCES = egldri.c
29
30 OBJECTS = $(SOURCES:.c=.o)
31
32
33 .c.o:
34 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
35
36
37
38 default: depend library Makefile
39
40
41 # EGLdri Library
42 library: $(TOP)/$(LIB_DIR)/libEGLdri.so
43
44 $(TOP)/$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
45 $(MKLIB) -o EGLdri -linker '$(CC)' -ldflags '$(LDFLAGS)' \
46 -major 1 -minor 0 \
47 -install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS)
48
49
50 clean:
51 -rm -f *.o
52 -rm -f *.so
53
54 depend: $(SOURCES) $(HEADERS)
55 @ echo "running $(MKDEP)"
56 @ touch depend
57 $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
58 $(SOURCES) $(HEADERS) > /dev/null
59
60 include depend
61 # DO NOT DELETE
62