mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
lo.mk: Add rules for .dll plugins (TARGET = mingw)
This commit is contained in:
parent
c810ad1a09
commit
f71bd0281d
1 changed files with 8 additions and 2 deletions
10
make/lo.mk
10
make/lo.mk
|
|
@ -15,18 +15,24 @@ LOADABLE_OBJ_HOOK ?= LOADABLE_OBJECT_HOOK
|
|||
.PRECIOUS: %.cpp
|
||||
|
||||
LOADABLE_OBJS = $(patsubst $(CPP_PREFIX)%,%,$(basename $(notdir $(wildcard $(TOOLS_DIR)/$(CPP_PREFIX)*.h))))
|
||||
ifneq ($(TARGET),mingw)
|
||||
LOADABLE_OBJ_LIBS = $(addprefix $(SO_PREFIX), $(addsuffix .so, $(LOADABLE_OBJS)))
|
||||
else
|
||||
LOADABLE_OBJ_LIBS = $(addprefix $(SO_PREFIX), $(addsuffix .dll, $(LOADABLE_OBJS)))
|
||||
endif
|
||||
BUILD_LOADABLE_OBJ_LIBS = $(addprefix $(LIBDIR)/, $(LOADABLE_OBJ_LIBS))
|
||||
|
||||
all: $(LOADABLE_OBJ_LIBS) $(BUILD_LOADABLE_OBJ_LIBS)
|
||||
clean:
|
||||
rm -f *.o *.cpp *.so *.done
|
||||
|
||||
$(SO_PREFIX)%.so: %.o
|
||||
$(CC) -shared $(LDFLAGS) $^ -o $@
|
||||
$(SO_PREFIX)%.so $(SO_PREFIX)%.dll: %.o
|
||||
$(CPP) -shared $^ $(LDFLAGS) -o $@
|
||||
|
||||
%.cpp: $(TOOLS_DIR)/$(CPP_PREFIX)%.h
|
||||
echo -e "#include \"$<\"\n$(LOADABLE_OBJ_HOOK)($(CPP_PREFIX)$*);\n" > $@
|
||||
|
||||
$(LIBDIR)/%.so: %.so
|
||||
install -m 755 $< $@
|
||||
$(LIBDIR)/%.dll: %.dll
|
||||
install -m 755 $< $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue