1 include ../make_include
3 # Something like /usr/lib/kbd or /usr/share/kbd
9 BINDIR = $(DESTDIR)/usr/bin
12 # Maybe we want to use a qwertz keyboard before /usr is mounted
13 ifndef LOADKEYS_BINDIR
14 ifeq ($(DESTDIR), /usr)
15 LOADKEYS_BINDIR = /bin
17 LOADKEYS_BINDIR = $(DESTDIR)/bin
21 PROGS = dumpkeys loadkeys showkey setfont showconsolefont \
22 setleds setmetamode kbd_mode chvt deallocvt \
23 psfxtable kbdrate fgconsole
25 # probably also getkeycodes and setkeycodes are arch-specific;
26 # they will work on an alpha, though, and perhaps be dummy on a sun
28 ifneq ($(ARCH), sparc)
29 PROGS += getkeycodes setkeycodes
37 OLDPROGS= mapscrn loadunimap
39 # Not installed by default
40 MISC = screendump setlogcons setvesablank spawn_console spawn_login \
41 getunimap clrunimap outpsfheader setpalette
43 # Installed by default
44 SHCMDS = unicode_start unicode_stop
46 WARN = -Wall -Wmissing-prototypes -Wstrict-prototypes
47 DEFS = -DDATADIR=\"$(DATA_DIR)\"
56 $(CC) -c $(WARN) $(CFLAGS) $(DEFS) $<
58 all: $(PROGS) $(OLDPROGS) $(MISC)
65 install -d -m 755 $(BINDIR) $(LOADKEYS_BINDIR)
66 install -s -m 0755 -o root $(PROGS) $(OLDPROGS) $(BINDIR)
67 # install -s -m 0755 -o root $(MISC) $(BINDIR)
68 install -c -m 0755 -o root $(SHCMDS) $(BINDIR)
69 for i in psfaddtable psfgettable psfstriptable; do \
70 rm -f $(BINDIR)/$$i; ln -s psfxtable $(BINDIR)/$$i; \
72 rm -f $(BINDIR)/loadkeys
73 install -s -m 0755 -o root loadkeys $(LOADKEYS_BINDIR)
74 @echo "You may also want to add psf.magic to /usr/lib/magic"
77 # loadkeys.o: separate rule since the flex output does not permit -Wall
78 loadkeys.o: loadkeys.c analyze.c
79 $(CC) -c $(CFLAGS) $(DEFS) $<
82 # mapscrn and loadunimap are now part of setfont
83 # but can be compiled separately, if desired
84 main_mapscrn.o: mapscrn.c paths.h
85 $(CC) $(CFLAGS) $(WARN) $(DEFS) -DMAIN -c $< -o $@
87 main_loadunimap.o: loadunimap.c paths.h
88 $(CC) $(CFLAGS) $(WARN) $(DEFS) -DMAIN -c $< -o $@
90 $(OLDPROGS): %: main_%.o findfile.o psffontop.o utf8.o
91 $(CC) $(LDFLAGS) $^ -o $@
94 clean reallyclean spotless distclean:
95 rm -f core *.o analyze.c loadkeys.c
96 rm -f $(PROGS) $(OLDPROGS) $(MISC) *~
104 ksyms.o: koi8.syms.h ethiopic.syms.h
106 findfile.o loadkeys.o loadunimap.o mapscrn.o resizecons.o setfont.o: findfile.h
108 catwithfont.o chvt.o clrunimap.o deallocvt.o dumpkeys.o fgconsole.o: getfd.h
109 getfd.o getkeycodes.o getunimap.o kbd_mode.o loadkeys.o loadunimap.o: getfd.h
110 mapscrn.o resizecons.o setfont.o setkeycodes.o setlogcons.o: getfd.h
111 setpalette.o setvesablank.o showconsolefont.o showkey.o: getfd.h
113 kdfontop.o setfont.o showconsolefont.o: kdfontop.h
115 clrunimap.o kdmapop.o loadunimap.o mapscrn.o: kdmapop.h
117 dumpkeys.o ksyms.o loadkeys.o: ksyms.h
119 dumpkeys.o loadkeys.o: modifiers.h
121 catwithfont.o chvt.o clrunimap.o deallocvt.o dumpkeys.o fgconsole.o: nls.h
122 findfile.o getfd.o getkeycodes.o getunimap.o kbd_mode.o kbdrate.o: nls.h
123 kdfontop.o ksyms.o loadkeys.o loadunimap.o mapscrn.o psffontop.o: nls.h
124 psfxtable.o resizecons.o screendump.o setfont.o setkeycodes.o setleds.o: nls.h
125 setmetamode.o setvesablank.o showconsolefont.o showkey.o xmalloc.o: nls.h
127 loadkeys.o loadunimap.o mapscrn.o resizecons.o setfont.o: paths.h
129 loadunimap.o psffontop.o psfxtable.o setfont.o: psf.h
131 psffontop.o psfxtable.o setfont.o: psffontop.h
133 loadunimap.o psffontop.o utf8.o: utf8.h
135 chvt.o deallocvt.o dumpkeys.o getkeycodes.o getunimap.o kbd_mode.o: version.h
136 kbdrate.o loadkeys.o loadunimap.o mapscrn.o psfxtable.o resizecons.o: version.h
137 screendump.o setfont.o setkeycodes.o setleds.o setmetamode.o: version.h
138 showconsolefont.o showkey.o totextmode.o: version.h
140 findfile.o kdfontop.o loadunimap.o psffontop.o psfxtable.o: xmalloc.h
141 setfont.o xmalloc.o: xmalloc.h
144 # constituent object files
147 dumpkeys loadkeys: ksyms.o xmalloc.o
149 getunimap screendump showconsolefont: xmalloc.o
151 psfxtable: psffontop.o xmalloc.o utf8.o
153 loadkeys mapscrn setfont resizecons loadunimap: findfile.o xmalloc.o
155 chvt clrunimap deallocvt dumpkeys fgconsole getkeycodes getunimap: getfd.o
156 kbd_mode loadkeys loadunimap mapscrn resizecons setkeycodes setfont: getfd.o
157 setpalette showconsolefont setlogcons setvesablank showkey: getfd.o
159 setfont: mapscrn.o loadunimap.o kdmapop.o kdfontop.o psffontop.o utf8.o
163 getunimap mapscrn clrunimap loadunimap showconsolefont: kdmapop.o
165 catwithfont showconsolefont: kdfontop.o