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