lo.mk: Compiael possibly present $(CPP_PREFIX)*.cpp into loadable object, too

This commit is contained in:
Jan Lindemann 2009-04-29 15:09:39 +00:00 committed by Jan Lindemann
commit 58d117caf0

View file

@ -16,6 +16,7 @@ LOADABLE_OBJ_HOOK ?= LOADABLE_OBJECT_HOOK
.PRECIOUS: %.cpp
LOADABLE_OBJS = $(patsubst $(CPP_PREFIX)%,%,$(basename $(notdir $(wildcard $(TOOLS_DIR)/$(CPP_PREFIX)*.h))))
LOADABLE_OBJS_O = $(patsubst %.cpp,%.o,$(wildcard $(CPP_PREFIX)*.cpp))
ifneq ($(TARGET),mingw)
LOADABLE_OBJ_LIBS = $(addprefix $(SO_PREFIX), $(addsuffix .so, $(LOADABLE_OBJS)))
else
@ -31,7 +32,7 @@ clean: clean.lo
clean.lo: profclean
rm -f $(filter-out $(CPP_PREFIX)%.cpp,$(wildcard *.o *.cpp *.so *.done *.dll))
$(SO_PREFIX)%.so $(SO_PREFIX)%.dll: %.o
$(SO_PREFIX)%.so $(SO_PREFIX)%.dll: %.o $(LOADABLE_OBJS_O)
$(CPP) -shared $^ $(LDFLAGS) -o $@
%.cpp: $(TOOLS_DIR)/$(CPP_PREFIX)%.h