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)
12 HARDWARE_NAME := $(shell uname -m)
16 # Main rule will only generate versions that are appropriate for the running
17 # OS, either 64-bit or 32-bit.
21 @cd $(BUILD_DIRECTORY_PATH)/$@; \
23 $(MAKE) || exit "$$?"; \
24 if [ $(findstring 64,$(HARDWARE_NAME)) ]; then \
25 echo "64-bit version of $@:"; \
27 echo "32-bit version of $@:"; \
33 # Simple clean removes all .obj files, but leaves the executables
34 # in the local bin directory
37 @for toolname in $(PROGS); do \
38 (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
39 if [ -d "obj" ] ; then \
40 echo "Removing $$toolname:"; \
50 # Very clean removes all executables and the local bin directory
53 @for toolname in $(PROGS); do \
54 (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
55 if [ -d "obj" ] ; then \
56 echo "Removing $$toolname:"; \
63 if [ -e "$(BUILD_DIRECTORY_PATH)/bin/$$toolname" ] ; then \
64 rm $(BUILD_DIRECTORY_PATH)/bin/$$toolname; \
67 if [ -d "bin" ] ; then \
72 # Install all tools, either 32-bit or 64-bit as appropriate for the host OS
75 @for toolname in $(PROGS); do \
76 (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
78 $(MAKE) PROG=$$toolname install; \
79 if [ $(findstring 64,$(HARDWARE_NAME)) ]; then \
80 echo "Installed 64-bit version of $$toolname"; \
82 echo "Installed 32-bit version of $$toolname"; \
89 @echo "Machine architecture: $(HARDWARE_NAME), $(XBITS)";
90 @echo "Findstring: $(findstring 64, $(HARDWARE_NAME))";