# example Makefile for BaBar packages # # uses SoftRelTools/standard.mk # # This is an example of how package 'foo' might be setup. # 'bar' is also used as a sample file name. # # 8-Dec-97 jonckheere@fnal.gov # Added all the LIBxxxFILES as examples # Added D0 examples of LIBS and commented out that and CDF version # this is an "example" after all, but shouldn't be so experiment # specific # Reinserted example of SUBDIRS # Added .d file as dependency in $(bindir) target, see comment below # ############################################################# # file lists (standard names, local contents) # include file products INC = # library product LIB = libfoo.a # library contents # Note: source files with main() definitions do not go # into the library--that is why we skip foo_main.cc here. # Any file copied from AppUserBuild_template.cc should # also be skipped. skip_files := foo_main.cc foo_test.cc LIBCCFILES = $(filter-out $(skip_files), $(wildcard *.cc)) LIBCPPFILES = $(filter-out $(skip_files), $(wildcard *.cpp)) LIBCXXFILES = $(filter-out $(skip_files), $(wildcard *.cxx)) LIBFFILES = $(wildcard *.f) LIBCFILES = $(wildcard *.c) # subdirectories SUBDIRS = src # local library definitions for executable link # these libraries will be taken from either the local test # directory, or the underlying production release specified earlier LIBS += -lfoo # for CDF: # LIBS += -lExamples -lFrameMods -lFramework -lFrameUtil -lBanks -lTrybos # LIBS += -lAbsEnv -lHepTuple -lExceptions -lZMutility -lCLHEP -lpacklib # for D0: # LIBS += -ledm -ld0om -ld0om_ds -ldspack override LDFLAGS += -v override LOADLIBES += $(LIBS) -lpacklib override LDFLAGS += -L$(CERN_DIR)/lib include SoftRelTools/arch_spec_Tcl.mk include SoftRelTools/arch_spec_f77.mk # binary products BINS = foo_test # rules for local executables # These should include explicit destinations, to avoid finding # an old copy in the local directory # #FNAL:amj 11/20/97 # foo_test.d isn't included or created by SRT since foo_test.cc isn't # listed in LIBS. Therefore it must be included explicitly here and # must be included as a dependency of foo_test. The latter is needed only # under some rather rare circumstances to make sure that foo_test # is rebuilt whenever anything, including headers, that foo_test.cc depends # on are changed. #FNAL:amj end include $(workdir)foo_test.d $(bindir)foo_test: foo_test.cc $(LIBS) $(workdir)foo_test.d echo Linking foo_test $(CXX) $< $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(LOADLIBES) ############################################################ include SoftRelTools/standard.mk