1 include ../make_include
5 # Something like /usr/lib/kbd or /usr/share/kbd
11 BINDIR = $(DESTDIR)$(PREFIX)/bin
14 # Maybe we want to use a qwertz keyboard before /usr is mounted
15 ifndef LOADKEYS_BINDIR
16 ifeq ($(PREFIX), /usr)
17 LOADKEYS_BINDIR = $(DESTDIR)/bin
19 LOADKEYS_BINDIR = $(DESTDIR)$(PREFIX)/bin
23 # Omit the "-o root" when installing elsewhere
30 PROGS = dumpkeys loadkeys showkey setfont showconsolefont \
31 setleds setmetamode kbd_mode chvt deallocvt \
32 psfxtable kbdrate fgconsole
34 # probably also getkeycodes and setkeycodes are arch-specific;
35 # they will work on an alpha, though, and perhaps be dummy on a sun
37 ifneq ($(ARCH), sparc)
38 PROGS += getkeycodes setkeycodes
46 OLDPROGS= mapscrn loadunimap
48 # Not installed by default
49 MISC = screendump setlogcons setvesablank spawn_console spawn_login \
50 getunimap clrunimap outpsfheader setpalette
52 # Installed by default
53 SHCMDS = unicode_start unicode_stop
55 WARN = -Wall -Wmissing-prototypes -Wstrict-prototypes
56 DEFS = -DDATADIR=\"$(DATA_DIR)\"
65 $(CC) -c $(WARN) $(CFLAGS) $(DEFS) $<
67 all: $(PROGS) $(OLDPROGS) $(MISC)
74 install -d -m 0755 $(BINDIR) $(LOADKEYS_BINDIR)
75 install -s -m 0755 $(setowner) $(PROGS) $(OLDPROGS) $(BINDIR)
76 # install -s -m 0755 $(setowner) $(MISC) $(BINDIR)
77 install -c -m 0755 $(setowner) $(SHCMDS) $(BINDIR)
78 for i in psfaddtable psfgettable psfstriptable; do \
79 rm -f $(BINDIR)/$$i; ln -s psfxtable $(BINDIR)/$$i; \
81 rm -f $(BINDIR)/loadkeys
82 install -s -m 0755 $(setowner) loadkeys $(LOADKEYS_BINDIR)
83 @echo "You may also want to add psf.magic to /usr/lib/magic"
86 # loadkeys.o: separate rule since the flex output does not permit -Wall
87 loadkeys.o: loadkeys.c analyze.c
88 $(CC) -c $(CFLAGS) $(DEFS) $<
91 # mapscrn and loadunimap are now part of setfont
92 # but can be compiled separately, if desired
93 main_mapscrn.o: mapscrn.c paths.h
94 $(CC) $(CFLAGS) $(WARN) $(DEFS) -DMAIN -c $< -o $@
96 main_loadunimap.o: loadunimap.c paths.h
97 $(CC) $(CFLAGS) $(WARN) $(DEFS) -DMAIN -c $< -o $@
99 $(OLDPROGS): %: main_%.o findfile.o psffontop.o utf8.o
100 $(CC) $(LDFLAGS) $^ -o $@
103 clean reallyclean spotless distclean:
104 rm -f core *.o analyze.c loadkeys.c
105 rm -f $(PROGS) $(OLDPROGS) $(MISC) *~
113 ksyms.o: koi8.syms.h ethiopic.syms.h
115 findfile.o loadkeys.o loadunimap.o mapscrn.o resizecons.o setfont.o: findfile.h
117 catwithfont.o chvt.o clrunimap.o deallocvt.o dumpkeys.o fgconsole.o: getfd.h
118 getfd.o getkeycodes.o getunimap.o kbd_mode.o loadkeys.o loadunimap.o: getfd.h
119 mapscrn.o resizecons.o setfont.o setkeycodes.o setlogcons.o: getfd.h
120 setpalette.o setvesablank.o showconsolefont.o showkey.o: getfd.h
122 kdfontop.o setfont.o showconsolefont.o: kdfontop.h
124 clrunimap.o kdmapop.o loadunimap.o mapscrn.o: kdmapop.h
126 dumpkeys.o ksyms.o loadkeys.o: ksyms.h
128 dumpkeys.o loadkeys.o: modifiers.h
130 catwithfont.o chvt.o clrunimap.o deallocvt.o dumpkeys.o fgconsole.o: nls.h
131 findfile.o getfd.o getkeycodes.o getunimap.o kbd_mode.o kbdrate.o: nls.h
132 kdfontop.o ksyms.o loadkeys.o loadunimap.o mapscrn.o psffontop.o: nls.h
133 psfxtable.o resizecons.o screendump.o setfont.o setkeycodes.o setleds.o: nls.h
134 setmetamode.o setvesablank.o showconsolefont.o showkey.o xmalloc.o: nls.h
136 loadkeys.o loadunimap.o mapscrn.o resizecons.o setfont.o: paths.h
138 loadunimap.o psffontop.o psfxtable.o setfont.o: psf.h
140 psffontop.o psfxtable.o setfont.o: psffontop.h
142 loadunimap.o psffontop.o utf8.o: utf8.h
144 chvt.o deallocvt.o dumpkeys.o getkeycodes.o getunimap.o kbd_mode.o: version.h
145 kbdrate.o loadkeys.o loadunimap.o mapscrn.o psfxtable.o resizecons.o: version.h
146 screendump.o setfont.o setkeycodes.o setleds.o setmetamode.o: version.h
147 showconsolefont.o showkey.o totextmode.o: version.h
149 findfile.o kdfontop.o loadunimap.o psffontop.o psfxtable.o: xmalloc.h
150 setfont.o xmalloc.o: xmalloc.h
153 # constituent object files
156 dumpkeys loadkeys: ksyms.o xmalloc.o
158 getunimap screendump showconsolefont: xmalloc.o
160 psfxtable: psffontop.o xmalloc.o utf8.o
162 loadkeys mapscrn setfont resizecons loadunimap: findfile.o xmalloc.o
164 chvt clrunimap deallocvt dumpkeys fgconsole getkeycodes getunimap: getfd.o
165 kbd_mode loadkeys loadunimap mapscrn resizecons setkeycodes setfont: getfd.o
166 setpalette showconsolefont setlogcons setvesablank showkey: getfd.o
168 setfont: mapscrn.o loadunimap.o kdmapop.o kdfontop.o psffontop.o utf8.o
172 getunimap mapscrn clrunimap loadunimap showconsolefont: kdmapop.o
174 catwithfont showconsolefont: kdfontop.o