From 2f6465447fa0dc7531747ac44b0f9bbd876c13c4 Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Mon, 14 May 2018 13:19:01 +0100 Subject: [PATCH] add DESTDIR for packaging --- Makefile | 3 ++- gba/Makefile | 6 ++++-- libogc/Makefile | 9 ++++++--- nds/Makefile | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index d54f0e2..b9064e8 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,11 @@ export TOPDIR := $(CURDIR) export LIBFAT_MAJOR := 1 export LIBFAT_MINOR := 1 -export LIBFAT_PATCH := 2 +export LIBFAT_PATCH := 3 export VERSTRING := $(LIBFAT_MAJOR).$(LIBFAT_MINOR).$(LIBFAT_PATCH) +export DESTDIR := $(DESTDIR) default: release diff --git a/gba/Makefile b/gba/Makefile index 4542bb0..f86d67c 100644 --- a/gba/Makefile +++ b/gba/Makefile @@ -126,8 +126,10 @@ dist-bin: @tar --exclude=.svn --exclude=*CVS* -cvjf $(TOPDIR)/distribute/$(VERSTRING)/libfat-gba-$(VERSTRING).tar.bz2 include lib install: - @cp lib/libfat.a $(DEVKITPRO)/libgba/lib - @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DEVKITPRO)/libgba/include + @mkdir -p $(DESTDIR)$(DEVKITPRO)/libgba/lib + @mkdir -p $(DESTDIR)$(DEVKITPRO)/libgba/include + @cp lib/libfat.a $(DESTDIR)$(DEVKITPRO)/libgba/lib + @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DESTDIR)$(DEVKITPRO)/libgba/include #--------------------------------------------------------------------------------- else diff --git a/libogc/Makefile b/libogc/Makefile index ded05d2..19599e4 100644 --- a/libogc/Makefile +++ b/libogc/Makefile @@ -106,9 +106,12 @@ dist-bin: @tar --exclude=.svn --exclude=*CVS* -cvjf $(TOPDIR)/distribute/$(VERSTRING)/libfat-ogc-$(VERSTRING).tar.bz2 include lib install: - @cp lib/wii/libfat.a $(DEVKITPRO)/libogc/lib/wii - @cp lib/cube/libfat.a $(DEVKITPRO)/libogc/lib/cube - @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DEVKITPRO)/libogc/include + @mkdir -p $(DESTDIR)$(DEVKITPRO)/libogc/lib/cube + @mkdir -p $(DESTDIR)$(DEVKITPRO)/libogc/lib/wii + @mkdir -p $(DESTDIR)$(DEVKITPRO)/libogc/include + @cp lib/wii/libfat.a $(DESTDIR)$(DEVKITPRO)/libogc/lib/wii + @cp lib/cube/libfat.a $(DESTDIR)$(DEVKITPRO)/libogc/lib/cube + @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DESTDIR)$(DEVKITPRO)/libogc/include #--------------------------------------------------------------------------------- else diff --git a/nds/Makefile b/nds/Makefile index 6ea0412..8d50737 100644 --- a/nds/Makefile +++ b/nds/Makefile @@ -106,8 +106,10 @@ dist-bin: @tar --exclude=.svn --exclude=*CVS* -cvjf $(TOPDIR)/distribute/$(VERSTRING)/libfat-nds-$(VERSTRING).tar.bz2 include lib install: - @cp -v lib/libfat.a $(DEVKITPRO)/libnds/lib - @cp -v $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DEVKITPRO)/libnds/include + @mkdir -p $(DESTDIR)$(DEVKITPRO)/libnds/lib + @mkdir -p $(DESTDIR)$(DEVKITPRO)/libnds/include + @cp -v lib/libfat.a $(DESTDIR)$(DEVKITPRO)/libnds/lib + @cp -v $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DESTDIR)$(DEVKITPRO)/libnds/include #--------------------------------------------------------------------------------- else