3 include $(SRCDIR)/config/aros.cfg
5 DISK_FILES := disk_startup
6 DISK_EXEDIR := $(AROS_DEVS)/Monitors
8 #MM- hidd-x11gfx-yes : kernel-x11gfx
9 #MM devs-monitors-x11 : iconset-$(AROS_TARGET_ICONSET)-x11
11 %build_prog mmake=devs-monitors-x11 \
12 progname=X11 targetdir=$(DISK_EXEDIR) \
15 USER_CPPFLAGS := -DHOST_OS_$(ARCH)
16 USER_INCLUDES := -isystem $(GENINCDIR) $(KERNEL_INCLUDES)
17 USER_CFLAGS := $(HOST_X11_CFLAGS)
18 ## The '-Wno-attributes' is here due to a gcc 4.5.x bug
19 ## where its strcmp() builtin generates a number of spurious
20 ## complaints with -O1 or higher optimizations enabled.
21 USER_CFLAGS += -Wno-attributes
23 USER_LDFLAGS := -static
25 # TODO: What if the system is pure Darwin running a regular PC?
27 USER_CPPFLAGS += -D_FORTIFY_SOURCE=0
28 X11KEYMAPTABLE_SRC_FILE := mac-x11-keycode2rawkey.table
30 X11KEYMAPTABLE_SRC_FILE := def-x11-keycode2rawkey.table
33 X11KEYMAPTABLE_FILE := $(AROS_DEVS)/Keymaps/X11/keycode2rawkey.table
34 X11KEYMAPTABLE_ALT_FILE := $(AROS_DEVS)/Keymaps/X11/keycode2rawkey-alt.table
35 X11KEYMAPTABLE_ALT_NB_FILE := $(AROS_DEVS)/Keymaps/X11/keycode2rawkey-alt-nb.table
53 #MM kernel-x11gfx : x11keymaptable devs-monitors-x11
54 #MM kernel-x11gfx-kobj : x11keymaptable devs-monitors-x11
56 %build_module mmake=kernel-x11gfx \
57 modname=x11gfx modtype=hidd version=$(AROS_TARGET_PLATFORM) \
58 files=$(FILES) uselibs="hiddstubs"
61 x11keymaptable : setup-x11keymaptable $(TOOLDIR)/makexkeytable $(X11KEYMAPTABLE_FILE) $(X11KEYMAPTABLE_ALT_FILE) $(X11KEYMAPTABLE_ALT_NB_FILE)
64 #MM change-x11keymaptable
65 change-x11keymaptable : setup-x11keymaptable $(TOOLDIR)/makexkeytable
66 $(TOOLDIR)/makexkeytable -o $(X11KEYMAPTABLE_FILE)
68 #MM default-x11keymaptable
69 default-x11keymaptable : $(X11KEYMAPTABLE_FILE)
72 $(X11KEYMAPTABLE_FILE) : $(X11KEYMAPTABLE_SRC_FILE) setup-x11keymaptable
75 $(X11KEYMAPTABLE_ALT_FILE) : alt-x11-keycode2rawkey.table setup-x11keymaptable
78 $(X11KEYMAPTABLE_ALT_NB_FILE) : alt-nb-x11-keycode2rawkey.table setup-x11keymaptable
81 #MM backup-x11keymaptable
82 backup-x11keymaptable :
83 @$(IF) $(TEST) -f $(X11KEYMAPTABLE_FILE) ; then \
84 $(CP) $(X11KEYMAPTABLE_FILE) ~/aros-x11-keycode2rawkey.table ; \
86 $(ECHO) "Made backup of x11 keymaptable to \"~/aros-x11-keycode2rawkey.table\"" ; \
89 $(ECHO) "There is no x11 keymaptable existing (\"$(X11KEYMAPTABLE_FILE)\")!?" ; \
92 #MM restore-x11keymaptable
93 restore-x11keymaptable : setup-x11keymaptable
94 @$(IF) $(TEST) -f ~/aros-x11-keycode2rawkey.table ; then \
95 $(CP) ~/aros-x11-keycode2rawkey.table $(X11KEYMAPTABLE_FILE) ; \
97 $(ECHO) "Restored x11 keymaptable from \"~/aros-x11-keycode2rawkey.table\"" ; \
100 $(ECHO) "There is no x11 keymaptable backup existing (\"~/aros-x11-keycode2rawkey.table\")!?" ; \
103 setup-x11keymaptable :
104 %mkdirs_q $(AROS_DEVS)/Keymaps $(AROS_DEVS)/Keymaps/X11
106 $(TOOLDIR)/makexkeytable: makexkeytable.c
107 $(HOST_CC) $(HOST_CFLAGS) $(USER_CFLAGS) $< -o $@ $(HOST_X11_LDFLAGS)