--- a/Makefile +++ b/Makefile @@ -42,6 +42,9 @@ PACKAGE = vdr-$(ARCHIVE) ### Includes and Defines (add further entries here): +ifdef FREEBSD +LIBS += -L${LOCALBASE}/lib +endif LIBS += -lupnp -lixml -lsqlite3 -lavformat -lavcodec INCLUDES += -I$(VDRDIR)/include -I/usr/include -Iinc \ @@ -150,7 +153,11 @@ i18n: $(I18Nmsgs) $(I18Npot) libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LIBS) -shared $(OBJS) -o $@ -lc +ifdef FREEBSD + @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) +else @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) +endif dist: clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @@ -162,3 +169,6 @@ dist: clean clean: @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot + +install: + ${INSTALL_PROGRAM} $(LIBDIR)/libvdr-$(PLUGIN).so.$(APIVERSION) $(PREFIX)/lib/vdr/libvdr-$(PLUGIN).so.$(APIVERSION)