2 # Common make for acpica tools and utilities
6 # Get the OS machine architecture. Anything with a "64" in the returned
7 # string will be treated as a 64-bit OS. Otherwise, the default is 32-bit.
9 ifeq ($(HOST), _FreeBSD)
10 HARDWARE_NAME := $(shell uname -p)
13 HARDWARE_NAME := x86pc
15 HARDWARE_NAME := $(shell uname -m)
20 # Main rule will only generate versions that are appropriate for the running
21 # OS, either 64-bit or 32-bit.
25 @cd $(BUILD_DIRECTORY_PATH)/$@; \
27 $(MAKE) || exit "$$?"; \
28 if [ $(findstring 64,$(HARDWARE_NAME)) ]; then \
29 echo "64-bit version of $@:"; \
31 echo "32-bit version of $@:"; \
37 # Simple clean removes all .obj files, but leaves the executables
38 # in the local bin directory
41 @for toolname in $(PROGS); do \
42 (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
43 if [ -d "obj" ] ; then \
44 echo "Removing $$toolname:"; \
54 # Very clean removes all executables and the local bin directory
57 @for toolname in $(PROGS); do \
58 (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
59 if [ -d "obj" ] ; then \
60 echo "Removing $$toolname:"; \
67 if [ -e "$(BUILD_DIRECTORY_PATH)/bin/$$toolname" ] ; then \
68 rm $(BUILD_DIRECTORY_PATH)/bin/$$toolname; \
71 if [ -d "bin" ] ; then \
76 # Install all tools, either 32-bit or 64-bit as appropriate for the host OS
79 @for toolname in $(PROGS); do \
80 (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
82 $(MAKE) PROG=$$toolname install; \
83 if [ $(findstring 64,$(HARDWARE_NAME)) ]; then \
84 echo "Installed 64-bit version of $$toolname"; \
86 echo "Installed 32-bit version of $$toolname"; \
93 @echo "Machine architecture: $(HARDWARE_NAME), $(XBITS)";
94 @echo "Findstring: $(findstring 64, $(HARDWARE_NAME))";