diff options
author | Brian Paul <brianp@vmware.com> | 2009-05-12 13:31:20 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-05-12 13:31:20 -0600 |
commit | 64db96363fda3de7fed5109b1e7302a5221ef345 (patch) | |
tree | 38a06d4ae8f07a41c95667af3aea2d82e9d1e3e8 | |
parent | f55f5def94edbd87b3e4115a6bc33fb06fa9ae79 (diff) |
es: lots of Makefile files
-rw-r--r-- | src/gallium/state_trackers/es/mesa/Makefile | 83 |
1 files changed, 36 insertions, 47 deletions
diff --git a/src/gallium/state_trackers/es/mesa/Makefile b/src/gallium/state_trackers/es/mesa/Makefile index e4fa77b46c..cd8512c2ba 100644 --- a/src/gallium/state_trackers/es/mesa/Makefile +++ b/src/gallium/state_trackers/es/mesa/Makefile @@ -17,21 +17,29 @@ include $(TOP)/configs/current include sources.mak +ROOT = `(cd ${TOP} && pwd )` + LINK = ln -s INCLUDE_DIRS = \ - -I$(GALLIUM)/include \ + -I$(TOP)/include \ -I. \ -I./main \ - -I$(GALLIUM)/src/gallium/include \ - -I$(GALLIUM)/src/gallium/drivers \ - -I$(GALLIUM)/src/gallium/auxiliary + -I$(TOP)/src/gallium/include \ + -I$(TOP)/src/gallium/drivers \ + -I$(TOP)/src/gallium/auxiliary MESA_SUBDIRS = \ - glapi main math vbo \ - shader shader/slang shader/slang/library shader/grammar \ - state_tracker + glapi \ + main \ + math \ + shader \ + shader/grammar \ + shader/slang \ + shader/slang/library \ + state_tracker \ + vbo SPECIAL_SYMLINKS = shader/grammar/grammar.c @@ -42,43 +50,9 @@ SPECIAL_SYMLINKS = shader/grammar/grammar.c $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -UIN_DRI_DRIVER $< -o $@ -# create symlink for .c file -%.c: - $(LINK) $(GALLIUM)/src/mesa/$@ $@ - -# create symlink for .h file -%.h: - $(LINK) $(GALLIUM)/src/mesa/$@ $@ - - - +# Default rule: create the libmesa.a library .PHONY: default -default: $(MESA_SUBDIRS) symlinks libmesa.a - - -libmesa.a: $(OBJECTS) $(GALLIUM_LIBS) - $(TOP)/bin/mklib -o mesa -static $(OBJECTS) $(GALLIUM_LIBS) - - - -# Create all the symlinks back to Mesa source files that we'll use as-is -.PHONY: symlinks -symlinks: $(SPECIAL_SYMLINKS) - @ for file in $(SYMLINKS) ; do \ - if [ ! -h $$file ] ; then \ - echo "Making symlink to" $$file ; \ - rm -f $$file ; \ - $(LINK) $(GALLIUM)/src/mesa/$$file $$file ; \ - fi \ - done - - -# Remove symlinks for 'make clean' -.PHONY: rm-symlinks -rm-symlinks: - for file in $(SYMLINKS) ; do \ - rm -f $$file ; \ - done +default: $(MESA_SUBDIRS) $(SYMLINKS) $(SPECIAL_SYMLINKS) libmesa.a # Create the Mesa subdirs as needed @@ -86,19 +60,34 @@ $(MESA_SUBDIRS): mkdir $@ -# special-case -shader/grammar/grammar.c: - $(LINK) $(GALLIUM)/src/mesa/$@ $@ +# Create the libmesa.a library (common code for ES1 and ES2 libs) +libmesa.a: $(OBJECTS) $(GALLIUM_AUXILIARIES) + @echo "Making libmesa.a" + @ $(TOP)/bin/mklib -o mesa -static $(OBJECTS) $(GALLIUM_LIBS) + + +# Create symlinks back to Mesa source files that we'll use as-is +$(SYMLINKS) $(SPECIAL_SYMLINKS): + @ if [ ! -h $@ ] ; then \ + echo "Making symlink to" $@ ; \ + rm -f $@ ; \ + $(LINK) $(ROOT)/src/mesa/$@ $@ ; \ + fi + +# Special case file, python-generated main/get.c: main/get_gen.py python main/get_gen.py > main/get.c .PHONY: clean -clean: rm-symlinks +clean: + rm -f $(SYMLINKS) $(SPECIAL_SYMLINKS) -rm -f */*.o */*/*.o -rm -f depend depend.bak + -rm -f libmesa.a + -rm -f *~ depend: $(SOURCES) |