Revert to allow multiple arch compilations
This commit is contained in:
parent
0755282f04
commit
8cd8c4078e
34
Makefile
34
Makefile
|
@ -23,31 +23,22 @@ LIBNAME = capstone
|
||||||
|
|
||||||
LIBOBJ =
|
LIBOBJ =
|
||||||
LIBOBJ += cs.o utils.o SStream.o MCInstrDesc.o MCRegisterInfo.o
|
LIBOBJ += cs.o utils.o SStream.o MCInstrDesc.o MCRegisterInfo.o
|
||||||
ifneq (,$(filter $(CAPSTONE_ARCH), arm all))
|
ifneq (,$(findstring arm,$(CAPSTONE_ARCHS)))
|
||||||
LIBOBJ += arch/ARM/ARMDisassembler.o arch/ARM/ARMInstPrinter.o arch/ARM/mapping.o arch/ARM/module.o
|
LIBOBJ += arch/ARM/ARMDisassembler.o arch/ARM/ARMInstPrinter.o arch/ARM/mapping.o arch/ARM/module.o
|
||||||
CFLAGS += -DCS_SUPPORT_ARM
|
CFLAGS += -DCS_SUPPORT_ARM
|
||||||
ifeq ($(CAPSTONE_ARCH), arm)
|
|
||||||
endif
|
endif
|
||||||
endif
|
ifneq (,$(findstring x86,$(CAPSTONE_ARCHS)))
|
||||||
ifneq (, $(filter $(CAPSTONE_ARCH), x86 all))
|
|
||||||
LIBOBJ += arch/X86/X86DisassemblerDecoder.o arch/X86/X86Disassembler.o arch/X86/X86IntelInstPrinter.o arch/X86/X86ATTInstPrinter.o arch/X86/mapping.o arch/X86/module.o
|
LIBOBJ += arch/X86/X86DisassemblerDecoder.o arch/X86/X86Disassembler.o arch/X86/X86IntelInstPrinter.o arch/X86/X86ATTInstPrinter.o arch/X86/mapping.o arch/X86/module.o
|
||||||
CFLAGS += -DCS_SUPPORT_X86
|
CFLAGS += -DCS_SUPPORT_X86
|
||||||
ifeq ($(CAPSTONE_ARCH), x86)
|
|
||||||
endif
|
endif
|
||||||
endif
|
ifneq (,$(findstring mips,$(CAPSTONE_ARCHS)))
|
||||||
ifneq (, $(filter $(CAPSTONE_ARCH), mips all))
|
|
||||||
LIBOBJ += arch/Mips/MipsDisassembler.o arch/Mips/MipsInstPrinter.o arch/Mips/mapping.o arch/Mips/module.o
|
LIBOBJ += arch/Mips/MipsDisassembler.o arch/Mips/MipsInstPrinter.o arch/Mips/mapping.o arch/Mips/module.o
|
||||||
CFLAGS += -DCS_SUPPORT_MIPS
|
|
||||||
ifeq ($(CAPSTONE_ARCH), mips)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifneq (, $(filter $(CAPSTONE_ARCH), arm64 all))
|
|
||||||
LIBOBJ += arch/AArch64/AArch64BaseInfo.o arch/AArch64/AArch64Disassembler.o arch/AArch64/AArch64InstPrinter.o arch/AArch64/mapping.o arch/AArch64/module.o
|
|
||||||
CFLAGS += -DCS_SUPPORT_AARCH64
|
CFLAGS += -DCS_SUPPORT_AARCH64
|
||||||
ifeq ($(CAPSTONE_ARCH), arm64)
|
|
||||||
endif
|
endif
|
||||||
|
ifneq (,$(findstring aarch64,$(CAPSTONE_ARCHS)))
|
||||||
|
LIBOBJ += arch/AArch64/AArch64BaseInfo.o arch/AArch64/AArch64Disassembler.o arch/AArch64/AArch64InstPrinter.o arch/AArch64/mapping.o arch/AArch64/module.o
|
||||||
|
CFLAGS += -DCS_SUPPORT_MIPS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBOBJ += MCInst.o
|
LIBOBJ += MCInst.o
|
||||||
|
|
||||||
EXT = so
|
EXT = so
|
||||||
|
@ -100,14 +91,11 @@ $(ARCHIVE): $(LIBOBJ)
|
||||||
$(RANLIB) $(ARCHIVE)
|
$(RANLIB) $(ARCHIVE)
|
||||||
|
|
||||||
$(PKGCFGF):
|
$(PKGCFGF):
|
||||||
echo 'Name: capstone' > $(PKGCFGF)
|
echo Name: capstone > $(PKGCFGF)
|
||||||
echo 'Description: Capstone disassembler engine' >> $(PKGCFGF)
|
echo Description: Capstone disassembler engine >> $(PKGCFGF)
|
||||||
echo 'Version: $(VERSION)' >> $(PKGCFGF)
|
echo Version: $(VERSION) >> $(PKGCFGF)
|
||||||
echo 'libdir=$(LIBDIR)' >> $(PKGCFGF)
|
echo Libs: -L$(LIBDIR) -lcapstone >> $(PKGCFGF)
|
||||||
echo 'includedir=$(PREFIX)/include/capstone' >> $(PKGCFGF)
|
echo Cflags: -I$(PREFIX)/include/capstone >> $(PKGCFGF)
|
||||||
echo 'archive=$${libdir}/libcapstone.a' >> $(PKGCFGF)
|
|
||||||
echo 'Libs: -L$${libdir} -lcapstone' >> $(PKGCFGF)
|
|
||||||
echo 'Cflags: -I$${includedir}' >> $(PKGCFGF)
|
|
||||||
|
|
||||||
install: $(PKGCFGF) $(ARCHIVE) $(LIBRARY)
|
install: $(PKGCFGF) $(ARCHIVE) $(LIBRARY)
|
||||||
mkdir -p $(LIBDIR)
|
mkdir -p $(LIBDIR)
|
||||||
|
|
16
config.mk
16
config.mk
|
@ -1,16 +1,2 @@
|
||||||
# NOTE: only enable one of the lines below by commenting out what you want.
|
CAPSTONE_ARCHS = arm x86 mips aarch64
|
||||||
# That is either one of 4 architectures, or *all* of them.
|
|
||||||
|
|
||||||
# comment out line below if you only want ARM support
|
|
||||||
#CAPSTONE_ARCH = arm
|
|
||||||
|
|
||||||
# comment out line below if you only want ARM64 support
|
|
||||||
#CAPSTONE_ARCH = arm64
|
|
||||||
|
|
||||||
# comment out line below if you only want Mips support
|
|
||||||
#CAPSTONE_ARCH = mips
|
|
||||||
|
|
||||||
# comment out line below if you only want X86 support
|
|
||||||
#CAPSTONE_ARCH = x86
|
|
||||||
|
|
||||||
CAPSTONE_ARCH = all # <— by default we support all archs
|
|
||||||
|
|
Loading…
Reference in New Issue