# # 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 # 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 LDLIBS=-lm # 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 dos.c system.c OBJ=$(SRC:.c=.o) vanilla: $(OBJ) $(CC) $(LDFLAGS) $(OBJ) $(LDLIBS) -o vanilla .c.o: $(CC) -c $(CFLAGS) $< checkin: ci $(SRC) Makefile co $(SRC) Makefile 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) | compress - > vanilla-$(VER).tar.Z && \ echo "Distribution saved in vanilla-$(VER).tar.Z" 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