summaryrefslogtreecommitdiffstats
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile253
1 files changed, 147 insertions, 106 deletions
diff --git a/src/Makefile b/src/Makefile
index 93c3414..7286596 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,117 +1,158 @@
-### Name of target
-TARGET = libhdf5.a
-
+# Generated automatically from Makefile.in by configure.
+# HDF5 Library Makefile(.in) -*- makefile -*-
#
-# PART 2: various choices
+# Copyright (C) 1997 National Center for Supercomputing Applications.
+# All rights reserved.
#
-
-### -DDEBUG Debugging options on
-DEFS =
-
+#
+
+#------------------------------------------------------------- -*- makefile -*-
+# The following section of this makefile comes from the
+# `./config/commence' file which was generated with config.status
+# from `./config/commence.in'.
+#------------------------------------------------------------------------------
+
+# Things that Make needs
+.SUFFIXES:
+.SUFFIXES: .c .o
+
+
+# Programs
+SHELL=/bin/sh
+CC=gcc
+CFLAGS=-g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
+CPPFLAGS=
+LIBS=
+AR=ar
+RANLIB=ranlib
+RM=rm -f
+INSTALL=/usr/bin/install -c
+INSTALL_PROGRAM=${INSTALL}
+INSTALL_DATA=${INSTALL} -m 644
+
+# Installation points
+prefix=/usr/local
+exec_prefix=${prefix}
+bindir=${exec_prefix}/bin
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+#------------------------------------------------------------------------------
+# The following section of this makefile comes from the middle of `Makefile.in'
+# from this directory. It was generated by running `config.status'.
+#------------------------------------------------------------------------------
+
+# Add `-I.' to the C preprocessor flags.
+CPPFLAGS=-I.
+
+# These are our main targets:
+LIB=libhdf5.a
+PROGS=debug
+
+# Source and object files for the library (lexicographically)...
+LIB_SRC=H5.c H5A.c H5AC.c H5B.c H5C.c H5D.c H5E.c H5F.c H5G.c H5Gnode.c \
+ H5H.c H5M.c H5MF.c H5MM.c H5O.c H5Ocont.c H5Oname.c H5Onull.c \
+ H5Ostab.c H5Osdtyp.c H5Osdim.c H5P.c H5T.c
+LIB_OBJ=$(LIB_SRC:.c=.o)
+
+# Source and object files for programs...
+PROG_SRC=debug.c
+PROG_OBJ=$(PROG_SRC:.c=.o)
+
+# Public header files (to be installed)...
+PUB_HDR=H5public.h H5Apublic.h H5ACpublic.h H5Bpublic.h H5Cpublic.h \
+ H5Dpublic.h H5Epublic.h H5Fpublic.h H5Gpublic.h H5Hpublic.h \
+ H5Mpublic.h H5MFpublic.h H5MMpublic.h H5Opublic.h H5Ppublic.h \
+ H5Tpublic.h H5config.h hdf5.h
+
+# Other header files (not to be installed)...
+PRIVATE_HDR=H5private.h H5Aprivate.h H5ACprivate.h H5Bprivate.h \
+ H5Cprivate.h H5Dprivate.h H5Eprivate.h H5Fprivate.h H5Gprivate.h \
+ H5Hprivate.h H5Mprivate.h H5MFprivate.h H5MMprivate.h \
+ H5Oprivate.h H5Pprivate.h H5Tprivate.h
+
+# How to build the programs...
+debug: debug.o $(LIB)
+ $(CC) $(CFLAGS) -o $@ debug.o $(LIB)
+
+
+#------------------------------------------------------------- -*- makefile -*-
+# The following section of this makefile comes from the
+# `./config/conclude' file which was generated with config.status
+# from `./config/conclude.in'.
+#------------------------------------------------------------------------------
+
+# The default is to build the library and programs.
+all: $(LIB) $(PROGS)
+lib: $(LIB)
+
+# This is the target for the library described in the main body of the
+# makefile.
#
-# PART 3: hardware dependend
+$(LIB) __no_library__: $(LIB_OBJ)
+ $(AR) -rc $@ $(LIB_OBJ)
+ $(RANLIB) $@
+
+# Build a tags file in this directory.
+TAGS: $(LIB_SRC)
+ $(RM) $@
+ -etags $(LIB_SRC)
+
+# Install the library, the public header files, and programs.
+install: $(LIB) $(PUB_HDR) $(PROGS)
+ @if test -n "$(LIB)"; then \
+ (set -x; $(INSTALL_DATA) $(LIB) $(libdir) || exit 1); \
+ fi
+ @if test -n "$(PUB_HDR)"; then \
+ (set -x; $(INSTALL_DATA) $(PUB_HDR) $(includedir) || exit 1); \
+ fi
+ @if test -n "$(PROGS)"; then \
+ (set -x; $(INSTALL_PROGRAM) $(PROGS) $(bindir) || exit 1); \
+ fi
+
+# Removes those things that `make install' (would have) installed.
+uninstall:
+ $(RM) $(libdir)/$(LIB)
+ $(RM) $(includedir)/$(PUB_HDR)
+ $(RM) $(bindir)/$(PROGS)
+
+# Removes temporary files without removing the final target files. That is,
+# remove things like object files but not libraries or executables.
#
+mostlyclean:
+ $(RM) $(LIB_OBJ) $(PROG_OBJ)
-### CC entry: name and arguments for the compiler (also for linking)
-### MACHINE entry: defines used for compiling (not for linking)
-### LIBS: defines used for linking
-MACHINE =
-CC=gcc -O
-LIBS =
-
-################################################
-## no changes required below this line ##
-################################################
-
-CFLAGS = -c $(MACHINE) $(DEFS)
-
-INCL = hdf5.h
-
-OBJ = H5.o H5E.o H5A.o H5F.o H5C.o H5M.o H5AC.o H5B.o H5MM.o H5MF.o H5T.o \
- H5Gnode.o H5H.o H5G.o H5P.o H5D.o H5O.o H5Onull.o H5Ocont.o H5Ostab.o \
- H5Oname.o
-
-$(TARGET): $(OBJ)
- $(AR) $(ARFLAGS) $(TARGET) $(OBJ)
- $(RANLIB) $(TARGET)
-
-all test: $(TARGET) debug_hdf5
-
-debug: $(OBJ)
- $(AR) $(ARFLAGS) $(TARGET) $(OBJ)
- $(RANLIB) $(TARGET)
-
-clean:
- -rm -f *.o core debug $(TARGET)
- -rm -f *.bak
-
-###########################################################################
-
-debug_hdf5: $(TARGET) debug.o
- $(CC) -o debug debug.o -L. -lhdf5
-
-debug.o: debug.c $(INCL)
- $(CC) $(CFLAGS) debug.c
-
-H5.o: H5.c $(INCL) H5private.h H5proto.h
- $(CC) $(CFLAGS) H5.c
-
-H5E.o: H5E.c $(INCL) H5Eprivate.h H5Eproto.h
- $(CC) $(CFLAGS) H5E.c
-
-H5F.o: H5F.c $(INCL) H5Fprivate.h H5Fproto.h
- $(CC) $(CFLAGS) H5F.c
-
-H5C.o: H5C.c $(INCL) H5Cprivate.h H5Cproto.h
- $(CC) $(CFLAGS) H5C.c
-
-H5M.o: H5M.c $(INCL) H5Mprivate.h H5Mproto.h
- $(CC) $(CFLAGS) H5M.c
-
-H5A.o: H5A.c $(INCL) H5Aprivate.h H5Aproto.h
- $(CC) $(CFLAGS) H5A.c
-
-H5AC.o: H5AC.c $(INCL) H5ACprivate.h H5ACproto.h
- $(CC) $(CFLAGS) H5AC.c
-
-H5B.o: H5B.c $(INCL) H5Bprivate.h H5Bproto.h
- $(CC) $(CFLAGS) H5B.c
-
-H5MM.o: H5MM.c $(INCL) H5MMprivate.h H5MMproto.h
- $(CC) $(CFLAGS) H5MM.c
-
-H5MF.o: H5MF.c $(INCL) H5MFprivate.h H5MFproto.h
- $(CC) $(CFLAGS) H5MF.c
-
-H5T.o: H5T.c $(INCL) H5Tprivate.h H5Tproto.h
- $(CC) $(CFLAGS) H5T.c
-
-H5Gnode.o: H5Gnode.c $(INCL) H5Gprivate.h H5Gproto.h
- $(CC) $(CFLAGS) H5Gnode.c
-
-H5H.o: H5H.c $(INCL) H5Hprivate.h H5Hproto.h
- $(CC) $(CFLAGS) H5H.c
-
-H5G.o: H5G.c $(INCL) H5Gprivate.h H5Gproto.h
- $(CC) $(CFLAGS) H5G.c
-
-H5P.o: H5P.c $(INCL) H5Pprivate.h H5Pproto.h
- $(CC) $(CFLAGS) H5P.c
+# Like `mostlyclean' except it also removes the final targets: things like
+# libraries and executables. This target doesn't remove any file that
+# is part of the HDF5 distribution.
+#
+clean: mostlyclean
+ $(RM) $(LIB) $(PROGS)
-H5D.o: H5D.c $(INCL) H5Dprivate.h H5Dproto.h
- $(CC) $(CFLAGS) H5D.c
+# Like `clean' except it also removes files that were created by running
+# configure. If you've unpacked the source and built HDF5 without creating
+# any other files, then `make distclean' will leave only the files that were
+# in the distribution.
+#
+distclean: clean
+ $(RM) .depend TAGS
+ @if test -f Makefile.in; then \
+ (set -x; $(RM) Makefile); \
+ fi
+
+# Like `distclean' except it deletes all files that can be regenerated from
+# the makefile, including those generated from autoheader and autoconf.
+#
+maintainer-clean: distclean
-H5O.o: H5O.c $(INCL) H5Oprivate.h H5Oproto.h
- $(CC) $(CFLAGS) H5O.c
-H5Onull.o: H5Onull.c $(INCL) H5Oprivate.h H5Oproto.h
- $(CC) $(CFLAGS) H5Onull.c
+# Implicit rules
+.c.a:
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
+ $(AR) -rc $@ $*.o
+ $(RM) $*.o
-H5Ocont.o: H5Ocont.c $(INCL) H5Oprivate.h H5Oproto.h
- $(CC) $(CFLAGS) H5Ocont.c
+.c.o:
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
-H5Ostab.o: H5Ostab.c $(INCL) H5Oprivate.h H5Oproto.h
- $(CC) $(CFLAGS) H5Ostab.c
-H5Oname.o: H5Oname.c $(INCL) H5Oprivate.h H5Oproto.h
- $(CC) $(CFLAGS) H5Oname.c