Optimize Perl dependency of package lilo
[rrq/maintain_lilo.git] / Makefile
1 # -*- makefile -*-
2 #
3 # Copyright 2009-2011 Joachim Wiedorn
4 # All rights reserved.
5
6 # Licensed under the terms contained in the file 'COPYING'
7 # in the source directory.
8 #
9
10 #
11 #  make help
12 #
13 help:
14         @echo ""
15         @echo "Targets:"
16         @echo "  make all         # binaries (without dosexe, diag.)"
17         @echo "  make dosexe      # DOS lilo.com utility"
18         @echo "  make diagnostic  # standalone diagnostics"
19         @echo "  make alles       # all above + static binary"
20         @echo "  make docs        # doc/[user,tech].[pdf,dvi] docs"
21         @echo "  make floppy      # 2 standalone bootable diagnostic floppies"
22         @echo ""
23         @echo "  make install     # install binaries++ into root directory"
24         @echo "  make install DESTDIR=<dir>  # install binaries++ into directory"
25         @echo ""
26         @echo "  make uninstall     # remove binaries++ from root directory"
27         @echo "  make uninstall DESTDIR=<dir>  # rmove binaries++ from directory"
28         @echo ""
29         @echo "Maintenance:"
30         @echo "  make test        # test for all needed utilities (as86, ld86, etc.)"
31         @echo "  make tidy        # remove listings & other unnecessary files"
32         @echo "  make clean       # remove objects & ready for a fresh 'make all'"
33         @echo "  make distclean   # remove editor temps, & all of the above"
34         @echo ""
35
36 #
37 # everything needed to run, just short of installation
38 #
39 all: test
40         $(MAKE) -C src all
41         $(MAKE) -C images all
42
43 #
44 # everything above plus the statically linked version
45 #
46 alles: test
47         $(MAKE) -C src alles
48         $(MAKE) -C images all
49
50 #
51 # documentation files
52 #
53 docs:
54         $(MAKE) -C doc all
55
56 #
57 # if you have the 'bcc' compiler, then you can make the diagnostics, too
58 # bcc = Bruce Evans’ C 16bit compiler (also for BIOS- and DOS code)
59 #
60 it:     docs alles diagnostic dosexe
61
62 #
63 # make the bootable diagnostic floppies
64 #
65 floppy: test
66         @echo
67         @echo Make sure you have 2 blank, formatted, 1.44Mb floppies
68         @echo before you proceed from this point.
69         @echo "Press <Enter> to continue, <^C> to abort ..."
70         @read
71         @$(MAKE) -C src floppy1
72         @echo Done.
73         @echo
74         @echo Remove the floppy from the drive.  Label it "\"1.6\""
75         @echo "Press <Enter> to continue, <^C> to abort ..."
76         @read
77         @$(MAKE) -C src floppy2
78         @echo Done.
79         @echo
80         @echo Remove the floppy from the drive.  Label it "\"2.4\""
81         @echo
82
83 diagnostic: test
84         $(MAKE) -C src diagnostic
85
86 dosexe: test
87         $(MAKE) -C dos lilo
88
89 #
90 # test for compilers & utilities
91 #
92 test: test.img
93 test.img:
94         ./checkit
95         echo Tested >test.img   
96
97 #
98 # shorthand install, if one knows that one has the 'bcc' compiler
99 #
100 ins:
101         $(MAKE) -C src ins
102
103 #
104 #  normal install, but doesn't make the diagnostic binaries
105 #
106 install:  all
107         $(MAKE) -C src install
108         $(MAKE) -C images install
109         $(MAKE) -C hooks install
110         $(MAKE) -C sample install
111         $(MAKE) -C scripts install
112         $(MAKE) -C man install
113         $(MAKE) -C dos install
114
115 tidy:
116         $(MAKE) -C src tidy
117         $(MAKE) -C diagnose tidy
118         $(MAKE) -C dos tidy
119         $(MAKE) -C doc tidy
120
121 clean: tidy
122         rm -f test.img
123         $(MAKE) -C src clean
124         $(MAKE) -C images clean
125         $(MAKE) -C diagnose clean
126         $(MAKE) -C dos clean
127         $(MAKE) -C doc clean
128
129 spotless: distclean
130 distclean: clean
131         $(MAKE) -C src distclean
132         $(MAKE) -C diagnose distclean
133         $(MAKE) -C dos distclean
134
135 uninstall:
136         $(MAKE) -C src uninstall
137         $(MAKE) -C images uninstall
138         $(MAKE) -C hooks uninstall
139         $(MAKE) -C sample uninstall
140         $(MAKE) -C scripts uninstall
141         $(MAKE) -C man uninstall