2 # Sample makefile for a simple Emacs module.
3 # This is slightly more complicated than would normally be the case,
4 # as this makefile has been tailored to work in the Emacs source tree.
5 # For samples of how to compile modules outside of the source tree
6 # (as would be the case if a user had downloaded a module and wanted
7 # to compile it for use within Emacs), see the samples in the sub-directory
13 CC=../../lib-src/ellcc
14 CFLAGS=-I. -I../../src
16 MKINIT=$(CC) --mode=init
26 MODTITLE="Sample loadable module"
33 $(RM) $(MODNAME).ell $(OBJS) sample_i.o sample_i.c
35 $(MODNAME).ell: $(OBJS) sample_i.o
36 $(LD) --mod-output=$@ $(OBJS) sample_i.o
38 sample_i.o: sample_i.c
40 ELLMAKEDOC=../../lib-src/make-docfile $(MKINIT) --mod-output=$@ \
41 --mod-name=$(MODNAME) --mod-version=$(MODVER) \
42 --mod-title=$(MODTITLE) $(SRCS)