# # This makefile is configured for use with gcc under UNIX. # If you are compiling in another environment, you will probably # need to uncomment a different CFLAGS # # Development compile CFLAGS=-g -fsigned-char -Wimplicit -Wformat -Winline #CFLAGS+=-DDEBUG # Basic compile using gcc, force chars to be signed #CFLAGS=-O -fsigned-char # gcc compile on a SunOS machine #CFLAGS=-O -fsigned-char -DNEED_STRTOUL # For HPUX native compiler #CFLAGS=-O -Ae # For linux and other intel UNIXs #CFLAGS=-O -D_LITTLE_ENDIAN # For SGI native compiler #CFLAGS=-O -signed # Common options #LDFLAGS=-O LDFLAGS=-g LDLIBS=-lm MAKEFILES=makefile.inc makefile.dev makefile.sol makefile.sunos makefile.linux makefile.hpux makefile.irix makefile.rs6k # GNU awk's path AWK=/opt/local/bin/awk SRC= vanilla.c dataset.c header.c dir.c convert.c fields.c select.c \ buffs.c output.c search.c tools.c io_lablib3.c \ fake.c ff_t20.c ff_irtm.c \ dos.c system.c INC= header.h tools.h gendef.h proto.h io_lablib3.h toolbox.h version.h fake.h output.h ff_irtm.h OBJ=$(SRC:.c=.o) vanilla: $(OBJ) $(CC) $(LDFLAGS) $(OBJ) $(LDLIBS) -o vanilla .c.o: $(CC) -c $(CFLAGS) $< clean: rm -f $(OBJ) vanilla depend: gcc -MM $(SRC) >> Makefile dist: VER=`grep 'version[[][]][ ]*=.*;' version.h | sed 's/.*=.*[ ]\([.0-9][.0-9]*\).*\;/\1/'`; \ INC=`gcc -MM $(SRC) | $(AWK) 'BEGIN{ RS="[: \t\n]+"; } { if ($$1 ~ /.h$$/) print $$1 }' | sort -u | $(AWK) 'BEGIN{ ORS=" "; } { print }'`; \ $(MAKE) "VER=$$VER" "INC=$$INC" Dist Dist: tar -cf - Makefile $(SRC) $(INC) $(MAKEFILES) | \ compress - > vanilla-$(VER).tar.Z && \ echo "Distribution saved in vanilla-$(VER).tar.Z" TAGS: $(SRC) $(INC) etags --ignore-indentation $(SRC) $(INC) send: vanilla send.sh `config.guess` dataset.o: header.h tools.h gendef.h proto.h header.o: header.h tools.h gendef.h proto.h io_lablib3.h toolbox.h dir.o: tools.h gendef.h convert.o: header.h tools.h gendef.h proto.h fields.o: header.h tools.h gendef.h proto.h select.o: header.h tools.h gendef.h proto.h buffs.o: proto.h header.h tools.h gendef.h output.o: header.h tools.h gendef.h proto.h search.o: header.h tools.h gendef.h proto.h tools.o: tools.h gendef.h io_lablib3.o: io_lablib3.h toolbox.h vanilla.o: vanilla.c header.h tools.h gendef.h proto.h version.h fake.o: fake.c header.h tools.h gendef.h proto.h output.h fake.h ff_t20.o: ff_t20.c fake.h header.h tools.h gendef.h proto.h output.h ff_irtm.o: ff_irtm.c fake.h header.h tools.h gendef.h proto.h output.h ff_irtm.h