Indentation fix, cleanup.
[AROS.git] / arch / all-pc / acpica / generate / unix / Makefile.common
blobfe5e46bd335a082803161e017c80e0e646afcd09
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)
11 else
12 HARDWARE_NAME := $(shell uname -m)
13 endif
16 # Main rule will only generate versions that are appropriate for the running
17 # OS, either 64-bit or 32-bit.
19 all:    $(PROGS)
20 $(PROGS): FORCE
21         @cd $(BUILD_DIRECTORY_PATH)/$@; \
22         mkdir -p obj; \
23         $(MAKE) || exit "$$?"; \
24         if [ $(findstring 64,$(HARDWARE_NAME)) ]; then \
25                 echo "64-bit version of $@:"; \
26         else \
27                 echo "32-bit version of $@:"; \
28         fi; \
29         ls -al ../bin/$@; \
30         echo "";
33 # Simple clean removes all .obj files, but leaves the executables
34 # in the local bin directory
36 clean:  FORCE
37         @for toolname in $(PROGS); do \
38                 (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
39                 if [ -d "obj" ] ; then \
40                         echo "Removing $$toolname:"; \
41                         pwd; \
42                         $(MAKE) clean; \
43                         rmdir obj; \
44                         echo ""; \
45                 fi; \
46                 ); \
47         done;
50 # Very clean removes all executables and the local bin directory
52 veryclean:      FORCE
53         @for toolname in $(PROGS); do \
54                 (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
55                 if [ -d "obj" ] ; then \
56                         echo "Removing $$toolname:"; \
57                         pwd; \
58                         $(MAKE) clean; \
59                         rmdir obj; \
60                         echo ""; \
61                 fi; \
62                 ); \
63                 if [ -e "$(BUILD_DIRECTORY_PATH)/bin/$$toolname" ] ; then \
64                         rm $(BUILD_DIRECTORY_PATH)/bin/$$toolname; \
65                 fi; \
66         done; \
67         if [ -d "bin" ] ; then \
68                 rmdir bin; \
69         fi;
72 # Install all tools, either 32-bit or 64-bit as appropriate for the host OS
74 install:        FORCE
75         @for toolname in $(PROGS); do \
76                 (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
77                 pwd; \
78                 $(MAKE) PROG=$$toolname install; \
79                 if [ $(findstring 64,$(HARDWARE_NAME)) ]; then \
80                         echo "Installed 64-bit version of $$toolname"; \
81                 else \
82                         echo "Installed 32-bit version of $$toolname"; \
83                 fi; \
84                 echo ""; \
85                 ); \
86         done;
88 machine:        FORCE
89         @echo "Machine architecture: $(HARDWARE_NAME), $(XBITS)";
90         @echo "Findstring: $(findstring 64, $(HARDWARE_NAME))";
92 FORCE: