Fix znc-buildmod on cygwin when installed to not /usr

1. Use import library, so don't require -L/bin anymore
2. Move -lznc from LDFLAGS to LIBS
3. Fix variables in znc-buildmod. It worked before only because
   ${exec_prefix} was resolving to empty string, and /bin == /usr/bin on
   cygwin.
This commit is contained in:
Alexey Sokolov
2015-08-22 12:42:28 +01:00
parent 786d94fbe4
commit 4aba9fed17
7 changed files with 14 additions and 14 deletions
+2 -1
View File
@@ -93,7 +93,7 @@ znc: $(BIN_OBJS) $(LIBZNC)
$(LIBZNC): $(LIB_OBJS)
$(E) Linking $(LIBZNC)...
$(Q)$(CXX) $(LDFLAGS) -shared -o $@ $(LIB_OBJS) $(LIBS)
$(Q)$(CXX) $(LDFLAGS) -shared -o $@ $(LIB_OBJS) $(LIBS) -Wl,--out-implib=libznc.dll.a
endif
unittest: $(LIB_OBJS) test/gtest-all.o test/gtest-main.o $(TESTS)
@@ -188,6 +188,7 @@ install: znc $(LIBZNC)
if test -n "$(LIBZNC)"; then \
test -d $(DESTDIR)$(LIBZNCDIR) || $(INSTALL) -d $(DESTDIR)$(LIBZNCDIR) || exit 1 ; \
$(INSTALL_PROGRAM) $(LIBZNC) $(DESTDIR)$(LIBZNCDIR) || exit 1 ; \
$(INSTALL_PROGRAM) libznc.dll.a $(DESTDIR)$(libdir) || exit 1 ; \
fi
@$(MAKE) -C man install DESTDIR=$(DESTDIR)
@HAVE_SYSTEMD_TRUE@test -d $(DESTDIR)$(systemdsystemunitdir) || $(INSTALL) -d $(DESTDIR)$(systemdsystemunitdir)