===========================================
This mail is made of the recycled electrons
===========================================
Mailer: Elm [revision: 70.85]
> ---------------------------------------------------------------------
> ===========================================
> This mail is made of the recycled electrons
> ===========================================
> Mailer: Elm [revision: 70.85]
>
> monaka wrote:
> > I know these extensions works so fine, but those link dynamically
> > their parts only.
> > My wish is to make base libraries (libDb.a, libca.a, ...).
> > This is difficult?
>
> I have made base shared libraries: libca.sl, licCom.sl at CEBAF.
> To have current R3.12.2 config files to support building both
> shared and achived base libraries, you need modify 3 files in
> config/ and Makefile.Unix in base/src/ca/ (or base/src/libCom/).
>
> Let me include what I did. I will work with Janet Anderson at
> APS to commit this support into the standard epics distribution.
> Hope that helps.
>
> Johnny Tang
> CEBAF
>
> -------------------------------------------------------------------
>
> Note: the line marked with * is new line
> and marked with + is modified line
>
> 1. add two lines in CONFIG_SITE
> ...
> INSTALL_LOCATION_LIB = $(INSTALL_LOCATION)/lib
> * INSTALL_LOCATION_LIB_SL = $(INSTALL_LOCATION)/lib_sl
> ...
> INSTALL_LIB = $(INSTALL_LOCATION_LIB)/$(T_A)
> * INSTALL_LIB_SL = $(INSTALL_LOCATION_LIB_SL)/$(T_A)
> ...
>
> Define a location for shared libs and seperate shared libraries
> from achived ones:
> base/lib and base/lib_sl
>
> 2. add one line in CONFIG.Unix.hp700 ( or CONFIG.Unix.<host-arch> )
> ...
> COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
> * COMPILE_SL.c = $(CC) $(CFLAGS) $(CPPFLAGS) +z -c
> ...
>
> 3. add/modify lines and rules in RULES.Unix
> ...
> INSTALL_LIBS=$(LIBNAME:%=$(INSTALL_LIB)/%)
> * INSTALL_LIBS_SL=$(LIBNAME_SL:%=$(INSTALL_LIB)/%)
> ...
> + build: pre_build $(LIBNAME) $(LIBNAME_SL) $(TARGETS) $(PROD)
>
> + install: build $(INSTALL_INC) $(INSTALL_LIBS) $(INSTALL_LIBS_SL) $(TARGETS) $(INSTALL_PROD) $(INSTALL_MAN1) $(INSTALL_DOCS) $(INSTALL_SCRIPTS)
>
> ...
> clean::
> @echo "Cleaning"
> + $(RM) *.o *.a $(TARGETS) $(PROD) $(LIBNAME) $(LIBNAME_SL) $(INC)
>
> ...
> * %_sl.c: ../%.c
> * $(RM) $@
> * ln -s $< $@
>
> * %_sl.c: %.c
> * $(RM) $@
> * ln -s $< $@
>
> * %_sl.o: %_sl.c
> * $(COMPILE_SL.c) $<
>
> %.o: %.c
> $(COMPILE.c) $<
>
> %.o: ../%.c
> $(COMPILE.c) $<
>
> ...
> $(LIBNAME): $(LIBOBJS)
> @if [ ! -z "$(LIBNAME)" ] ; \
> then \
> echo Building library $@; \
> $(AR) $(ARFLAGS) $@ $(LIBOBJS); \
> $(RANLIB) $@; \
> fi
>
> * $(LIBNAME_SL): $(LIBOBJS_SL)
> * @if [ ! -z "$(LIBNAME_SL)" ] ; \
> * then \
> * echo Building Shared library $@; \
> * echo ld -b -o $@ $(LIBOBJS_SL); \
> * ld -b -o $@ $(LIBOBJS_SL); \
> * fi
>
> ...
> # This rule has to be before the next one
> * $(INSTALL_LIB)/%.sl: %.sl
> * echo "Installing shared library $< to $(INSTALL_LIB_SL)"
> * test -d $(INSTALL_LOCATION_LIB_SL) || mkdir $(INSTALL_LOCATION_LIB_SL)
> * test -d $(INSTALL_LIB_SL) || mkdir $(INSTALL_LIB_SL)
> * $(INSTALL) -m 644 $< $(INSTALL_LIB_SL)
>
> $(INSTALL_LIB)/%: %
> @echo "Installing library $< to $@"
> @test -d $(INSTALL_LOCATION_LIB) || mkdir $(INSTALL_LOCATION_LIB)
> @test -d $(INSTALL_LIB) || mkdir $(INSTALL_LIB)
> @$(INSTALL) -m 644 $< $(INSTALL_LIB)
> @$(RANLIB) $(RANLIBFLAGS) $@
> ...
>
> 4. add two lines in base/src/XX/Makefile.Unix
> where XX is ca, libCom, etc
>
> ...
> LIBOBJS = ...
> ...
> * LIBOBJS_SL = $(LIBOBJS:%.o=%_sl.o)
>
> LIBNAME = libca.a
> * LIBNAME_SL = libca.sl
> ...
>
> --
> =============================================================
> Johnny Tang Voice: (804)249-7239 E-Mail: [email protected]
> Continuous Electron Beam Accelerator Facility
> 12000 Jefferson Avenue, MS 85A
> Newport News, Virginia 23606
> =============================================================
>
>
--
=============================================================
Johnny Tang Voice: (804)249-7239 E-Mail: [email protected]
Continuous Electron Beam Accelerator Facility
12000 Jefferson Avenue, MS 85A
Newport News, Virginia 23606
=============================================================
- Navigate by Date:
- Prev:
Bug and Fix Report Release 3.13.0Alpha3 Marty Kraimer
- Next:
GPIB-1014 with Nitro60 Andy Kozubal
- Index:
1994
1995
<1996>
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Bug and Fix Report Release 3.13.0Alpha3 Marty Kraimer
- Next:
GPIB-1014 with Nitro60 Andy Kozubal
- Index:
1994
1995
<1996>
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|