c92f8e5cba2d8f71c9cab329c3735840443f5829
[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_clear.c \
25 cell_context.c \
26 cell_draw_arrays.c \
27 cell_fence.c \
28 cell_flush.c \
29 cell_gen_fragment.c \
30 cell_gen_fp.c \
31 cell_state_derived.c \
32 cell_state_emit.c \
33 cell_state_shader.c \
34 cell_pipe_state.c \
35 cell_screen.c \
36 cell_state_vertex.c \
37 cell_spu.c \
38 cell_surface.c \
39 cell_texture.c \
40 cell_vbuf.c \
41 cell_vertex_fetch.c \
42 cell_vertex_shader.c
43
44
45 OBJECTS = $(SOURCES:.c=.o) \
46
47 INCLUDE_DIRS = \
48 -I$(TOP)/src/mesa \
49 -I$(TOP)/src/gallium/include \
50 -I$(TOP)/src/gallium/auxiliary \
51 -I$(TOP)/src/gallium/drivers
52
53 .c.o:
54 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
55
56
57 .c.s:
58 $(CC) -S $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
59
60
61 default: $(CELL_LIB)
62
63
64 $(CELL_LIB): $(OBJECTS) $(SPU_CODE_MODULE)
65 # ar -ru $(CELL_LIB) $(OBJECTS) $(SPU_CODE_MODULE) # doesn't work
66 ar -ru $(CELL_LIB) $(OBJECTS)
67
68 #$(PROG): $(PPU_OBJECTS)
69 # $(CC) -o $(PROG) $(PPU_OBJECTS) $(SPU_CODE_MODULE) $(PPU_LFLAGS)
70
71
72
73 clean:
74 rm -f *.o *~ $(CELL_LIB)
75
76
77
78 depend: $(SOURCES)
79 rm -f depend
80 touch depend
81 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(SOURCES) 2> /dev/null
82
83 include depend
84
85
86