[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
EDE: make project shared objects
From: |
Sascha Wilde |
Subject: |
EDE: make project shared objects |
Date: |
Thu, 29 Oct 2009 16:01:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
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... :)
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")
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."
- EDE: make project shared objects,
Sascha Wilde <=