8769b826b5f358551bb0947b0227b37ab1ff532c
[profile/ivi/mesa.git] / src / gallium / drivers / cell / ppu / Makefile
1 # Gallium3D Cell driver: PPU code
2
3 # This makefile builds the libcell.a library which gets pulled into
4 # the main libGL.so library
5
6
7 TOP = ../../../../..
8 include $(TOP)/configs/current
9
10
11 # This is the "top-level" cell PPU driver code, will get pulled into libGL.so
12 # by the winsys Makefile.
13 CELL_LIB = ../libcell.a
14
15
16 # This is the SPU code.  We'd like to be able to put this into the libcell.a
17 # archive with the PPU code, but nesting .a libs doesn't seem to work.
18 # So, it's pulled into libGL.so in gallium/winsys/xlib/Makefile
19 SPU_CODE_MODULE = ../spu/g3d_spu.a
20
21
22 SOURCES = \
23         cell_batch.c \
24         cell_buffer.c \
25         cell_clear.c \
26         cell_context.c \
27         cell_draw_arrays.c \
28         cell_fence.c \
29         cell_flush.c \
30         cell_gen_fragment.c \
31         cell_gen_fp.c \
32         cell_state_derived.c \
33         cell_state_emit.c \
34         cell_state_shader.c \
35         cell_pipe_state.c \
36         cell_screen.c \
37         cell_state_vertex.c \
38         cell_spu.c \
39         cell_surface.c \
40         cell_texture.c \
41         cell_vbuf.c \
42         cell_vertex_fetch.c \
43         cell_vertex_shader.c
44
45
46 OBJECTS = $(SOURCES:.c=.o) \
47
48 INCLUDE_DIRS = \
49         -I$(TOP)/src/mesa \
50         -I$(TOP)/src/gallium/include \
51         -I$(TOP)/src/gallium/auxiliary \
52         -I$(TOP)/src/gallium/drivers
53
54 .c.o:
55         $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
56
57
58 .c.s:
59         $(CC) -S $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
60
61
62 default: $(CELL_LIB)
63
64
65 $(CELL_LIB): $(OBJECTS) $(SPU_CODE_MODULE)
66 #       ar -ru $(CELL_LIB) $(OBJECTS) $(SPU_CODE_MODULE) # doesn't work
67         ar -ru $(CELL_LIB) $(OBJECTS)
68
69 #$(PROG): $(PPU_OBJECTS)
70 #       $(CC) -o $(PROG) $(PPU_OBJECTS) $(SPU_CODE_MODULE) $(PPU_LFLAGS)
71
72
73
74 clean:
75         rm -f *.o *~ $(CELL_LIB)
76
77
78
79 depend: $(SOURCES)
80         rm -f depend
81         touch depend
82         $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(SOURCES) 2> /dev/null
83
84 include depend
85
86
87