Merge commit 'origin/master' into gallium-0.2
[mesa.git] / src / mesa / drivers / dri / glcore / Makefile
1 # src/mesa/drivers/dri/glcore/Makefile
2
3 TOP = ../../../../..
4 include $(TOP)/configs/current
5
6 LIBNAME = glcore_dri.so
7
8 DRIVER_SOURCES = glcore_driver.c \
9 $(TOP)/src/mesa/drivers/common/driverfuncs.c \
10 ../common/dri_util.c
11
12 C_SOURCES = \
13 $(DRIVER_SOURCES) \
14 $(DRI_SOURCES)
15
16
17 # Include directories
18 INCLUDE_DIRS = \
19 -I. \
20 -I../common \
21 -I../dri_client \
22 -I../dri_client/imports \
23 -Iserver \
24 -I$(TOP)/include \
25 -I$(DRM_SOURCE_PATH)/shared-core \
26 -I$(TOP)/src/mesa \
27 -I$(TOP)/src/mesa/main \
28 -I$(TOP)/src/mesa/glapi \
29 -I$(TOP)/src/mesa/math \
30 -I$(TOP)/src/mesa/transform \
31 -I$(TOP)/src/mesa/shader \
32 -I$(TOP)/src/mesa/swrast \
33 -I$(TOP)/src/mesa/swrast_setup
34
35 # Core Mesa objects
36 MESA_MODULES = $(TOP)/src/mesa/libmesa.a
37
38 # Libraries that the driver shared lib depends on
39 LIB_DEPS = -lm -lpthread -lc
40 # LIB_DEPS = -lGL -lm -lpthread -lc
41
42
43 ASM_SOURCES =
44
45 OBJECTS = $(C_SOURCES:.c=.o) \
46 $(ASM_SOURCES:.S=.o)
47
48
49 ##### RULES #####
50
51 .c.o:
52 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
53
54 .S.o:
55 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
56
57
58 ##### TARGETS #####
59
60 default: depend $(TOP)/$(LIB_DIR)/$(LIBNAME)
61
62
63 $(TOP)/$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
64 CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(TOP)/$(LIB_DIR) \
65 $(OBJECTS) $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES)
66
67
68 depend: $(C_SOURCES) $(ASM_SOURCES)
69 rm -f depend
70 touch depend
71 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
72 > /dev/null
73
74
75 # Emacs tags
76 tags:
77 etags `find . -name \*.[ch]` `find ../include`
78
79
80 clean:
81 -rm -f *.o server/*.o
82
83
84 include depend