1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
################################################################################
# #
# makefile.linux - Make library of functions for reading and writing VAX #
# format data for Linux. #
# #
# Shell command syntax: make -f makefile.linux \ #
# [ CC="c_compiler" ] \ #
# [ CFLAGS="c_compiler_flags" ] \ #
# [ all | libvaxdata | clean ] #
# #
# #
# Author: Lawrence M. Baker #
# U.S. Geological Survey #
# 345 Middlefield Road MS977 #
# Menlo Park, CA 94025 #
# baker@usgs.gov #
# #
# Citation: Baker, Lawrence M., 2005, libvaxdata: VAX Data Format Conver- #
# sion Routines, US Geological Survey, Open-File Report no. #
# 2005-XXX, nn p. #
# #
# #
# Disclaimer #
# #
# Although this program has been used by the USGS, no warranty, expressed or #
# implied, is made by the USGS or the United States Government as to the #
# accuracy and functioning of the program and related program material, nor #
# shall the fact of distribution constitute any such warranty, and no #
# responsibility is assumed by the USGS in connection therewith. #
# #
# #
# Modification History: #
# #
# 2-Sep-2005 L. M. Baker Original version (from make.libvfbb). #
# 5-Oct-2005 L. M. Baker Use custom compile rule for is_little_endian. #
# 2-Aug-2006 P. J. Caulfield Remove -c from ar command. #
# #
################################################################################
# GNU C
# -O3 (highest level of optimization) -ansi (strict ANSI)
#CC = gcc
#CFLAGS = -O3 -ansi
# Intel C
# -O3 (highest level of optimization) -ansi (strict ANSI)
#CC = icc
#CFLAGS = -O3 -ansi
# Portland Group C
# -O3 (highest level of optimization) -Xa (strict ANSI)
#CC = pgcc
#CFLAGS = -O3 -Xa
# i686 on Intel PIII/P4; x86_64 on AMD Opteron/Intel EM64T
ARCH = `uname -m`
LIB_NAME = libvaxdata
OBJS = from_vax_i2.o from_vax_i2_.o from_vax_i4.o \
from_vax_i4_.o from_vax_r4.o from_vax_r4_.o \
from_vax_d8.o from_vax_d8_.o from_vax_g8.o \
from_vax_g8_.o from_vax_h16.o from_vax_h16_.o \
to_vax_i2.o to_vax_i2_.o to_vax_i4.o \
to_vax_i4_.o to_vax_r4.o to_vax_r4_.o \
to_vax_d8.o to_vax_d8_.o to_vax_g8.o \
to_vax_g8_.o to_vax_h16.o to_vax_h16_.o \
is_little_endian.o is_little_endian_.o
VPATH = ../../src
all: $(LIB_NAME)
$(LIB_NAME):
test -d $(ARCH) || mkdir $(ARCH)
cd $(ARCH) ; $(MAKE) -f ../makefile.linux \
CC="$(CC)" \
CFLAGS="$(CFLAGS)" \
$(LIB_NAME).a
cd $(ARCH) ; $(RM) $(OBJS)
$(LIB_NAME).a: $(OBJS)
ar -r $(LIB_NAME).a $(OBJS)
ranlib $(LIB_NAME).a
is_little_endian.o: is_little_endian.c
$(CC) -c -o $@ $?
is_little_endian_.o: is_little_endian_.c
$(CC) -c -o $@ $?
clean:
cd $(ARCH) ; $(RM) -f $(LIB_NAME).a $(OBJS)
|