Emacs: custom ldflags option for C compilation.
Emacs: GLSL mode. Switchdriver: update to match mesa packages.master
parent
989691a67e
commit
22b6291669
|
@ -379,24 +379,35 @@ properly escaped with double-quotes in case it has spaces."
|
|||
;; Identation style
|
||||
(setq c-default-style "linux" c-basic-offset 4)
|
||||
|
||||
(add-hook
|
||||
'c-mode-hook
|
||||
(lambda ()
|
||||
(unless (file-exists-p "Makefile")
|
||||
(defcustom c-compile-ldflags nil
|
||||
"[Local variable] Custom linker flags for C compilation."
|
||||
:safe 'stringp)
|
||||
|
||||
(defun c-compile ()
|
||||
(interactive)
|
||||
(progn
|
||||
(unless (or (file-exists-p "Makefile") (file-exists-p "makefile") (file-exists-p "GNUMakefile"))
|
||||
(set (make-local-variable 'compile-command)
|
||||
;; emulate make's .c.o implicit pattern rule, but with
|
||||
;; Emulate make's .c.o implicit pattern rule, but with
|
||||
;; different defaults for the CC, CPPFLAGS, and CFLAGS
|
||||
;; variables:
|
||||
;; $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $<
|
||||
(let ((file (file-name-nondirectory buffer-file-name)))
|
||||
(format "%s -o %s %s %s %s"
|
||||
;; (setq compile-command
|
||||
(let
|
||||
((file (file-name-nondirectory buffer-file-name)))
|
||||
(format "%s -o %s %s %s %s %s"
|
||||
(or (getenv "CC") "gcc")
|
||||
(file-name-sans-extension file)
|
||||
(or (getenv "CPPFLAGS") "-DDEBUG=9")
|
||||
(or (getenv "CFLAGS") "-ansi -pedantic -std=c99 -Wall -Wextra -Wshadow -lm -pthread -g3 -O0")
|
||||
(or (getenv "CFLAGS") "-ansi -pedantic -std=c99 -Wall -Wextra -Wshadow -g3 -O0")
|
||||
(or (getenv "LDFLAGS") c-compile-ldflags)
|
||||
file))))
|
||||
(compile compile-command)))
|
||||
|
||||
(local-set-key (kbd "C-c C-c") 'compile)
|
||||
(add-hook
|
||||
'c-mode-hook
|
||||
(lambda ()
|
||||
(local-set-key (kbd "C-c C-c") 'c-compile)
|
||||
(local-set-key (kbd "M-TAB") 'semantic-complete-analyze-inline)
|
||||
(local-set-key "." 'semantic-complete-self-insert)
|
||||
(local-set-key ">" 'semantic-complete-self-insert)
|
||||
|
@ -478,3 +489,11 @@ properly escaped with double-quotes in case it has spaces."
|
|||
|
||||
;; Indent comments.
|
||||
(setq sh-indent-comment t)
|
||||
|
||||
;;==============================================================================
|
||||
;; GLSL
|
||||
;;==============================================================================
|
||||
|
||||
(autoload 'glsl-mode "glsl-mode" nil t)
|
||||
(add-to-list 'auto-mode-alist '("\\.vert\\'" . glsl-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.frag\\'" . glsl-mode))
|
||||
|
|
|
@ -27,10 +27,10 @@ if [ $(pacman -Qi catalyst-utils 2>/dev/null|wc -l) -ge 2 ]; then
|
|||
fi
|
||||
else
|
||||
pacman -Rs --noconfirm ati-dri lib32-ati-dri xf86-video-ati
|
||||
pacman -Rdd --noconfirm libgl lib32-libgl
|
||||
pacman -Rdd --noconfirm mesa-libgl lib32-mesa-libgl
|
||||
pacman -S --noconfirm catalyst-utils catalyst-dkms lib32-catalyst-utils
|
||||
aticonfig --initial
|
||||
if [ -f "/boot/syslinux/syslinux.cfg" ]; then
|
||||
if [ $? -eq 0 ] && [ -f "/boot/syslinux/syslinux.cfg" ]; then
|
||||
sed -i '/^LABEL arch$/{n;n;n;s/$/ nomodeset/}' "/boot/syslinux/syslinux.cfg"
|
||||
echo
|
||||
echo "#### Syslinux entry:"
|
||||
|
|
Loading…
Reference in New Issue