remove the useless diet.h

This commit is contained in:
Nguyen Anh Quynh 2014-03-27 17:14:57 +08:00
parent 3c5ab99c80
commit 901631eaed
2 changed files with 4 additions and 21 deletions

View File

@ -22,6 +22,10 @@ ifeq ($(USE_SYS_DYN_MEM),yes)
CFLAGS += -DUSE_SYS_DYN_MEM
endif
ifneq (,$(findstring yes,$(CAPSTONE_DIET)))
CFLAGS += -DCAPSTONE_DIET
endif
LDFLAGS += -shared
PREFIX ?= /usr
@ -250,8 +254,6 @@ all: $(LIBRARY) $(ARCHIVE) $(PKGCFGF)
$(LIBRARY): $(LIBOBJ)
$(CC) $(LDFLAGS) $(LIBOBJ) -o $(LIBRARY)
$(LIBOBJ): include/diet.h
$(LIBOBJ_ARM): $(DEP_ARM)
$(LIBOBJ_ARM64): $(DEP_ARM64)
$(LIBOBJ_MIPS): $(DEP_MIPS)
@ -260,23 +262,6 @@ $(LIBOBJ_SPARC): $(DEP_SPARC)
$(LIBOBJ_SYSZ): $(DEP_SYSZ)
$(LIBOBJ_X86): $(DEP_X86)
# auto-generate include/diet.h
include/diet.h: config.mk
@echo "// File auto-generated by Makefile for Capstone framework. DO NOT MODIFY!" > include/diet.h
@echo "" >> include/diet.h
@echo "#ifndef CAPSTONE_DIET_H" >> include/diet.h
@echo "#define CAPSTONE_DIET_H" >> include/diet.h
@echo "" >> include/diet.h
ifneq (,$(findstring yes,$(CAPSTONE_DIET)))
@echo "// Capstone is in DIET mode" >> include/diet.h
@echo "#define CAPSTONE_DIET" >> include/diet.h
else
@echo "// Capstone is in standard mode (NOT diet)" >> include/diet.h
@echo "#undef CAPSTONE_DIET" >> include/diet.h
endif
@echo "" >> include/diet.h
@echo "#endif" >> include/diet.h
$(ARCHIVE): $(LIBOBJ)
rm -f $(ARCHIVE)
$(AR) q $(ARCHIVE) $(LIBOBJ)

View File

@ -14,8 +14,6 @@ extern "C" {
#include <stdbool.h>
#include <stdlib.h>
#include "diet.h" // CAPSTONE_DIET
#ifdef _MSC_VER
#pragma warning(disable:4201)
#pragma warning(disable:4100)