diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-08 20:40:46 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-08 20:40:46 +0400 |
commit | 9b3b52dfd6229d5456d818e2b919acae9d6ab47b (patch) | |
tree | 32d2c028986cb56b921da16b5fffbd20ae56a49f /source/blender/makesrna/intern/Makefile | |
parent | 4b2072bec302c9e0b38337eebd0ba9ad9933841a (diff) |
RNA:
* Added the build system code to compile files named
editors/*/*_api.c into the makesrna preprocessing.
The reason to do this is to keep operators and API
close together, but it doesn't fit well with the build
system, especially Makefiles use an ugly hack here.
* Some fixes to pass an RNA AnyType through the API,
this will give a PointerRNA, for use in the interface
code for example.
* Added RNA wrapping of some UI template code as a test.
Diffstat (limited to 'source/blender/makesrna/intern/Makefile')
-rw-r--r-- | source/blender/makesrna/intern/Makefile | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile index 070f6f264bd..f64c11ac718 100644 --- a/source/blender/makesrna/intern/Makefile +++ b/source/blender/makesrna/intern/Makefile @@ -31,8 +31,8 @@ DEFRNA = $(filter-out %rna_define.c, $(filter-out %rna_access.c, $(ALLRNA))) GENSRCS = $(patsubst rna_%.c, rna_%_gen.c, $(DEFRNA)) GENTARGET = $(patsubst %.c, $(DIR)/$(DEBUG_DIR)%.c, $(GENSRCS)) -MAKESRCS = $(DEFRNA) makesrna.c rna_define.c -MAKEOBJS = $(patsubst %.c, $(DIR)/$(DEBUG_DIR)%.o, $(MAKESRCS)) +MAKESRCS = $(DEFRNA) makesrna.c rna_define.c $(wildcard ../../editors/*/*_api.c) +MAKEOBJS = $(patsubst %.c, $(DIR)/$(DEBUG_DIR)%.o, $(notdir $(MAKESRCS))) CSRCS = $(GENSRCS) rna_access.c @@ -49,6 +49,7 @@ CPPFLAGS += -I../../blenlib CPPFLAGS += -I../../blenkernel CPPFLAGS += -I../../makesdna CPPFLAGS += -I../../windowmanager +CPPFLAGS += -I../../editors/include CPPFLAGS += -I.. CPPFLAGS += -I. @@ -72,6 +73,24 @@ clean:: # TODO include right .mk for ldflags +# XXX this is an ugly hack, copying code from nan_compile.mk +# we want the .o's to be in the makesrna/ directory, but the +# .c's are in the editors/*/ directories + +$(DIR)/$(DEBUG_DIR)%_api.o: ../../editors/*/%_api.c + ifdef NAN_DEPEND + @set -e; $(CC) -M $(CPPFLAGS) $< 2>/dev/null \ + | sed 's@\($*\)\.o[ :]*@$(DIR)/$(DEBUG_DIR)\1.o : @g' \ + > $(DIR)/$(DEBUG_DIR)$*.d; \ + [ -s $(DIR)/$(DEBUG_DIR)$*.d ] || $(RM) $(DIR)/$*.d + endif + ifdef NAN_QUIET + @echo " -- $< -- " + @$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ + else + $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@) + endif + # A small note: we do not use the debug version of the alloc lib. That # is done quite intentionally. If there is a bug in that lib, it needs # to be fixed by the module maintainer. |