diff --git a/Makefile b/Makefile index f39c702..1cc46b4 100644 --- a/Makefile +++ b/Makefile @@ -110,16 +110,16 @@ depend: makedepend -f$(MAKEFILE_LIST) -Y $(OBJS:.o=.c) 2>/dev/null install: $(HEADERS) $(STATICLIB) $(SHAREDLIB) natpmpc-shared natpmp.pc - $(INSTALL) -d $(INSTALLDIRINC) - $(INSTALL) -m 644 $(HEADERS) $(INSTALLDIRINC) - $(INSTALL) -d $(INSTALLDIRLIB) - $(INSTALL) -m 644 $(STATICLIB) $(INSTALLDIRLIB) - $(INSTALL) -m 644 $(SHAREDLIB) $(INSTALLDIRLIB)/$(SONAME) + $(INSTALL) -d $(DESTDIR)$(INSTALLDIRINC) + $(INSTALL) -m 644 $(HEADERS) $(DESTDIR)$(INSTALLDIRINC) + $(INSTALL) -d $(DESTDIR)$(INSTALLDIRLIB) + $(INSTALL) -m 644 $(STATICLIB) $(DESTDIR)$(INSTALLDIRLIB) + $(INSTALL) -m 644 $(SHAREDLIB) $(DESTDIR)$(INSTALLDIRLIB)/$(SONAME) $(INSTALL) -d $(DESTDIR)$(PKGCONFIGDIR) $(INSTALL) -m 644 natpmp.pc $(DESTDIR)$(PKGCONFIGDIR) - $(INSTALL) -d $(INSTALLDIRBIN) - $(INSTALL) -m 755 natpmpc-shared $(INSTALLDIRBIN)/natpmpc - ln -s -f $(SONAME) $(INSTALLDIRLIB)/$(SHAREDLIB) + $(INSTALL) -d $(DESTDIR)$(INSTALLDIRBIN) + $(INSTALL) -m 755 natpmpc-shared $(DESTDIR)$(INSTALLDIRBIN)/natpmpc + ln -s -f $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(SHAREDLIB) $(JNIHEADERS): fr/free/miniupnp/libnatpmp/NatPmp.class $(JAVAH) -jni fr.free.miniupnp.libnatpmp.NatPmp @@ -169,11 +169,11 @@ mvn_install: -DcreateChecksum=true cleaninstall: - $(RM) $(addprefix $(INSTALLDIRINC), $(HEADERS)) - $(RM) $(INSTALLDIRLIB)/$(SONAME) - $(RM) $(INSTALLDIRLIB)/$(SHAREDLIB) - $(RM) $(INSTALLDIRLIB)/$(STATICLIB) - $(RM) $(INSTALLDIRLIB)/$(PKGCONFIGDIR) + $(RM) $(addprefix $(DESTDIR)$(INSTALLDIRINC)/, $(HEADERS)) + $(RM) $(DESTDIR)$(INSTALLDIRLIB)/$(SONAME) + $(RM) $(DESTDIR)$(INSTALLDIRLIB)/$(SHAREDLIB) + $(RM) $(DESTDIR)$(INSTALLDIRLIB)/$(STATICLIB) + $(RM) $(DESTDIR)$(PKGCONFIGDIR) natpmp.pc: VERSION $(RM) $@