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_CFLAGS = -DHOST_OS_$(ARCH) -isystem $(GENINCDIR) $(HOST_X11_CFLAGS) $(KERNEL_INCLUDES)
16 ## The '-Wno-attributes' is here due to a gcc 4.5.x bug
17 ## where its strcmp() builtin generates a number of spurious
18 ## complaints with -O1 or higher optimizations enabled.
19 USER_CFLAGS += -Wno-attributes
21 USER_LDFLAGS := -static
23 # TODO: What if the system is pure Darwin running a regular PC?
25 USER_CFLAGS += -D_FORTIFY_SOURCE=0
26 X11KEYMAPTABLE_SRC_FILE := mac-x11-keycode2rawkey.table
28 X11KEYMAPTABLE_SRC_FILE := def-x11-keycode2rawkey.table
31 X11KEYMAPTABLE_FILE := $(AROS_DEVS)/Keymaps/X11/keycode2rawkey.table
32 X11KEYMAPTABLE_ALT_FILE := $(AROS_DEVS)/Keymaps/X11/keycode2rawkey-alt.table
33 X11KEYMAPTABLE_ALT_NB_FILE := $(AROS_DEVS)/Keymaps/X11/keycode2rawkey-alt-nb.table
35 FILES := startup x11_hostlib x11_init x11 support x11gfx onbitmap offbitmap \
36 x11kbd x11mouse x11clipboard xshm fullscreen bitmap_common
38 #MM kernel-x11gfx : x11keymaptable devs-monitors-x11
39 #MM kernel-x11gfx-kobj : x11keymaptable devs-monitors-x11
41 %build_module mmake=kernel-x11gfx \
42 modname=x11gfx modtype=hidd version=$(AROS_TARGET_PLATFORM) \
43 files=$(FILES) uselibs="hiddstubs"
46 x11keymaptable : setup-x11keymaptable $(TOOLDIR)/makexkeytable $(X11KEYMAPTABLE_FILE) $(X11KEYMAPTABLE_ALT_FILE) $(X11KEYMAPTABLE_ALT_NB_FILE)
49 #MM change-x11keymaptable
50 change-x11keymaptable : setup-x11keymaptable $(TOOLDIR)/makexkeytable
51 $(TOOLDIR)/makexkeytable -o $(X11KEYMAPTABLE_FILE)
53 #MM default-x11keymaptable
54 default-x11keymaptable : $(X11KEYMAPTABLE_FILE)
57 $(X11KEYMAPTABLE_FILE) : $(X11KEYMAPTABLE_SRC_FILE) setup-x11keymaptable
60 $(X11KEYMAPTABLE_ALT_FILE) : alt-x11-keycode2rawkey.table setup-x11keymaptable
63 $(X11KEYMAPTABLE_ALT_NB_FILE) : alt-nb-x11-keycode2rawkey.table setup-x11keymaptable
66 #MM backup-x11keymaptable
67 backup-x11keymaptable :
68 @$(IF) $(TEST) -f $(X11KEYMAPTABLE_FILE) ; then \
69 $(CP) $(X11KEYMAPTABLE_FILE) ~/aros-x11-keycode2rawkey.table ; \
71 $(ECHO) "Made backup of x11 keymaptable to \"~/aros-x11-keycode2rawkey.table\"" ; \
74 $(ECHO) "There is no x11 keymaptable existing (\"$(X11KEYMAPTABLE_FILE)\")!?" ; \
77 #MM restore-x11keymaptable
78 restore-x11keymaptable : setup-x11keymaptable
79 @$(IF) $(TEST) -f ~/aros-x11-keycode2rawkey.table ; then \
80 $(CP) ~/aros-x11-keycode2rawkey.table $(X11KEYMAPTABLE_FILE) ; \
82 $(ECHO) "Restored x11 keymaptable from \"~/aros-x11-keycode2rawkey.table\"" ; \
85 $(ECHO) "There is no x11 keymaptable backup existing (\"~/aros-x11-keycode2rawkey.table\")!?" ; \
88 setup-x11keymaptable :
89 %mkdirs_q $(AROS_DEVS)/Keymaps $(AROS_DEVS)/Keymaps/X11
91 $(TOOLDIR)/makexkeytable: makexkeytable.c
92 $(HOST_CC) $(HOST_CFLAGS) $(USER_CFLAGS) $< -o $@ $(HOST_X11_LDFLAGS)