# # Define the default C compiler # # Default: gcc # # Native: HP: c89 # Sun: acc (Solaris: /opt/SUNWspro/SC2.0/cc) CC = gcc # # Define the default C compiler flags and machine specific ones # # gcc: HP: -ansi -Dhpux -D__hpux -Dunix -D__unix # SunOS: -ansi -static -fno-builtin -Dsun -Dsun4 -Dunix # Solaris: -Dsun -Dsparc -Dunix # Native: HP: -Aa # Sun: # #CFLAGS = $(DEBUG) $(INCPATH) -Dsun -Dsparc -Dunix CFLAGS = -ansi $(DEBUG) $(INCPATH) -Dsun # # Comment this out if you don't want the Fortran interface # FORTRAN = $(LIB)(F77_int.o) $(LIB)(F77_alt.o) # # Include debug information. Comment out if not needed. # #DEBUG = -g DEBUG = # # LIB is the full name of the library to make # LIB = ./libesrf_data_format.a # # Search paths - `incpath' for include files `libpath' for libraries # #INCPATH = -I../include -I/EXPG/include INCPATH = -I../include # # Define the ranlib command. # # HP: RANLIB = @echo no need for ranlib on # Sun: RANLIB = ranlib # RANLIB = ranlib # # define targets that are internal to this Makefile # $(LIB): $(LIB)(Error.o) $(LIB)(CloseFiles.o) $(LIB)(OpenFiles.o) \ $(LIB)(WriteData.o) $(LIB)(Support.o) $(LIB)(MatchKey.o) \ $(LIB)(GetValues.o) $(LIB)(ReadData.o) $(LIB)(ConvertData.o) \ $(LIB)(Display.o) $(LIB)(Tables.o) $(LIB)(CompressData.o) \ $(LIB)(Find.o) $(LIB)(Version.o) $(LIB)(pack.o) \ $(FORTRAN) $(CC) $(CFLAGS) -c $(?:.o=.c) ar r $@ $? $(RANLIB) $@ rm -f $? @echo library $(LIB) is up-to-date .c.a:; clean: rm -f core $(LIB)