Mercurial > hg > xemacs-beta
comparison modules/common/Makefile.common @ 1083:d87493ecc64b
[xemacs-hg @ 2002-11-04 05:19:45 by ben]
factor out some module code
author | ben |
---|---|
date | Mon, 04 Nov 2002 05:19:54 +0000 |
parents | |
children | 184461bc8de4 |
comparison
equal
deleted
inserted
replaced
1082:cf8bc037c5ef | 1083:d87493ecc64b |
---|---|
1 ## Common Makefile section for modules in XEmacs. | |
2 ## Copyright (C) 2002 Jerry James. | |
3 | |
4 ## This file is part of XEmacs. | |
5 | |
6 ## XEmacs is free software; you can redistribute it and/or modify it | |
7 ## under the terms of the GNU General Public License as published by the | |
8 ## Free Software Foundation; either version 2, or (at your option) any | |
9 ## later version. | |
10 | |
11 ## XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
12 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 ## for more details. | |
15 | |
16 ## You should have received a copy of the GNU General Public License | |
17 ## along with XEmacs; see the file COPYING. If not, write to | |
18 ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
19 ## Boston, MA 02111-1307, USA. | |
20 | |
21 ## Synched up with: Not in FSF. | |
22 | |
23 ## This is more complicated than would normally be the case, as this makefile | |
24 ## has been tailored to work both inside and independently of the XEmacs | |
25 ## source tree, and to support both module and non-module building inside the | |
26 ## source tree. | |
27 | |
28 SRC_SRCS=$(SRCS:%=$(srcdir)/%) | |
29 OBJS=$(SRCS:.c=.o) | |
30 | |
31 SHELL=/bin/sh | |
32 RM=rm -f | |
33 PROGNAME=@PROGNAME@ | |
34 CFLAGS=@CFLAGS@ | |
35 INSTALL=@INSTALL@ | |
36 version=@version@ | |
37 prefix=@prefix@ | |
38 exec_prefix=@exec_prefix@ | |
39 libdir=@libdir@ | |
40 instvardir=@instvardir@ | |
41 configuration=@configuration@ | |
42 moduledir=@moduledir@ | |
43 with_modules=@with_modules@ | |
44 | |
45 srcdir=@srcdir@ | |
46 VPATH=@srcdir@ | |
47 | |
48 CC=@MOD_CC@ | |
49 MODARCHDIR=@MODARCHDIR@ | |
50 MAKE_DOCFILE=@MAKE_DOCFILE@ | |
51 MODCFLAGS=@MODCFLAGS@ | |
52 INSTALLPATH=@INSTALLPATH@ | |
53 INSTALL_PROGRAM=@MOD_INSTALL_PROGRAM@ | |
54 OBJECT_TO_BUILD=@OBJECT_TO_BUILD@ | |
55 | |
56 .PHONY: clean distclean install | |
57 all: $(OBJECT_TO_BUILD) | |
58 | |
59 .c.o: | |
60 $(CC) $(MODCFLAGS) -c $< | |
61 | |
62 $(MODNAME).ell: $(OBJS) $(MODNAME)_i.o | |
63 $(CC) --mode=link --mode=verbose --mod-output=$@ $^ $(LDFLAGS) | |
64 | |
65 $(MODNAME)_i.c: $(SRCS) | |
66 ELLMAKEDOC=$(MAKE_DOCFILE) $(CC) --mode=init --mod-output=$@ \ | |
67 --mod-name=$(MODNAME) --mod-version=$(MODVER) \ | |
68 --mod-title=$(MODTITLE) $(SRC_SRCS) | |
69 | |
70 clean: | |
71 $(RM) $(MODNAME).ell $(OBJS) $(MODNAME)_i.* *~ | |
72 | |
73 distclean: clean | |
74 $(RM) Makefile config.* configure | |
75 | |
76 extraclean: distclean | |
77 | |
78 install: $(OBJECT_TO_BUILD) | |
79 $(INSTALL_PROGRAM) $< $(INSTALLPATH) |