1#
2# Common make for acpica tools and utilities
3#
4
5all:	$(PROGS)
6$(PROGS): FORCE
7	@cd $(BUILD_DIRECTORY_PATH)/$@; \
8	mkdir -p obj; \
9	$(MAKE) || exit "$$?"; \
10	echo "";
11
12#
13# List just shows the status of each tool
14#
15status:	FORCE
16	@for toolname in $(PROGS); do \
17		(cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
18		pwd; \
19		if [ -d "obj" ] ; then \
20			echo "    `ls -1 obj | wc -l` files, `stat -c%s obj/$$toolname` bytes"; \
21		else \
22			echo "    Clean"; \
23		fi; \
24		); \
25	done;
26
27#
28# Simple clean removes all .obj files, but leaves the executables
29# in the local bin directory
30#
31clean:	FORCE
32	@for toolname in $(PROGS); do \
33		(cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
34		pwd; \
35		if [ -d "obj" ] ; then \
36			echo "    Removing `ls -1 obj | wc -l` files"; \
37			rm -r obj; \
38		else \
39			echo "    Clean"; \
40		fi; \
41		); \
42	done;
43
44#
45# Very clean removes all executables and the local bin directory
46#
47veryclean:	FORCE
48	@for toolname in $(PROGS); do \
49		(cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
50		if [ -d "obj" ] ; then \
51			echo "Removing $$toolname:"; \
52			pwd; \
53			$(MAKE) clean; \
54			rmdir obj; \
55			echo ""; \
56		fi; \
57		); \
58		if [ -e "$(BUILD_DIRECTORY_PATH)/bin/$$toolname" ] ; then \
59			rm $(BUILD_DIRECTORY_PATH)/bin/$$toolname; \
60		fi; \
61	done; \
62	if [ -d "bin" ] ; then \
63		rmdir bin; \
64	fi;
65
66install:	FORCE
67	@for toolname in $(PROGS); do \
68		(cd $(BUILD_DIRECTORY_PATH)/$$toolname; \
69		pwd; \
70		if [ -d "obj" ] ; then \
71			$(MAKE) PROG=$$toolname install; \
72		else \
73			echo "    Clean"; \
74		fi; \
75		); \
76	done;
77
78machine:	FORCE
79
80FORCE:
81
82