Skip to content

Commit

Permalink
add 'dist' make target
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jan 18, 2014
1 parent 92c1750 commit 35cef7f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,28 @@ clean:
$(MAKE) -C bindings/ocaml clean
$(MAKE) -C tests clean

CSVER=capstone-$(VERSION)
dist:
rm -rf $(CSVER)
git clone . $(CSVER)
rm -rf $(CSVER)/.git*
ifeq (,$(findstring mips,$(CAPSTONE_ARCHS)))
rm -rf $(CSVER)/arch/Mips
endif
ifeq (,$(findstring arm,$(CAPSTONE_ARCHS)))
rm -rf $(CSVER)/arch/ARM
endif
ifeq (,$(findstring powerpc,$(CAPSTONE_ARCHS)))
rm -rf $(CSVER)/arch/PowerPC
endif
ifeq (,$(findstring aarch64,$(CAPSTONE_ARCHS)))
rm -rf $(CSVER)/arch/AArch64
endif
ifeq (,$(findstring x86,$(CAPSTONE_ARCHS)))
rm -rf $(CSVER)/arch/X86
endif
tar czvf $(CSVER).tar.gz $(CSVER)
rm -rf $(CSVER)

.c.o:
$(CC) $(CFLAGS) -c $< -o $@

0 comments on commit 35cef7f

Please sign in to comment.