lo.mk: Link against $(TOOLS_DIR)/$(CPP_PREFIX)/$*.o

The last commit doesn\'t work with TOOLS_DIR != .

Fix this by always also linking against $(TOOLS_DIR)/$(CPP_PREFIX)/$*.o.
Symbols sometimes duplicates to those in the project lib in case
TOOLS_DIR != ., hence not very nice. But seems to work.
This commit is contained in:
Jan Lindemann 2009-05-15 10:47:44 +00:00 committed by Jan Lindemann
commit c73eaa3015

View file

@ -32,8 +32,8 @@ clean: clean.lo
clean.lo: profclean clean.lo: profclean
rm -f $(filter-out $(CPP_PREFIX)%.cpp,$(wildcard *.o *.cpp *.so *.done *.dll)) rm -f $(filter-out $(CPP_PREFIX)%.cpp,$(wildcard *.o *.cpp *.so *.done *.dll))
$(SO_PREFIX)%.so $(SO_PREFIX)%.dll: %.o $(CPP_PREFIX)%.o $(SO_PREFIX)%.so $(SO_PREFIX)%.dll: %.o
$(CPP) -shared $^ $(LDFLAGS) -o $@ $(CPP) -shared $^ $(LDFLAGS) $(wildcard $(TOOLS_DIR)/$(CPP_PREFIX)$*.o) -o $@
%.cpp: $(TOOLS_DIR)/$(CPP_PREFIX)%.h %.cpp: $(TOOLS_DIR)/$(CPP_PREFIX)%.h
echo -e "#include \"$<\"\n$(LOADABLE_OBJ_HOOK)($(CPP_PREFIX)$*);\n" > $@ echo -e "#include \"$<\"\n$(LOADABLE_OBJ_HOOK)($(CPP_PREFIX)$*);\n" > $@