home *** CD-ROM | disk | FTP | other *** search
- # Makefile to construct the hippo library
- #
- # Paul Rensing, Jan 28, 1992
- # created from Makefile
- #
- # $Id: make.common,v 3.15 1992/04/28 23:28:41 rensing Rel $
- #
- # Copyright (C) 1991 The Board of Trustees of The Leland Stanford
- # Junior University. All Rights Reserved.
-
- NAME=hippo
-
- # location of primary source code
- SRC_DIR = /nfs/ebnextk/LocalSources/hippo
-
- # location to install libs and include files
- LIB_INSTALLDIR = /usr/local/lib
- INC_INSTALLDIR = /usr/local/lib.shared/hippo
- BIN_INSTALLDIR = /usr/local/bin
-
- # files to install
- INSTALL_INCS = hippo.h hippostruct.h
- INSTALL_LIBS = $(LIB_LIST) $(DEBUGLIB_LIST)
- INSTALL_BINS = nt2text text2nt
-
- # directory in which libraries are built
- LIB_DIR = .
- BIN_DIR = .
-
- # FORTRAN bindings
- # if you don't have FORTRAN, comment this out
- FBINDINGS = $(LIBRARY)(hippof.o)
-
- # machine dependent junk :
- # FLAVOR is set from Makefile by the script architecture.
- # if it does not work for you, modify architecture or hard wire
- # the change.
- include make.${FLAVOR}
-
- # list of files needed
- TARFILES = hippowrapsps.psw hippontuple.c hippodisplay.c hippoplot.c \
- hippoprint.c hippoio.c hippoutil.c ntuple-parse.c \
- hippoxdr.c fhippo.c hippof.f \
- hippo.h hippostruct.h hippoutil.h hippoxdr.h hshrtnm.h \
- hippoplotNeXT.c hippoplotNeXT.h \
- hippoplotUP.c hippoplotUP.h \
- hippoplotXIV.cc hippoplotXIV.h \
- hippoplotX11.c hippoplotX11.h \
- hippoplotPS.c hippoplotPS.h \
- Makefile make.common make.next make.sun4 make.aix6000 \
- make.ultrix make.sgi architecture\
- nt2text.c text2nt.c hb2hippo.f getarg.c \
- h_test.c example.hiptxt example.hippo h_test.out \
- x11test.c README_X11 \
- make.vms hippo.opt \
- README HippoRef.ps HippoUser.ps CHANGES
-
- LIBRARY = $(LIB_DIR)/lib$(NAME).a
-
- NTLIBMEMS = $(LIBRARY)(hippontuple.o) \
- $(LIBRARY)(hippoio.o) \
- $(LIBRARY)(hippoutil.o) \
- $(LIBRARY)(ntuple-parse.o) \
- $(LIBRARY)(hippoxdr.o) \
- $(LIBRARY)(fhippo.o) \
- $(FBINDINGS)
-
- LIBMEMS = $(NTLIBMEMS) \
- $(LIBRARY)(hippodisplay.o) \
- $(LIBRARY)(hippoplot.o) \
- $(LIBRARY)(hippoplotPS.o) \
- $(LIBRARY)(hippoprint.o) \
- $(MACH_DEP_MEMS)
-
-
- # Targets
- libs : $(LIB_LIST)
-
- debuglibs : $(DEBUGLIB_LIST)
-
- lib : links $(LIBRARY)
-
- profile :
- $(MAKECOM) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$(NAME).profile" "CFLAGS = $(CFLAGS_PROF)"
-
- util : nt2text text2nt
-
- # Standard libraries with one main plot driver
-
- hippoNext :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_NEXT_PLOT_" \
- "MACH_DEP_MEMS=$(LIB_DIR)/lib$@.a(hippoplotNeXT.o) $(LIB_DIR)/lib$@.a(hippowrapsps.o)" \
- "DRVR_INCS = hippoplotNeXT.h hippowrapsps.h"
- hippoX11 :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_X11_PLOT_" \
- "MACH_DEP_MEMS = $(LIB_DIR)/lib$@.a(hippoplotX11.o)" \
- "DRVR_INCS = hippoplotX11.h"
- hippoXIV :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_XIV_PLOT_" \
- "MACH_DEP_MEMS = $(LIB_DIR)/lib$@.a(hippoplotXIV.o)" \
- "DRVR_INCS = hippoplotXIV.h"
- hippoUP :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_UNIXPLOT_PLOT_" \
- "MACH_DEP_MEMS = $(LIB_DIR)/lib$@.a(hippoplotUP.o)" \
- "DRVR_INCS = hippoplotUP.h"
- hippo :
- $(MAKE) -f make.common "FLAVOR=`./architecture`" lib
-
-
- # debug libraries with one main plot driver
-
- hippoNext.debug :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_NEXT_PLOT_" \
- "MACH_DEP_MEMS=$(LIB_DIR)/lib$@.a(hippoplotNeXT.o) $(LIB_DIR)/lib$@.a(hippowrapsps.o)" \
- "DRVR_INCS = hippoplotNeXT.h hippowrapsps.h" \
- "CFLAGS = $(CFLAGS_DEB)"
-
- hippoX11.debug :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_X11_PLOT_" \
- "MACH_DEP_MEMS = $(LIB_DIR)/lib$@.a(hippoplotX11.o)" \
- "DRVR_INCS = hippoplotX11.h" \
- "CFLAGS = $(CFLAGS_DEB)"
-
- hippoXIV.debug :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_XIV_PLOT_" \
- "MACH_DEP_MEMS = $(LIB_DIR)/lib$@.a(hippoplotXIV.o)" \
- "DRVR_INCS = hippoplotXIV.h" \
- "CFLAGS = $(CFLAGS_DEB)"
-
- hippoUP.debug :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_UNIXPLOT_PLOT_" \
- "MACH_DEP_MEMS = $(LIB_DIR)/lib$@.a(hippoplotUP.o)" \
- "DRVR_INCS = hippoplotUP.h" \
- "CFLAGS = $(CFLAGS_DEB)"
- hippo.debug :
- $(MAKE) -f make.common "FLAVOR=`./architecture`" lib \
- "NAME=$@" "CFLAGS = $(CFLAGS_DEB)"
-
-
- # profile libraries with one main plot driver
-
- hippoNext.profile :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_NEXT_PLOT_" \
- "MACH_DEP_MEMS=$(LIB_DIR)/lib$@.a(hippoplotNeXT.o) $(LIB_DIR)/lib$@.a(hippowrapsps.o)" \
- "DRVR_INCS = hippoplotNeXT.h hippowrapsps.h" \
- "CFLAGS = $(CFLAGS_PROF)"
- hippoX11.profile :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_X11_PLOT_" \
- "MACH_DEP_MEMS = $(LIB_DIR)/lib$@.a(hippoplotX11.o)" \
- "DRVR_INCS = hippoplotX11.h" \
- "CFLAGS = $(CFLAGS_PROF)"
- hippoXIV.profile :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_XIV_PLOT_" \
- "MACH_DEP_MEMS = $(LIB_DIR)/lib$@.a(hippoplotXIV.o)" \
- "DRVR_INCS = hippoplotXIV.h" \
- "CFLAGS = $(CFLAGS_PROF)"
- hippoUP.profile :
- $(MAKE) -f make.common "FLAVOR=$(FLAVOR)" lib \
- "NAME=$@" "PLOTCFLAGS = -D_UNIXPLOT_PLOT_" \
- "MACH_DEP_MEMS = $(LIB_DIR)/lib$@.a(hippoplotUP.o)" \
- "DRVR_INCS = hippoplotUP.h" \
- "CFLAGS = $(CFLAGS_PROF)"
- hippo.profile :
- $(MAKE) -f make.common "FLAVOR=`./architecture`" lib \
- "NAME=$@" "CFLAGS = $(CFLAGS_PROF)"
-
-
- #some of the tar options are not portable, but they are needed.
- tar : links
- mkdir hippo
- cd hippo; ln -s ../make.common make.common; \
- ln -s ../make.next make.next; \
- make -f make.common "FLAVOR=next" "SRC_DIR=.." links
- $(RM) $(RMFLAGS) hippo/libhippo*.a
- tar ohvcf hippo.tar hippo
- compress hippo.tar
- $(RM) $(RMFLAGS) -r hippo
-
- test : util h_test
- $(BIN_DIR)/h_test
- diff h_test.out h_test.out2
- $(BIN_DIR)/text2nt example.hiptxt example.hippo2
- $(BIN_DIR)/nt2text example.hippo2 example.hiptxt2
- diff example.hiptxt example.hiptxt2 > /dev/null
- cmp example.hippo example.hippo2
- $(RM) $(RMFLAGS) h_test.out2 example.hippo2 example.hiptxt2
-
-
- # When copying or moving files to installation directory, copy to
- # temp file then overwrite original. This solves some pathological
- # cases where you are moving a link onto its parent file.
- install:
- $(MAKE) all
- -@echo
- -@for LIB in $(INSTALL_LIBS); \
- do \
- LIB=lib$${LIB}.a; \
- if test -f ${LIB_DIR}/$${LIB}; then \
- echo "Moving ${LIB_DIR}/$${LIB} to $(LIB_INSTALLDIR)/"; \
- $(CP) -p ${LIB_DIR}/$${LIB} $(LIB_INSTALLDIR)/$${LIB}.tmp; \
- $(MV) -f $(LIB_INSTALLDIR)/$${LIB}.tmp $(LIB_INSTALLDIR)/$${LIB};\
- $(RANLIB) $(LIB_INSTALLDIR)/$${LIB};\
- if test -f ${LIB_INSTALLDIR}/$${LIB}; then \
- $(RM) $(RMFLAGS) ${LIB_DIR}/$${LIB}; \
- fi; \
- fi; \
- done
- -@for INC in $(INSTALL_INCS); \
- do \
- echo Copying $${INC} to $(INC_INSTALLDIR); \
- $(CP) $${INC} $(INC_INSTALLDIR)/$${INC}.tmp; \
- $(MV) -f $(INC_INSTALLDIR)/$${INC}.tmp $(INC_INSTALLDIR)/$${INC}; \
- done
- -@for BIN in $(INSTALL_BINS); \
- do \
- if test -f ${BIN_DIR}/$${BIN}; then \
- echo "Moving ${BIN_DIR}/$${BIN} to $(BIN_INSTALLDIR)/"; \
- $(CP) -p ${BIN_DIR}/$${BIN} $(BIN_INSTALLDIR)/$${BIN}.tmp; \
- $(MV) -f $(BIN_INSTALLDIR)/$${BIN}.tmp $(BIN_INSTALLDIR)/$${BIN};\
- if test -f ${BIN_INSTALLDIR}/$${BIN}; then \
- $(RM) $(RMFLAGS) ${BIN_DIR}/$${BIN}; \
- fi; \
- fi; \
- done
-
-
- # Create links to files in production directory
- # the silly echo's are to shut ultrix up
- links :
- -@for FILE in $(TARFILES); \
- do \
- if test ! -f $${FILE} -a ! -d $${FILE} -a \
- -f $(SRC_DIR)/$${FILE}; then \
- echo Linking to $(SRC_DIR)/$${FILE}; \
- rm -f $${FILE}; \
- ln -s $(SRC_DIR)/$${FILE} $${FILE}; \
- fi; \
- done; \
- echo junk > /dev/null
- -@for LIB in $(INSTALL_LIBS); \
- do \
- LIB=lib$${LIB}.a; \
- if test ! -f $(LIB_DIR)/$${LIB} -a \
- -f $(LIB_INSTALLDIR)/$${LIB}; then \
- echo Linking to $(LIB_INSTALLDIR)/$${LIB}; \
- rm -f $(LIB_DIR)/$${LIB}; \
- ln -s $(LIB_INSTALLDIR)/$${LIB} $(LIB_DIR)/$${LIB}; \
- fi; \
- done; \
- echo junk > /dev/null
-
- # Checkin checked out files
- checkin :
- -@for FILE in $(SRC_FILES) Makefile; \
- do \
- if test -f $${FILE} -a ! -h $${FILE}; then \
- echo Checkin to $(SRC_DIR)/$${FILE}; \
- checkin $${FILE}; \
- fi; \
- done
-
-
- $(LIBRARY) : $(LIBMEMS)
- $(RANLIB) $@
-
- nt2text : nt2text.c $(UTIL_LIB)
- $(CC) $(CFLAGS) $@.c -o $(BIN_DIR)/$@ $(LDFLAGS)
-
- text2nt : text2nt.c $(UTIL_LIB)
- $(CC) $(CFLAGS) $@.c -o $(BIN_DIR)/$@ $(LDFLAGS)
-
- h_test : h_test.c $(UTIL_LIB)
- $(CC) $(CFLAGS) $@.c -o $(BIN_DIR)/$@ $(LDFLAGS)
-
- x11test : x11test.c $(UTIL_LIB)
- $(CC) $(CFLAGS) $@.c -o $(BIN_DIR)/$@ $(LDFLAGS)
-
- # Note: getarg.c should be in your FORTRAN run time support
- hb2hippo :: hb2hippo.f $(UTIL_LIB)
- $(FC) $(FFLAGS) $@.f -o $(BIN_DIR)/$@ $(LDFLAGS) $(HB2HADD)
-
-
- $(LIBRARY)(hippontuple.o) : hippontuple.c hippo.h hippostruct.h hippoutil.h
- $(LIBRARY)(hippodisplay.o) : hippodisplay.c hippo.h hippostruct.h hippoutil.h
- $(LIBRARY)(hippoplot.o) : hippoplot.c hippo.h hippostruct.h hippoutil.h
- $(LIBRARY)(hippoprint.o) : hippoprint.c hippo.h hippostruct.h hippoutil.h
- $(LIBRARY)(hippoio.o) : hippoio.c hippo.h hippostruct.h hippoutil.h
- $(LIBRARY)(hippoutil.o) : hippoutil.c hippo.h hippostruct.h hippoutil.h
- $(LIBRARY)(ntuple-parse.o) : ntuple-parse.c hippo.h hippostruct.h hippoutil.h
- $(LIBRARY)(hippoxdr.o) : hippoxdr.c hippo.h hippostruct.h hippoutil.h
- $(LIBRARY)(fhippo.o) : fhippo.c hippo.h hippostruct.h hippoutil.h
-
- $(LIBRARY)(hippof.o) : hippof.f
-
- $(LIBRARY)(hippoio.o) $(LIBRARY)(hippoxdr.o) : hippoxdr.h
-
- # plot drivers: will only be used if included in $(MACH_DEP_MEMS)
- $(LIBRARY)(hippoplot.o) : $(DRVR_INCS) hippoplotPS.h
- $(CC) -c $(CFLAGS) $(PLOTCFLAGS) $<
- $(AR) $(ARFLAGS) $@ $*.o
- $(RM) -f $*.o
-
-
- $(LIBRARY)(hippoplotNeXT.o) : hippoplotNeXT.c hippoplotNeXT.h hippowrapsps.h
- $(LIBRARY)(hippoplotNeXT.o) : hippo.h hippostruct.h hippoutil.h
-
- $(LIBRARY)(hippoplotUP.o) : hippoplotUP.c hippoplotUP.h
- $(LIBRARY)(hippoplotUP.o) : hippo.h hippostruct.h hippoutil.h
-
- $(LIBRARY)(hippoplotXIV.o) : hippoplotXIV.cc hippoplotXIV.h
- $(LIBRARY)(hippoplotXIV.o) : hippo.h hippostruct.h hippoutil.h
-
- $(LIBRARY)(hippoplotX11.o) : hippoplotX11.c hippoplotX11.h
- $(LIBRARY)(hippoplotX11.o) : hippo.h hippostruct.h hippoutil.h
-
- $(LIBRARY)(hippoplotPS.o) : hippoplotPS.c hippoplotPS.h
- $(LIBRARY)(hippoplotPS.o) : hippo.h hippostruct.h hippoutil.h
-
- $(LIBRARY)(hippowrapsps.o) : hippowrapsps.c
- hippowrapsps.c hippowrapsps.h : hippowrapsps.psw
-