annotate lisp/cedet/ede/proj-shared.el @ 110407:e9bd1f306e02

Add xml.o dependencies to deps.mk. deps.mk (xml.o): Add dependencies.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 18 Sep 2010 16:09:40 +0200
parents 1d1d5d9bd884
children b150a06c6999
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
1 ;;; ede-proj-shared.el --- EDE Generic Project shared library support
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
2
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 105652
diff changeset
3 ;;; Copyright (C) 1998, 1999, 2000, 2009, 2010 Free Software Foundation, Inc.
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
4
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
5 ;; Author: Eric M. Ludlam <zappo@gnu.org>
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
6 ;; Keywords: project, make
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
7
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
9
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
12 ;; the Free Software Foundation, either version 3 of the License, or
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
13 ;; (at your option) any later version.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
14
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
18 ;; GNU General Public License for more details.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
19
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
22
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
23 ;;; Commentary:
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
24 ;;
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
25 ;; Handle shared object libraries in and EDE Project file.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
26 ;; Tries to deal with libtool and non-libtool situations.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
27
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
28 (require 'ede/pmake)
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
29 (require 'ede/proj-obj)
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
30 (require 'ede/proj-prog)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
31
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
32 ;;; THIS NEEDS WORK. SEE ede-proj-obj.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
33
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
34 ;;; Code:
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
35 (defclass ede-proj-target-makefile-shared-object
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
36 (ede-proj-target-makefile-program)
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
37 ((availablecompilers :initform (ede-gcc-libtool-shared-compiler
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
38 ;;ede-gcc-shared-compiler
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
39 ede-g++-libtool-shared-compiler
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
40 ;;ede-g++-shared-compiler
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
41 ))
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
42 (availablelinkers :initform (ede-cc-linker-libtool
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
43 ede-g++-linker-libtool
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
44 ;; Add more linker thingies here.
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
45 ))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
46 (ldflags :custom (repeat (string :tag "Libtool flag"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
47 :documentation
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
48 "Additional flags to add when linking this shared library.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
49 Use ldlibs to add addition libraries.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
50 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
51 "This target generates a shared library.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
52
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
53 (defvar ede-gcc-shared-compiler
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
54 (clone ede-gcc-compiler
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
55 "ede-c-shared-compiler"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
56 :name "gcc -shared"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
57 :variables '(("CC_SHARED" . "gcc")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
58 ("C_SHARED_COMPILE" .
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
59 "$(CC_SHARED) -shared $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
60 ; :linkvariables '(("C_SHARED_LINK" .
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
61 ; "$(CC_SHARED) -shared $(CFLAGS) $(LDFLAGS) -L. -o $@ $^")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
62 ; )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
63 ; :commands '("$(C_SHARED_LINK) %s")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
64 ;; @TODO - addative modification of autoconf.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
65 :autoconf '("AC_PROG_LIBTOOL")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
66 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
67 "Compiler for C sourcecode.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
68
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
69 (defvar ede-gcc-libtool-shared-compiler
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
70 (clone ede-gcc-shared-compiler
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
71 "ede-c-shared-compiler-libtool"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
72 :name "libtool"
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
73 :variables '(("LIBTOOL" . "libtool")
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
74 ("LTCOMPILE" . "$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
75 ("LTLINK" . "$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -L. -o $@")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
76 )
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
77 :rules (list (ede-makefile-rule
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
78 "cc-inference-rule-libtool"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
79 :target "%.o"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
80 :dependencies "%.c"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
81 :rules '("@echo '$(LTCOMPILE) -o $@ $<'; \\"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
82 "$(LTCOMPILE) -o $@ $<"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
83 )
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
84 ))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
85 :autoconf '("AC_PROG_LIBTOOL")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
86 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
87 "Compiler for C sourcecode.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
88
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
89 (defvar ede-cc-linker-libtool
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
90 (clone ede-cc-linker
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
91 "ede-cc-linker-libtool"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
92 :name "cc shared"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
93 ;; Only use this linker when c++ exists.
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
94 :sourcetype '(ede-source-c++)
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
95 :variables '(
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
96 ("LIBTOOL" . "libtool")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
97 ("LTLINK" . "$(LIBTOOL) --tag=CPP --mode=link $(CPP) $(CFLAGS) $(LDFLAGS) -L. -o $@")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
98 )
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
99 :commands '("$(LTLINK) -o $@ $^")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
100 :autoconf '("AC_PROG_LIBTOOL")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
101 :objectextention ".la")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
102 "Linker needed for c++ programs.")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
103
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
104 (defvar ede-g++-shared-compiler
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
105 (clone ede-g++-compiler
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
106 "ede-c++-shared-compiler"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
107 :name "gcc -shared"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
108 :variables '(("CXX_SHARED" . "g++")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
109 ("CXX_SHARED_COMPILE" .
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
110 "$(CXX_SHARED) -shared $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
111 ;; @TODO - addative modification of autoconf.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
112 :autoconf '("AC_PROG_LIBTOOL")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
113 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
114 "Compiler for C sourcecode.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
115
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
116 (defvar ede-g++-libtool-shared-compiler
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
117 (clone ede-g++-shared-compiler
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
118 "ede-c++-shared-compiler-libtool"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
119 :name "libtool"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
120 :variables '(("CXX" "g++")
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
121 ("LIBTOOL" . "libtool")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
122 ("LTCOMPILE" . "$(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)")
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
123 )
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
124 :rules (list (ede-makefile-rule
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
125 "c++-inference-rule-libtool"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
126 :target "%.o"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
127 :dependencies "%.c"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
128 :rules '("@echo '$(LTCOMPILE) -o $@ $<'; \\"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
129 "$(LTCOMPILE) -o $@ $<"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
130 )
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
131 ))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
132 :autoconf '("AC_PROG_LIBTOOL")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
133 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
134 "Compiler for C sourcecode.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
135
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
136 (defvar ede-g++-linker-libtool
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
137 (clone ede-g++-linker
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
138 "ede-g++-linker-libtool"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
139 :name "g++"
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
140 ;; Only use this linker when c++ exists.
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
141 :sourcetype '(ede-source-c++)
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
142 :variables '(
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
143 ("LIBTOOL" . "libtool")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
144 ("LTLINK" . "$(LIBTOOL) --tag=CXX --mode=link $(CXX) $(CFLAGS) $(LDFLAGS) -L. -o $@")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
145 )
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
146 :commands '("$(LTLINK) -o $@ $^")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
147 :autoconf '("AC_PROG_LIBTOOL")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
148 :objectextention ".la")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
149 "Linker needed for c++ programs.")
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
150
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
151 ;;; @TODO - C++ versions of the above.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
152
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
153 (when nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
154
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
155
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
156 (insert;; These C to O rules create dependencies
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
157 "%.o: %.c\n"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
158 "\t@echo '$(COMPILE) -c $<'; \\\n"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
159 "\t$(COMPILE)"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
160 (if (oref this automatic-dependencies)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
161 " -Wp,-MD,.deps/$(*F).P"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
162 "")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
163 " -c $<\n\n")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
164 (if have-libtool
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
165 (insert;; These C to shared o rules create pic code.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
166 "%.lo: %.c\n"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
167 "\t@echo '$(LTCOMPILE) -c $<'; \\\n"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
168 "\t$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<\n"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
169 "\t@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \\\n"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
170 "\t < .deps/$(*F).p > .deps/$(*F).P\n"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
171 "\t@-rm -f .deps/$(*F).p\n\n"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
172 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
173
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
174 (defmethod ede-proj-configure-add-missing
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
175 ((this ede-proj-target-makefile-shared-object))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
176 "Query if any files needed by THIS provided by automake are missing.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
177 Results in --add-missing being passed to automake."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
178 (not (and (ede-expand-filename (ede-toplevel) "ltconfig")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
179 (ede-expand-filename (ede-toplevel) "ltmain.sh"))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
180
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
181 (defmethod ede-proj-makefile-insert-automake-pre-variables
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
182 ((this ede-proj-target-makefile-shared-object))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
183 "Insert bin_PROGRAMS variables needed by target THIS.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
184 We aren't acutally inserting SOURCE details, but this is used by the
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
185 Makefile.am generator, so use it to add this important bin program."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
186 (ede-pmake-insert-variable-shared "lib_LTLIBRARIES"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
187 (insert (concat "lib" (ede-name this) ".la"))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
188
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
189 (defmethod ede-proj-makefile-insert-automake-post-variables
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
190 ((this ede-proj-target-makefile-shared-object))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
191 "Insert bin_PROGRAMS variables needed by target THIS.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
192 We need to override -program which has an LDADD element."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
193 nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
194
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
195 (defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-shared-object))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
196 "Return the name of the main target for THIS target."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
197 ;; We need some platform gunk to make the .so change to .sl, or .a,
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
198 ;; depending on the platform we are going to compile against.
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105538
diff changeset
199 (concat "lib" (ede-name this) ".la"))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
200
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
201 (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-shared-object))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
202 "Return the variable name for THIS's sources."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
203 (if (eq (oref (ede-target-parent this) makefile-type) 'Makefile.am)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
204 (concat "lib" (oref this name) "_la_SOURCES")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
205 (call-next-method)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
206
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
207
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
208 (provide 'ede/proj-shared)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
209
105377
7f4c7f5c0eba Add arch tagline
Miles Bader <miles@gnu.org>
parents: 104496
diff changeset
210 ;; arch-tag: 05f22c3e-b269-4411-9425-65e8fe4ab74a
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
211 ;;; ede/proj-shared.el ends here