next up previous contents
Next: Release, Standard, and Architecture Up: Appendix on Makefiles in Previous: Appendix on Makefiles in   Contents


Package Makefiles

The following example of package makefiles,
$SRT_DIST/releases/$SRT_CURRENT/Framework/GNUmakefile and
$SRT_DIST/releases/$SRT_CURRENT/Framework/src/GNUmakefile, are used for building the libraries and executables of the Framework package. They are examples of typical package makefiles used by gmake in the examples of section  3.4 and  3.7. The first makefile only points gmake at the subdirectory src in which the second makefile resides. The second makefile specifies the library target libapp.a, and includes the architecture specific makefile for the tcl package, on which the framework package depends. Both makefiles include standard.mk which defines the compilation and dependency generation in detail.

$SRT\_DIST/releases/$SRT\SRT\__CURRENT/Framework/GNUmakefile 
# GNUmakefile for the BaBar Framework package
#
# uses SoftRelTools/standard.mk
#
#    Bob Jacobsen, Jan 96
#
#############################################################
# file lists (standard names, local contents)

# include file products
INC =

# library product
LIB =

#library contents
LIBFFILES  =
LIBCFILES  =
LIBCCFILES =

# subdirectories
SUBDIRS = src

# binary products
BINS =

############################################################
include SoftRelTools/standard.mk








$SRT_DIST/releases/current/Framework/src/GNUmakefile 
# new Makefile for Framework - the old one is unchanged.
#
# uses SoftRelTools/standard.mk
#
#############################################################
# file lists (standard names, local contents)

# include file products
INC =

# library product
LIB = libapp.a

#library contents
LIBCFILES  =
LIBCCFILES := $(shell ls *.cc)


# binary products
BINS =

# APPMain.o is required for Solaris link
all:
lib: $(libdir)/APPMain.o
$(libdir)/APPMain.o: $(libdir)/$(LIB)
        cd $(libdir); ar x $(LIB) APPMain.o
include SoftRelTools/arch_spec_Tcl.mk

############################################################
include SoftRelTools/standard.mk



Margaret Votava
2001-02-12