[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Saving and restoring parameters
From: |
Sensei |
Subject: |
Saving and restoring parameters |
Date: |
Fri, 14 Jan 2005 14:57:01 -0600 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041207) |
Hi.
I'm trying to manage through a project which involves the use of other
libraries, like gsl, xml2.
What I'm trying to do is this. From the main makefile, I set all CFLAGS,
CXXFLAGS and LDFLAGS. I set up also CURDIR=$(shell pwd), and do a global
export to have those flags anywhere.
The ``all:'' section has dependencies:
all: lib/libgsl.so lib/libz.so lib/libiconv.so lib/libxml2.so lib/libqhull.a
On each dependant library I do simply:
lib/libgsl.so:
@echo "make libgsl (GNU Scientific)"
$(MAKE) -s -C external/gsl-1.6/ -f Makefile.gsl
Now, what I want to do is calling configure, make and make install in
the gsl project. My Makefile.gsl file is:
all:
OLD_CFLAGS=$CFLAGS
OLD_CXXFLAGS=$CXXFLAGS
OLD_LDFLAGS=$LDFLAGS
export CFLAGS=""
export CXXFLAGS=""
export LDFLAGS=""
@echo "CFLAGS:$(CFLAGS) CXXFLAGS:$(CXXFLAGS) LDFLAGS:$(LDFLAGS)"
@./configure --prefix=$(CUR_DIR)
@$(MAKE)
@$(MAKE) install
CFLAGS=OLD_CFLAGS
CXXFLAGS=OLD_CXXFLAGS
LDFLAGS=OLD_LDFLAGS
@echo "CFLAGS:$(CFLAGS) CXXFLAGS:$(CXXFLAGS) LDFLAGS:$(LDFLAGS)"
But the *FLAGS are still unchanged, so I get nasty errors like ``C
compiler cannot create executables'' since C/CXX/LDFLAGS are not what
they're supposed to be (empty).
How can I do what I'm trying to do? :)
--
Sensei <mailto:senseiwa@tin.it> <pgp:8998A2DB>
<icqnum:241572242>
<yahoo!:sensei_sen>
<msn-id:sensei_sen@hotmail.com>
signature.asc
Description: OpenPGP digital signature
- Saving and restoring parameters,
Sensei <=