On Oct 30, 2011, at 4:23 PM, IOhannes m zmölnig wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 10/30/2011 09:13 PM, IOhannes m zmölnig wrote:
it is exactly my suggestion to standardize it to lib$(LIBNAME).$(EXT).
to be more precise, my suggestion basically contains exactly 2 suggestions:
- rename *_SOURCE to *_SOURCES (for consistency)
Having the name SHARED_SOURCE singular highlights that its a single file, which I think it should be. But since its an internal variable, I would be OK with it having a different name.
I don't see a gain to making it multiple files, unless you are doing something very complicated, in which case, you'll need to customize the Makefile. At that point, the Makefile is easy enough to read for someone who does Makefiles, so they don't need it documented.
- standardize the shared library name to lib$(LIBNAME).$(EXT)
that is all.
if it helps, try to forget that with these changes I could use the template Makefile as is.
It already is:
SHARED_SOURCE ?= $(wildcard lib$(LIBRARY_NAME).c) SHARED_HEADER ?= $(shell test ! -e $(LIBRARY_NAME).h || echo $(LIBRARY_NAME).h) SHARED_LIB = $(SHARED_SOURCE:.c=.$(SHARED_EXTENSION)) SHARED_TCL_LIB = $(wildcard lib$(LIBRARY_NAME).tcl)
I figured you'd want something more complicated, so I put in the ?= for you. Like before with ALL_*, take the template and modify it for your library. If its implemented in a way that still meets the goal of a simple interface, I'll merge it in.
.hc
----------------------------------------------------------------------------
Access to computers should be unlimited and total. - the hacker ethic