Mercurial > hg > piper-vamp-js
changeset 122:6d651bfc93b9
Some build fixes (especially: use of realpath for object files meant only those files that already existed in the original directories were being considered as targets)
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 10 Nov 2016 13:35:55 +0000 |
parents | d1a99d44812b |
children | 5f6ac1f98965 |
files | Makefile.inc |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.inc Thu Nov 10 12:07:51 2016 +0000 +++ b/Makefile.inc Thu Nov 10 13:35:55 2016 +0000 @@ -11,6 +11,8 @@ @echo " - build native-code module on Linux (mostly for testing)" @echo "$$ make clean" @echo " - remove intermediate build files, but not targets" + @echo "$$ make distclean" + @echo " - remove all targets and intermediate build files" @echo @echo "Note: when switching from one target to another, make clean first" @echo @@ -86,8 +88,8 @@ CXX_OBJECTS := $(CXX_SOURCES:.cpp=.o) C_OBJECTS := $(C_SOURCES:.c=.o) -OBJECTS := $(CXX_OBJECTS) $(C_OBJECTS) -OBJECTS := $(addprefix $(OBJDIR)/,$(realpath $(OBJECTS))) +ALL_OBJECTS := $(CXX_OBJECTS) $(C_OBJECTS) +OBJECTS := $(addprefix $(OBJDIR)/,$(abspath $(ALL_OBJECTS))) o/%.o: %.cpp mkdir -p $(dir $@) @@ -99,10 +101,13 @@ $(EM_MODULE): $(OBJECTS) $(CXX) $(OPTFLAGS) -o $@ $^ $(LDFLAGS) && \ - ( echo "if (typeof process === 'object') module.exports=$(MODULE_SYMBOL);" >> $(EM_MODULE) ) + ( echo "if (typeof process === 'object') module.exports=$(EM_MODULE_SYMBOL);" >> $(EM_MODULE) ) $(SO_MODULE): $(OBJECTS) $(CXX) -o $@ $^ $(LDFLAGS) clean: rm -f $(OBJECTS) + +distclean: clean + rm -f $(EM_MODULE) $(SO_MODULE)