diff options
Diffstat (limited to 'console-client/Makefile')
-rw-r--r-- | console-client/Makefile | 41 |
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 |