From 356055c986bd250ede40bf953356b42c72738aa1 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 6 Oct 2024 00:54:16 +0200 Subject: add install/uninstall targets to Makefile --- Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 827a299..8053614 100644 --- a/Makefile +++ b/Makefile @@ -86,10 +86,10 @@ build: $(OUTOSDIR)/VMusicMain.$(SO) $(OUTOSDIR)/VMusicMainVM.$(SO) $(OUTOSDIR)/A $(OUTDIR) $(OBJDIR) $(OBJOSDIR) $(OUTOSDIR): %: mkdir -p $@ -$(OUTDIR)/version-generated.h: VirtualBox.src | $(OBJDIR) +$(OBJDIR)/version-generated.h: | VirtualBox.src $(OBJDIR) ./scripts/generate_version_headers.sh -$(OBJOSDIR)/%.o: %.cpp $(OUTDIR)/version-generated.h | $(OBJOSDIR) +$(OBJOSDIR)/%.o: %.cpp $(OBJDIR)/version-generated.h | $(OBJOSDIR) $(CXX) -c $(VBOX_CXXFLAGS) $(VBOX_DEFINES) $(VMUSIC_DEFINES) $(CXXFLAGS) -o $@ $< $(OBJOSDIR)/%.o: %.c | $(OBJOSDIR) @@ -120,13 +120,21 @@ $(OUTDIR)/ExtPack.manifest: $(OUTDIR) $(OUTOSDIR) cd $(OUTDIR) ;\ find -type f -printf '%P\n' | xargs ../scripts/build_manifest.sh > $(@F) -pack: $(OUTDIR)/ExtPack.xml $(OUTDIR)/ExtPack.signature $(OUTDIR)/ExtPack.manifest +VMusic.vbox-extpack: $(OUTDIR)/ExtPack.xml $(OUTDIR)/ExtPack.signature $(OUTDIR)/ExtPack.manifest tar --format=ustar --numeric-owner --owner=0 --group=0 --mode='a=rX,u+w' --sort=name -C $(OUTDIR) -f VMusic.vbox-extpack -v -z -c . +pack: VMusic.vbox-extpack + strip: strip $(OUTOSDIR)/*.$(SO) clean: rm -rf $(OUTDIR) $(OBJDIR) VMusic.vbox-extpack -.PHONY: all build clean strip pack +install: VMusic.vbox-extpack + VBoxManage extpack install --replace VMusic.vbox-extpack + +uninstall: + VBoxManage extpack uninstall VMusic + +.PHONY: all build clean strip pack install uninstall -- cgit v1.2.3