CXXSRCS = ged.cc gedDict.cc eventDisplay.cc fileManager.cc CXXOBJS = $(patsubst %.cc,%.o,$(CXXSRCS)) CSRCS = hddm_fitter.c COBJS = $(patsubst %.c,%.o,$(CSRCS)) OBJS = $(COBJS) $(CXXOBJS) CXXDEPS = $(patsubst %.cc, %.d, $(CXXSRCS)) CDEPS = $(patsubst %.c, %.d, $(CSRCS)) DEPS = $(CXXDEPS) CFLAGS = -g -I$(HALLD_HOME)/include CXXFLAGS = -g -I$(HALLD_HOME)/include $(shell root-config --cflags) LDFLAGS = -g $(shell root-config --glibs) BINDIR = $(HALLD_MY)/bin/$(BMS_OSNAME) all: install install: mkbindir ged install ged $(BINDIR) mkbindir: test -d $(BINDIR) || mkdir -pv $(BINDIR) ged: $(OBJS) g++ $(LDFLAGS) -lGeom -o ged $(OBJS) gedDict.cc: ged_no_rpc.h eventDisplay_no_rpc.h gedLinkDef.h rootcint -f gedDict.cc -c ged_no_rpc.h gedLinkDef.h fileManager.o: hddm_fitter.h hddm_fitter.h hddm_fitter.c: ../fitter/fitter_template.hddm hddm-c ../fitter/fitter_template.hddm hddm_fitter.o: hddm_fitter.c $(CC) $(CFLAGS) -c hddm_fitter.c #hddm_fitter.d: # echo \# dummy make include file > $@ eventDisplay_no_rpc.h: eventDisplay.h perl -n -e 'if (/fileManager.h/) {print "typedef int fileManager;\n";} else {print;}' < $< > $@ ged_no_rpc.h: ged.h perl -n -e 'if (/eventDisplay/) {print "#include \"eventDisplay_no_rpc.h\"\n";} else {print;}' < $< > $@ %.d: %.cc g++ -MM $(CXXFLAGS) $< > $@ %.d: %.c gcc -MM $(CFLAGS) $< > $@ $(DEPS): hddm_fitter.h env: echo $(CXXSRCS) $(CXXOBJS) $(DEPS) clean: $(RM) -v *.o *.d ged hddm_fitter.h hddm_fitter.c include $(DEPS)