diff options
author | Brian <[email protected]> | 2007-12-05 14:57:19 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-12-05 14:57:19 -0700 |
commit | 59356268187470c5fda9e9a1a7058607f938fb3b (patch) | |
tree | 0045a6b75fd4b49e82a5908739bca8152ac082de | |
parent | ce30f0550f02b28219c84851d71e0713aa315ee3 (diff) |
Add dependency checking for Cell driver sources.
-rw-r--r-- | configs/linux-cell | 3 | ||||
-rw-r--r-- | src/mesa/Makefile | 5 | ||||
-rw-r--r-- | src/mesa/pipe/cell/ppu/Makefile | 22 | ||||
-rw-r--r-- | src/mesa/pipe/cell/spu/Makefile | 20 |
4 files changed, 44 insertions, 6 deletions
diff --git a/configs/linux-cell b/configs/linux-cell index 4a327faccc9..f581b5a6fe3 100644 --- a/configs/linux-cell +++ b/configs/linux-cell @@ -21,6 +21,9 @@ CXXFLAGS = $(CFLAGS) SRC_DIRS = mesa glu glut/glx +MKDEP_OPTIONS = -fdepend -Y + + GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread \ -L$(SDK)/lib -m32 -Wl,-m,elf32ppc -R$(SDK)/lib -lspe diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 6f0877d335b..6f090d9b3d6 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -15,6 +15,7 @@ SOFTPIPE_LIB = $(TOP)/src/mesa/pipe/softpipe/libsoftpipe.a ifeq ($(CONFIG_NAME), linux-cell) CELL_LIB = $(TOP)/src/mesa/pipe/cell/ppu/libcell.a +CELL_LIB_SPU = $(TOP)/src/mesa/pipe/cell/spu/g3d_spu.a endif @@ -117,12 +118,12 @@ stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$ osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) # Make the GL library -$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) $(SOFTPIPE_LIB) $(CELL_LIB) +$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) $(SOFTPIPE_LIB) $(CELL_LIB) $(CELL_LIB_SPU) @ $(TOP)/bin/mklib -o $(GL_LIB) \ -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \ -install $(TOP)/$(LIB_DIR) \ $(MKLIB_OPTIONS) $(STAND_ALONE_OBJECTS) \ - $(SOFTPIPE_LIB) $(CELL_LIB)$(GL_LIB_DEPS) + $(SOFTPIPE_LIB) $(CELL_LIB) $(CELL_LIB_SPU) $(GL_LIB_DEPS) # Make the OSMesa library $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS) diff --git a/src/mesa/pipe/cell/ppu/Makefile b/src/mesa/pipe/cell/ppu/Makefile index ede341abca4..c987d54e02f 100644 --- a/src/mesa/pipe/cell/ppu/Makefile +++ b/src/mesa/pipe/cell/ppu/Makefile @@ -14,7 +14,12 @@ CELL_LIB = libcell.a SPU_CODE_MODULE = ../spu/g3d_spu.a -OBJECTS = cell_context.o cell_surface.o + +SOURCES = \ + cell_context.c \ + cell_surface.c + +OBJECTS = $(SOURCES:.c=.o) \ INCLUDE_DIRS = -I$(TOP)/src/mesa @@ -28,7 +33,8 @@ default: $(CELL_LIB) $(CELL_LIB): $(OBJECTS) $(SPU_CODE_MODULE) - ar -ru $(CELL_LIB) $(OBJECTS) $(SPU_CODE_MODULE) +# ar -ru $(CELL_LIB) $(OBJECTS) $(SPU_CODE_MODULE) + ar -ru $(CELL_LIB) $(OBJECTS) #$(PROG): $(PPU_OBJECTS) # $(CC) -o $(PROG) $(PPU_OBJECTS) $(SPU_CODE_MODULE) $(PPU_LFLAGS) @@ -37,3 +43,15 @@ $(CELL_LIB): $(OBJECTS) $(SPU_CODE_MODULE) clean: rm -f *.o $(CELL_LIB) + + + +depend: $(SOURCES) + rm -f depend + touch depend + $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(SOURCES) 2> /dev/null + +include depend + + + diff --git a/src/mesa/pipe/cell/spu/Makefile b/src/mesa/pipe/cell/spu/Makefile index 00f931e1c19..700a6c61cdc 100644 --- a/src/mesa/pipe/cell/spu/Makefile +++ b/src/mesa/pipe/cell/spu/Makefile @@ -1,4 +1,4 @@ -# Gallium3D Cell driver: PPU code +# Gallium3D Cell driver: SPU code # This makefile builds the g3d_spu.a file that's linked into the # PPU code/library. @@ -15,7 +15,13 @@ PROG_SPU_A = $(PROG)_spu.a PROG_SPU_EMBED_O = $(PROG)_spu-embed.o -SPU_OBJECTS = main.o tri.o +SOURCES = \ + main.c \ + tri.c + +SPU_OBJECTS = $(SOURCES:.c=.o) \ + +INCLUDE_DIRS = -I$(TOP)/src/mesa # The .a file will be linked into the main/PPU executable @@ -40,3 +46,13 @@ tri.o: tri.c clean: rm -f *.o *.a *.d $(PROG_SPU) + + + +depend: $(SOURCES) + rm -f depend + touch depend + $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(SOURCES) 2> /dev/null + +include depend + |