summaryrefslogtreecommitdiff
path: root/console-client/Makefile
diff options
context:
space:
mode:
authorDiego Nieto Cid <dnietoc@gmail.com>2011-04-03 00:02:46 -0300
committerDiego Nieto Cid <dnietoc@gmail.com>2011-04-08 14:47:35 -0300
commit8582683290c390d8e5f551f35886eb2453f7f8e7 (patch)
tree02a0788bb5df15ddf08010e61b170e70d3848146 /console-client/Makefile
parentd6f6e1bf7e3eaacb2ce134e40737319e9cf306a8 (diff)
Depend on X11 for string to keysym mappings.
* config.make.in (HAVE_X11,X11_CFLAGS,X11_LIBS,XKB_BASE): New variables. * configure.in: Check for x11 module. * console-client/Makefile (PC_KBD_SO_SRCS): Move XKB sources... * console-client/Makefile (XKB_SRCS): ... here. New variable. * console-client/Makefile (SRCS): Add $(XKB_SRCS). * console-client/Makefile (LCLHDRS): Add xkb/xkb.h. * console-client/Makefile (XKB_DATA_DIR): Removed variable. * console-client/Makefile (pc_kbd.so.$(hurd-version)): Use patsubst. Depend on XKB objects when HAVE_X11 = yes. * console-client/Makefile (install): Depend on XKB datafiles when HAVE_X11 = yes. * console-client/Makefile (pc-kbd-CFLAGS): Set variable when HAVE_X11 = yes * console-client/Makefile ($(XKB_DATA_DIR),$(XKB_DATA_DIR)/%): Replaced by... * console-client/Makefile[HAVE_X11=yes]($(XKB_BASE),$(XKB_BASE)/%): ... this targets. * console-client/Makefile[HAVE_X11=yes](pc_kbd-LDLIBS): New variable. * console-client/xkb/keysymdef.h: Removed file. * console-client/xkb/ks_tables.h: Likewise. * console-client/xkb/symname.c: Likewise. * console-client/xkb/xkb.c: Include <X11/keysymdef.h>. * console-client/xkb/compose.c: Likewise. * console-client/xkb/xkb.h: Remove XStringToKeysym prototype. Include <X11/Xlib.h>.
Diffstat (limited to 'console-client/Makefile')
-rw-r--r--console-client/Makefile41
1 files changed, 24 insertions, 17 deletions
diff --git a/console-client/Makefile b/console-client/Makefile
index f4c8f7a3..b548ce22 100644
--- a/console-client/Makefile
+++ b/console-client/Makefile
@@ -22,10 +22,7 @@ makemode := utilities
targets = console
CONSOLE_SRCS = console.c timer.c driver.c trans.c
VGA_SO_SRCS = bdf.c vga-dynafont.c vga-dynacolor.c vga-support.c vga.c
-PC_KBD_SO_SRCS = pc-kbd.c kbd-repeat.c \
- xkb/compose.c xkb/kstoucs.c xkb/parser.y xkb/lex.l \
- xkb/symname.c xkb/xkb.c xkb/xkbdata.c xkb/xkbdefaults.c \
- xkb/xkbtimer.c
+PC_KBD_SO_SRCS = pc-kbd.c kbd-repeat.c
PC_MOUSE_SO_SRCS = pc-mouse.c
GENERIC_SPEAKER_SO_SRCS = generic-speaker.c
CURRENT_VCS_SO_SRCS = current-vcs.c
@@ -34,12 +31,13 @@ NCURSESW_SO_SRCS = ncursesw.c
endif
SRCS = $(CONSOLE_SRCS) \
$(VGA_SO_SRCS) $(PC_KBD_SO_SRCS) $(PC_MOUSE_SO_SRCS) \
- $(GENERIC_SPEAKER_SO_SRCS) $(CURRENT_VCS_SO_SRCS) $(NCURSESW_SO_SRCS)
+ $(GENERIC_SPEAKER_SO_SRCS) $(CURRENT_VCS_SO_SRCS) $(NCURSESW_SO_SRCS) \
+ $(XKB_SRCS)
LCLHDRS = timer.h driver.h display.h input.h bell.h \
unicode.h bdf.h mach-inputdev.h \
vga-dynafont.h vga-dynacolor.h vga-hw.h vga-support.h \
trans.h \
- xkb/keysymdef.h xkb/ks_tables.h xkb/xkb.h
+ xkb/xkb.h
VPATH += $(srcdir)/xkb
OBJS = $(addsuffix .o,$(basename $(notdir $(SRCS)))) kdioctlServer.o
@@ -51,7 +49,6 @@ console-LDFLAGS = -Wl,-E
CPPFLAGS += -I$(srcdir)/xkb
LFLAGS = -i
YFLAGS = -by
-XKB_DATA_DIR = $(datadir)/X11/xkb
XKB_DATA_FILES = keymap/hurd types/hurd symbols/hurd
# In seeking, thou shalt find it!
@@ -74,9 +71,8 @@ console: $(CONSOLE_SRCS:.c=.o) \
modules = vga pc_kbd generic_speaker pc_mouse current_vcs
vga-CPPFLAGS = -DDEFAULT_VGA_FONT_DIR=\"${datadir}/hurd/\"
-pc-kbd-CFLAGS = -DXKB_SUPPORT -DXKB_DATA_DIR=\"$(XKB_DATA_DIR)\"
vga.so.$(hurd-version): $(patsubst %.c,%_pic.o,$(VGA_SO_SRCS))
-pc_kbd.so.$(hurd-version): $(addsuffix _pic.o, $(basename $(notdir $(PC_KBD_SO_SRCS)))) \
+pc_kbd.so.$(hurd-version): $(patsubst %.c,%_pic.o,$(PC_KBD_SO_SRCS)) \
kdioctlServer_pic.o
pc_mouse.so.$(hurd-version): $(patsubst %.c,%_pic.o,$(PC_MOUSE_SO_SRCS))
generic_speaker.so.$(hurd-version): $(patsubst %.c,%_pic.o,$(GENERIC_SPEAKER_SO_SRCS))
@@ -93,8 +89,7 @@ all: $(addsuffix .so.$(hurd-version), $(modules))
cleantarg += $(addsuffix .so.$(hurd-version), $(modules))
-install: $(module-dir) $(addprefix $(module-dir)/,$(addsuffix .so.$(hurd-version),$(modules))) \
- $(XKB_DATA_DIR) $(addprefix $(XKB_DATA_DIR)/, $(XKB_DATA_FILES))
+install: $(module-dir) $(addprefix $(module-dir)/,$(addsuffix .so.$(hurd-version),$(modules)))
$(module-dir):
@$(MKINSTALLDIRS) $@
@@ -102,12 +97,6 @@ $(module-dir):
$(module-dir)/%: %
$(INSTALL_DATA) $< $@
-$(XKB_DATA_DIR):
- @$(MKINSTALLDIRS) $@
-
-$(XKB_DATA_DIR)/%: xkb/xkb-data/%
- $(INSTALL_DATA) $< $@
-
# You can use this rule to make a dynamically-loadable version of any
# of the modules.
%.so.$(hurd-version):
@@ -121,3 +110,21 @@ parser.tab.h: parser.y
mv y.tab.h $@; \
rm y.tab.c; \
fi
+
+XKB_SRCS = xkb/compose.c xkb/kstoucs.c xkb/parser.y xkb/lex.l \
+ xkb/xkb.c xkb/xkbdata.c xkb/xkbdefaults.c \
+ xkb/xkbtimer.c
+ifeq ($(HAVE_X11),yes)
+XKB_UNITS = $(basename $(notdir $(XKB_SRCS)))
+pc_kbd.so.$(hurd-version): $(addsuffix _pic.o,$(XKB_UNITS))
+pc-kbd-CFLAGS = -DXKB_SUPPORT -DXKB_DATA_DIR=\"$(XKB_BASE)\" $(X11_CFLAGS)
+$(foreach XKB_UNIT, $(XKB_UNITS), $(eval $(XKB_UNIT)-CFLAGS = $(X11_CFLAGS)))
+pc_kbd-LDLIBS = $(X11_LIBS)
+install: $(XKB_BASE) $(addprefix $(XKB_BASE)/, $(XKB_DATA_FILES))
+
+$(XKB_BASE):
+ @$(MKINSTALLDIRS) $@
+
+$(XKB_BASE)/%: xkb/xkb-data/%
+ $(INSTALL_DATA) $< $@
+endif