Makefile: do not regenerate diet.h if it is existent - patched by Pancake. this also deletes diet.h for clean target
This commit is contained in:
parent
a4f37e075a
commit
5bbbfcec16
11
Makefile
11
Makefile
|
@ -135,7 +135,7 @@ PKGCFGF = $(LIBNAME).pc
|
|||
|
||||
VERSION=$(shell echo `grep -e PKG_MAJOR -e PKG_MINOR CONFIG | grep -v = | awk '{print $$3}'` | awk '{print $$1"."$$2}')
|
||||
|
||||
.PHONY: all clean install uninstall diet dist
|
||||
.PHONY: all clean install uninstall dist
|
||||
|
||||
all: $(LIBRARY) $(ARCHIVE) $(PKGCFGF)
|
||||
$(MAKE) -C tests
|
||||
|
@ -144,15 +144,15 @@ all: $(LIBRARY) $(ARCHIVE) $(PKGCFGF)
|
|||
$(LIBRARY): $(LIBOBJ)
|
||||
$(CC) $(LDFLAGS) $(LIBOBJ) -o $(LIBRARY)
|
||||
|
||||
$(LIBOBJ): diet
|
||||
$(LIBOBJ): include/diet.h
|
||||
|
||||
# generate include/diet.h
|
||||
diet:
|
||||
# auto-generate include/diet.h
|
||||
include/diet.h:
|
||||
@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
|
||||
@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
|
||||
|
@ -196,6 +196,7 @@ uninstall:
|
|||
clean:
|
||||
rm -f $(LIBOBJ) lib$(LIBNAME).*
|
||||
rm -f $(PKGCFGF)
|
||||
rm -f include/diet.h
|
||||
$(MAKE) -C bindings/python clean
|
||||
$(MAKE) -C bindings/java clean
|
||||
$(MAKE) -C bindings/ocaml clean
|
||||
|
|
Loading…
Reference in New Issue