996
|
1 ## Makefile for the sample module in XEmacs.
|
|
2 ## Copyright (C) 2002 Jerry James.
|
|
3
|
|
4 ## This file is not part of XEmacs.
|
|
5
|
|
6 ### Specialize this part for your module
|
|
7 MODNAME=sample
|
|
8 MODVER=0.0.1
|
|
9 MODTITLE="Sample module for XEmacs"
|
|
10 SRCS=sample.c
|
|
11
|
|
12 ### You should not need to modify anything below this line
|
|
13 SHELL=/bin/sh
|
|
14 RM=rm -f
|
|
15 CFLAGS=@CFLAGS@
|
|
16 LDFLAGS=@LDFLAGS@
|
|
17
|
|
18 srcdir=@srcdir@
|
|
19 VPATH=@srcdir@
|
|
20
|
1490
|
21 SRC_SRCS=$(SRCS:%=$(srcdir)/%)
|
|
22 OBJS=$(SRCS:.c=.o)
|
|
23
|
996
|
24 ELLCC=@ELLCC@
|
|
25 MODARCHDIR=$(shell @ELLCC@ --mod-archdir)
|
|
26 INSTALLPATH=$(shell @ELLCC@ --mod-site-location)
|
|
27 INSTALL=@INSTALL@
|
|
28 INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
|
29
|
|
30 .PHONY: clean distclean install
|
|
31 all: $(MODNAME).ell
|
|
32
|
|
33 .c.o:
|
|
34 $(ELLCC) $(CFLAGS) --mode=compile --mod-output=$@ \
|
|
35 -I$(MODARCHDIR)/include -c $<
|
|
36
|
|
37 $(MODNAME).ell: $(OBJS) $(MODNAME)_i.o
|
1489
|
38 $(ELLCC) --mode=link --mod-output=$@ $(OBJS) $(MODNAME)_i.o $(LDFLAGS)
|
996
|
39
|
|
40 $(MODNAME)_i.c: $(SRCS)
|
|
41 ELLMAKEDOC=$(MODARCHDIR)/make-docfile $(ELLCC) --mode=init \
|
|
42 --mod-output=$@ --mod-name=$(MODNAME) --mod-version=$(MODVER) \
|
|
43 --mod-title=$(MODTITLE) $(SRC_SRCS)
|
|
44
|
|
45 clean:
|
|
46 $(RM) $(MODNAME).ell $(OBJS) $(MODNAME)_i.* *~
|
|
47
|
|
48 distclean: clean
|
|
49 $(RM) Makefile config.* configure
|
|
50
|
|
51 install: $(MODNAME).ell
|
|
52 $(INSTALL_PROGRAM) $< $(INSTALLPATH)
|