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