diff options
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. |