diff options
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile index e284530164..d66b270483 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1385,6 +1385,20 @@ CARBONGUI_BUNDLE = gui_bundle APPDIR = $(VIMNAME).app CARBONGUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET) +### Haiku GUI +HAIKUGUI_SRC = gui.c gui_haiku.cc +HAIKUGUI_OBJ = objects/gui.o objects/gui_haiku.o +HAIKUGUI_DEFS = -DFEAT_GUI_HAIKU +HAIKUGUI_IPATH = +HAIKUGUI_LIBS_DIR = +HAIKUGUI_LIBS1 = -lbe -lroot -ltracker -ltranslation -lsupc++ -lstdc++ +HAIKUGUI_LIBS2 = +HAIKUGUI_INSTALL = install_normal install_haiku_extra +HAIKUGUI_TARGETS = installglinks_haiku +HAIKUGUI_MAN_TARGETS = +HAIKUGUI_TESTTARGET = gui +HAIKUGUI_BUNDLE = + # All GUI files ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro @@ -3217,6 +3231,9 @@ objects/gui_gtk_gresources.o: auto/gui_gtk_gresources.c objects/gui_gtk_x11.o: gui_gtk_x11.c $(CCC) -o $@ gui_gtk_x11.c +objects/gui_haiku.o: gui_haiku.cc + $(CCC) -o $@ gui_haiku.cc + objects/gui_motif.o: gui_motif.c $(CCC) -o $@ gui_motif.c @@ -3349,6 +3366,9 @@ objects/os_beos.o: os_beos.c objects/os_qnx.o: os_qnx.c $(CCC) -o $@ os_qnx.c +objects/os_haiku.rsrc: os_haiku.rdef + cat $< | $(CCC) -E - | grep -v '^#' | rc -o "$@" - + objects/os_macosx.o: os_macosx.m $(CCC) -o $@ os_macosx.m @@ -3617,6 +3637,61 @@ $(APPDIR)/Contents: objects/gui_gtk_x11.o: version.h ############################################################################### +# +# Haiku installation +# +# This rule: +# - add resources to already installed vim binary to avoid +# stripping them during install; +# - copy rgb.txt to runtime directory; +# - update system MIME database with info about vim application. +# +install_haiku_extra: $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc + xres -o $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc + $(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(DEST_RT) + mimeset $(DEST_BIN)/$(VIMTARGET) + +# List of g*-links that should be replaced with shell script equivalents. +# This solves the problem of them from Tracker. +# +HAIKU_GLINKS = $(DEST_BIN)/$(GVIMTARGET) \ + $(DEST_BIN)/$(GVIEWTARGET) \ + $(DEST_BIN)/$(GVIMDIFFTARGET) \ + $(DEST_BIN)/$(RGVIMTARGET) \ + $(DEST_BIN)/$(RGVIEWTARGET) + +# This rule: +# - Replace gvim link with copy of vim binary. +# - Replace g*-links with shell script equivalents to solve the +# problem of calling them from Tracker, +# - Add icon resources to mentioned g*-link shell scripts +# - in case gui-less vim.con executable available use it. +# +installglinks_haiku: $(HAIKU_GLINKS) install_haiku_extra + @catattr -r "BEOS:ICON" $(DEST_BIN)/$(GVIMTARGET) > ~icon.attr + for i in $(HAIKU_GLINKS); do \ + rm $$i ; \ + echo "#!/bin/sh" > $$i ; \ + case $$i in \ + $(DEST_BIN)/$(GVIMTARGET)) \ + cp $(DEST_BIN)/$(VIMTARGET) $$i ; \ + if [ -f $(VIMTARGET).con ] ; then \ + $(STRIP) $(VIMTARGET).con ; \ + mv $(VIMTARGET).con $(DEST_BIN)/$(VIMTARGET) ; \ + fi ;; \ + $(DEST_BIN)/$(GVIEWTARGET)) printf "%s -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ + $(DEST_BIN)/$(GVIMDIFFTARGET)) printf "%s -d %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ + $(DEST_BIN)/$(RGVIMTARGET)) printf "%s -Z %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ + $(DEST_BIN)/$(RGVIEWTARGET)) printf "%s -Z -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ + *) printf "%s %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ + esac ; \ + chmod $(BINMOD) $$i ; \ + addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $$i ; \ + done + addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $(DEST_BIN)/$(VIMNAME)tutor + @rm ~icon.attr + +############################################################################### ### (automatically generated by 'make depend') ### Dependencies: objects/arabic.o: arabic.c vim.h protodef.h auto/config.h feature.h os_unix.h \ |