# this file: # https://dataswamp.org/~incal/emacs-init/random-urandom/Makefile name = random-urandom incl = include so = $(name).so src = $(name).c make-opts = --silent cc = gcc warnings = -Wall -Wextra ccflags = -shared -fPIC -std=c99 -Os $(warnings) -I $(incl) ldflags = -s comp = $(cc) $(ccflags) $(ldflags) all: $(so) $(so): $(src) $(comp) -o $@ $< clean: rm -f $(so) again: $(MAKE) $(make-opts) clean $(MAKE) $(make-opts) all run: $(MAKE) $(make-opts) emacs --module-assertion --eval "(progn (setq load-path \`(\"./\" ,@load-path)) (load \"random-urandom\") (let ((buf (get-buffer-create \"*random-urandom*\"))) (with-current-buffer buf (insert \"(random-urandom) ; eval me\") (forward-char -10)) (pop-to-buffer buf)))"