# HG changeset patch # User Chris Cannam # Date 1478784955 0 # Node ID 6d651bfc93b99a7f1c05ecab128ef4f6944c595d # Parent d1a99d44812b5404b6bf0712c08af40e3c4189ba 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) diff -r d1a99d44812b -r 6d651bfc93b9 Makefile.inc --- 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)