unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* EDE: make project shared objects
@ 2009-10-29 15:01 Sascha Wilde
  2009-10-30 11:36 ` Lluis
  2009-10-30 13:06 ` Sascha Wilde
  0 siblings, 2 replies; 7+ messages in thread
From: Sascha Wilde @ 2009-10-29 15:01 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

The following patch addresses a bunch of issues: 
- Some incarnations of libtool (namely the one in Debian Lenny) need
  --tag even in this simple case
- We use the libtool .lo object extension, so we no longer interfere
  with the default rules for non shared objects
- Added missing -c for object generation
- Removed LTLINK var definition from compiler, this belongs only to the
  linker definition.
- Fixed the linker definition: there was CPP used, but linking is not
  done by the preprocessor...  :)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ede-make-shared.diff --]
[-- Type: text/x-patch, Size: 1325 bytes --]

diff -r 95a232c6691b lisp/cedet/ede/proj-shared.el
--- a/lisp/cedet/ede/proj-shared.el	Wed Oct 28 17:41:17 2009 +0100
+++ b/lisp/cedet/ede/proj-shared.el	Thu Oct 29 15:48:38 2009 +0100
@@ -71,18 +71,19 @@
 	 "ede-c-shared-compiler-libtool"
 	 :name "libtool"
 	 :variables '(("LIBTOOL" . "libtool")
-		      ("LTCOMPILE" . "$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)")
-		      ("LTLINK" . "$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -L. -o $@")
+		      ("LTCOMPILE" . 
+		       "$(LIBTOOL) --tag=CC --mode=compile $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)")
 		      )
 	 :rules (list (ede-makefile-rule
 		       "cc-inference-rule-libtool"
-		       :target "%.o"
+		       :target "%.lo"
 		       :dependencies "%.c"
 		       :rules '("@echo '$(LTCOMPILE) -o $@ $<'; \\"
 				"$(LTCOMPILE) -o $@ $<"
 				)
 		       ))
 	 :autoconf '("AC_PROG_LIBTOOL")
+	 :objectextention ".lo"
 	 )
   "Compiler for C sourcecode.")
 
@@ -94,7 +95,7 @@
    :sourcetype '(ede-source-c++)
    :variables  '(
 		 ("LIBTOOL" . "libtool")
-		 ("LTLINK" . "$(LIBTOOL) --tag=CPP --mode=link $(CPP) $(CFLAGS) $(LDFLAGS) -L. -o $@")
+		 ("LTLINK" . "$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -L.")
 		 )
    :commands '("$(LTLINK) -o $@ $^")
    :autoconf '("AC_PROG_LIBTOOL")

[-- Attachment #3: Type: text/plain, Size: 429 bytes --]


It should be transferred to the libtool based c++ compiler/linker
definitipon, too -- but I'm no c++ guy, so I would like to leave this to
someone who is willing/able to test it...  ;-)

FWIW: Linking against libs in make projects still doesn't work.  I'll
have a look t this next...

cheers
sascha
-- 
Sascha Wilde : "There are 10 types of people in the world. 
             : Those who understand binary and those who don't."

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-10-31 12:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-29 15:01 EDE: make project shared objects Sascha Wilde
2009-10-30 11:36 ` Lluis
2009-10-30 13:06 ` Sascha Wilde
2009-10-30 18:53   ` Stefan Monnier
2009-10-31  5:30     ` Miles Bader
2009-10-31 12:07       ` Sascha Wilde
2009-10-31 12:14     ` Eric M. Ludlam

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).