388
|
1 #
|
|
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
|
|
8 # 'installed'.
|
|
9 #
|
|
10
|
|
11 CC=../../lib-src/ellcc
|
|
12 CFLAGS=-I. -I../../src
|
|
13 LD=$(CC) --mode=link
|
|
14 MKINIT=$(CC) --mode=init
|
|
15
|
|
16 SRCS=base64.c
|
|
17 OBJS=$(SRCS:.c=.o)
|
|
18
|
|
19 .c.o:
|
|
20 $(CC) $(CFLAGS) -c $<
|
|
21
|
|
22 MODNAME=base64
|
|
23 MODVER=1.0.0
|
|
24 MODTITLE="Encode objects in Base 64"
|
|
25
|
|
26 all: $(MODNAME).ell
|
|
27
|
398
|
28 distclean: clean
|
|
29
|
388
|
30 clean:
|
|
31 rm -f $(MODNAME).ell $(OBJS) base64_i.o base64_i.c
|
|
32
|
|
33 $(MODNAME).ell: $(OBJS) base64_i.o
|
|
34 $(LD) --mod-output=$@ $(OBJS) base64_i.o
|
|
35
|
|
36 base64_i.o: base64_i.c
|
|
37 base64_i.c: $(SRCS)
|
|
38 ELLMAKEDOC=../../lib-src/make-docfile $(MKINIT) --mod-output=$@ \
|
|
39 --mod-name=$(MODNAME) --mod-version=$(MODVER) \
|
|
40 --mod-title=$(MODTITLE) $(SRCS)
|
|
41
|