On Sunday 12 July 2009 01:42:03 Garrett Cooper wrote: > +$(CC) : The system C compiler. > + > +$(CXX) : The system C++ compiler.
should add $(CPP) - the system preprocessor
> +$(CFLAGS) : Compiler flags.
C compiler flags
should add $(CXXFLAGS) too
> +$(LD) : The library linker.
the system linker (typically $(CC))
> +$(LDFLAGS) : What to pass in to the linker, including -L arguments
> + and other ld arguments, apart from -l library
> + includes (see $(LDLIBS)).
should note that flags should be in the form given to the compiler driver
because we arent invoking `ld` -- i.e. -Wl,-foo not -foo
> +$(LDLIBS) : Libraries to pass into the linker (e.g. -lltp, etc).
s/into/to/
> +$(OPT_CFLAGS) : Optimization flags to pass into the C
> compiler, -O2,
> + etc. IF YOU SPECIFY -O2 OR HIGHER, ENSURE THAT YOU
> + ALSO SPECIFY -fno-strict-aliasing, BECAUSE OF PAST
> + OPTIMIZATION GCC BUGS!!!
tr '[:upper:]' '[:lower:]'
do you have any actual examples of this ?
> +$(OPT_CXXFLAGS) : Optimization flags to pass into the C++
> compiler.
s/into/to/
> +$(RANLIB) : What to run after archiving a library.
the archive indexer
> +# Replace [options] with any make specific options and variables, for each
> +# step, example: -j 4, DESTDIR=/path/for/install, etc.
> +make ac-clean ac-maintainer-clean distclean maintainer-clean [options]
there should be no need to run these targets. "maintainer-clean" should imply
all of these other targets.
> +==============================
> +Other Errata
> +==============================
> +
> +- This system (in its current form) supports cross-compilation out of a
> single +directory. Object directory support will be completed soon to
> properly enable +cross-compilation. This is required to avoid sporadic
> Make-related errors.
i have no idea what you're talking about here
> +# Where's the root source directory?
> +top_srcdir := $(abspath $(top_srcdir))
> +# Where's the source located at?
> +srcdir ?= .
> +# Where's the root object directory?
> +builddir ?= $(srcdir)
need a top_builddir too
> +# Where are we currently located in the object and source tree?
> +relpath := $(subst $(abs_builddir),,$(CURDIR))
is this actually necessary ?
> +all: | $$(MAKE_DEPS) $$(MAKE_TARGETS)
> +
> +clean: $$(CLEAN_DEPS)
> + -$(RM) -f $$(CLEAN_TARGETS)
> +
> +pre-install: | $$(INSTALL_PATH) $$(PREINSTALL_DEPS)
> +
> +install: | $$(INSTALL_FILES) $$(POSTINSTALL_DEPS)
so why do we need these _DEPS vars ? do you need the $(MAKE_DEPS) to be
processed before $(MAKE_TARGETS) ?
at least for the clean target, it'd be easier to write it:
clean::
$(RM) -f $$(CLEAN_TARGETS)
and then people can just define their own "clean::" in their makefile to do
whatever they want. be nice if we could use this method for all the targets.
-mike
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
