1083
|
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
|
1111
|
28 ## Note: This will be appended to the individual module Makefiles by configure.
|
|
29
|
1632
|
30 #define NOT_C_CODE
|
|
31 #include "../../src/config.h"
|
|
32
|
1083
|
33 SHELL=/bin/sh
|
|
34 RM=rm -f
|
|
35 PROGNAME=@PROGNAME@
|
2377
|
36 CFLAGS=@XE_CFLAGS@
|
1083
|
37 INSTALL=@INSTALL@
|
|
38 version=@version@
|
|
39 prefix=@prefix@
|
|
40 exec_prefix=@exec_prefix@
|
|
41 libdir=@libdir@
|
|
42 instvardir=@instvardir@
|
|
43 configuration=@configuration@
|
|
44 moduledir=@moduledir@
|
|
45 with_modules=@with_modules@
|
|
46
|
|
47 srcdir=@srcdir@
|
|
48 VPATH=@srcdir@
|
|
49
|
1522
|
50 SRC_SRCS=$(SRCS:%=@srcdir@/%)
|
1490
|
51 OBJS=$(SRCS:.c=.o)
|
|
52
|
1252
|
53 MODCC=@MOD_CC@
|
1083
|
54 MODARCHDIR=@MODARCHDIR@
|
|
55 MAKE_DOCFILE=@MAKE_DOCFILE@
|
|
56 MODCFLAGS=@MODCFLAGS@
|
|
57 INSTALLPATH=@INSTALLPATH@
|
|
58 INSTALL_PROGRAM=@MOD_INSTALL_PROGRAM@
|
|
59 OBJECT_TO_BUILD=@OBJECT_TO_BUILD@
|
1650
|
60 LIBSTDCPP=@LIBSTDCPP@
|
1632
|
61 #ifdef HAVE_MS_WINDOWS
|
|
62 IMPORT_LIB=../../src/xemacs-import.a
|
|
63 #endif
|
1083
|
64
|
|
65 .PHONY: clean distclean install
|
|
66 all: $(OBJECT_TO_BUILD)
|
|
67
|
|
68 .c.o:
|
1252
|
69 $(MODCC) $(MODCFLAGS) -c $<
|
1083
|
70
|
1632
|
71 $(MODNAME).ell: $(OBJS) $(MODNAME)_i.o $(IMPORT_LIB)
|
1489
|
72 $(MODCC) --mode=link --mode=verbose --mod-output=$@ \
|
1650
|
73 $(OBJS) $(MODNAME)_i.o $(IMPORT_LIB) $(LDFLAGS) $(LIBSTDCPP)
|
1083
|
74
|
|
75 $(MODNAME)_i.c: $(SRCS)
|
1252
|
76 ELLMAKEDOC=$(MAKE_DOCFILE) $(MODCC) --mode=init --mod-output=$@ \
|
1083
|
77 --mod-name=$(MODNAME) --mod-version=$(MODVER) \
|
|
78 --mod-title=$(MODTITLE) $(SRC_SRCS)
|
|
79
|
|
80 clean:
|
|
81 $(RM) $(MODNAME).ell $(OBJS) $(MODNAME)_i.* *~
|
|
82
|
|
83 distclean: clean
|
|
84 $(RM) Makefile config.* configure
|
|
85
|
|
86 extraclean: distclean
|
|
87
|
|
88 install: $(OBJECT_TO_BUILD)
|
|
89 $(INSTALL_PROGRAM) $< $(INSTALLPATH)
|