Indentation fix, cleanup.
[AROS.git] / tools / hiddtool / Makefile
blob5891b74938de9e24c868993d4a343192b63efd27
1 SRC := hiddtool.c
2 EXE := ./hiddtool
4 CONFIGFILE := ./hidd.conf
5 DEPFILE := ./hidds.dep
6 all : $(EXE)
8 $(EXE) : $(SRC)
9 @gcc -g -Wall $< -o $@
11 clean:
12 @rm hiddtool
14 demo : $(EXE)
15 @echo "Demo of hidd tool"
16 @echo ""
17 @echo "This tool uses the files hidd.conf and hidds.dep"
18 @echo "hidd.conf is a config file that tells what hidds to"
19 @echo "build and if they go into kernel or on disk."
20 @echo "This file would be in the config/arch/cpu directory"
21 @echo ""
22 @echo "Example hidd.conf file:"
23 @echo ""
24 @cat $(CONFIGFILE)
25 @echo ""
26 @echo ""
27 @echo "Press a key"
28 @read
29 @echo ""
30 @echo ""
31 @echo "The hidd.deps file contain the runtime dependancies"
32 @echo "between the hidds"
33 @echo ""
34 @echo "Example hidd.deps file:"
35 @echo ""
36 @echo ""
37 @cat $(DEPFILE)
38 @echo ""
39 @echo ""
40 @echo "Press a key"
41 @read
42 @echo ""
43 @echo "The hiddtool currently has three ways of invocation:"
44 @echo ""
45 @echo "hiddtool -k configfile"
46 @echo ""
47 @echo "This will result in a list of the kernel hidds sorted"
48 @echo "by dependancy like this:"
49 @echo ""
50 @$(EXE) -k $(CONFIGFILE)
51 @echo ""
52 @echo ""
53 @echo "hiddtool -d configfile"
54 @echo ""
55 @echo "This will result in a list of the disk hidds sorted"
56 @echo "by dependancy like this:"
57 @echo ""
58 @$(EXE) -d $(CONFIGFILE)
59 @echo ""
60 @echo ""
61 @echo "Press a key"
62 @read
63 @echo "hiddtool -m configfile"
64 @echo ""
65 @echo "This will generate a set of metamake dependencies to build"
66 @echo "the necessary hidds"
67 @echo ""
68 @$(EXE) -m $(CONFIGFILE)
69 @echo ""
70 @echo ""
71 @echo "These can be inserted in the config/arch/cpu mmakefile"
72 @echo "with a little change in genmf:"
73 @echo "One must have some builtin %shell template that"
74 @echo "executes a supplied shell command and where stdout"
75 @echo "will be generated into the mmakefile"
76 @echo "This again means that when config/arch/cpu/hidd.conf"
77 @echo "is changed, genmf should be called to regenrate the mmakefile"
78 @echo "One could alternatively put the rules into"
79 @echo "mmakefile.src manually, but then you are writing the"
80 @echo "same information twice"
81 @echo ""
82 @echo "Press a key"
83 @read
84 @echo ""
85 @echo "Dunno if this is 100% correct metamake syntax, but the point"
86 @echo "is that the first #MM hidd-kernel: target should call"
87 @echo "makes all the dependencies be built in the different"
88 @echo "hidd directories. The hidds are built into xxx.a libs"
89 @echo "like for example libhidd-base.a"
90 @echo "Then the user has to supply the rules"
91 @echo "hidd-kernel-local and hidd-disk-local"
92 @echo "to compile the hidds into kernel and disk hidds"
93 @echo "To obtain a list of all kernel hidd libs"
94 @echo "one can just use the shell inbuilt make command to"
95 @echo "get the hidds into a make variable"
96 @echo "and the use foreach to get libxxx-yyy.a."
97 @echo ""
98 @echo "One could also later add options to this tool"
99 @echo "to automatically build resident tables for the hidds"
100 @echo "The point is that you only need to change the hidd.conf file"
101 @echo "and recompile"
102 @echo ""
103 @echo "Also it could maybe be expanded to work for libs, devs etc."
104 @echo ""
107 test:
108 @echo $(KERNELHIDDS)
109 @echo $(KERNELHIDDLIBS)