diff options
| author | Stephen Leake | 2015-06-09 17:32:30 -0500 |
|---|---|---|
| committer | Stephen Leake | 2015-06-09 17:32:30 -0500 |
| commit | f128e085bc0674967b988a72f8074a7d0cc8eba3 (patch) | |
| tree | 09dbdeccc79ed5801582dc5aa860a4b04cafc5ef /modules/basic/Makefile | |
| parent | 76f2d766ad6691eae6ae4006264f59724cc73a23 (diff) | |
| download | emacs-scratch/dynamic-modules-2.tar.gz emacs-scratch/dynamic-modules-2.zip | |
Add loadable modules using Daniel Colascione's ideas.scratch/dynamic-modules-2
See https://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00960.html
* src/Makefile.in (base_obj): add module.o
(LIBES): add -lltdl
* src/emacs.c (main): add syms_of_module
* src/lisp.h: add syms_of_module
* src/emacs_module.h: New file; emacs API for modules.
* src/module.c: New file; implement API.
* modules/basic/Makefile: New file; build example module on Linux.
* modules/basic/basic.c: New file; simple example module.
Diffstat (limited to 'modules/basic/Makefile')
| -rw-r--r-- | modules/basic/Makefile | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/basic/Makefile b/modules/basic/Makefile new file mode 100644 index 00000000000..bb136f3577f --- /dev/null +++ b/modules/basic/Makefile | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | ROOT = ../.. | ||
| 2 | |||
| 3 | CFLAGS = | ||
| 4 | LDFLAGS = | ||
| 5 | |||
| 6 | all: basic.so basic.doc | ||
| 7 | |||
| 8 | %.so: %.o | ||
| 9 | gcc -shared $(LDFLAGS) -o $@ $< | ||
| 10 | |||
| 11 | %.o: %.c | ||
| 12 | gcc -ggdb3 -Wall -I$(ROOT)/src $(CFLAGS) -fPIC -c $< | ||
| 13 | |||
| 14 | %.doc: %.c | ||
| 15 | $(ROOT)/lib-src/make-docfile $< > $@ | ||