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 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
# Copyright (c) 1994 Sun Wu, Udi Manber, Burra Gopal. All Rights Reserved.
# You might have to change these depending on your machine configuration.
# AR and RANLIB are the library-archive programs. On Solaris, RANLIB is not
# required (define it to true) and AR is in /usr/ccs/bin/ar (on our machine!).
AR = ar #/usr/ccs/bin/ar #for Solaris
RANLIB = ranlib #true #for Solaris
# Define HAVE_DIRENT_H to be 1 when you don't have <sys/dir.h> else define it to be 0 (in this case, one of the other 3 flags may need to be defined to be 1).
HAVE_DIRENT_H = 1
HAVE_SYS_DIR_H = 0
HAVE_SYS_NDIR_H = 0
HAVE_NDIR_H = 0
# Define UTIME to be 1 if you have the utime() routine on your system. Else define it to be 0.
UTIME = 1
# Define ISO_CHAR_SET to be 1 if you want to use the international 8bit character set. Else define it to be 0.
ISO_CHAR_SET = 0
# You might have to change this depending on your machine configuration.
CC = gcc -m486
SHELL = /bin/sh
# YOU DON'T HAVE TO CHANGE ANYTHING BELOW THIS LINE
# The binaries will be made in ../bin/. and the agrep library in ../lib
# You normally don't have to change them.
BINDIR = ../bin
LIBDIR = ../lib
TCOMP = cast
TCOMPDIR = ../compress
AGREPDIR = ../agrep
TEMPLATEDIR = ../libtemplate
# You can change the target to use the "cast" (compression) library by changing:
# all: $(NOTCPROG)
# to:
# all: $(PROG)
# You must also define DOTCOMPRESSED below to be 1 instead of 0.
DOTCOMPRESSED = 0
# Include flags is not a part of CLFAGS and LINKFLAGS since path names from subdirs can be different
OPTIMIZEFLAGS = -O2
#PROFILEFLAGS = -p
#DEBUGFLAGS = -g -DBG_DEBUG=1 -DDEBUG=1
INCLUDEFLAGS = -I$(AGREPDIR) -I$(TEMPLATEDIR)/include
DEFINEFLAGS = -DHAVE_DIRENT_H=$(HAVE_DIRENT_H) -DHAVE_SYS_DIR_H=$(HAVE_SYS_DIR_H) -DHAVE_SYS_NDIR_H=$(HAVE_SYS_NDIR_H) -DHAVE_NDIR_H=$(HAVE_NDIR_H) \
-DUTIME=$(UTIME) -DISO_CHAR_SET=$(ISO_CHAR_SET)
SUBDIRCFLAGS = -c $(DEFINEFLAGS) $(OPTIMIZEFLAGS) $(PROFILEFLAGS) $(DEBUGFLAGS)
MYDEFINEFLAGS = -DMEASURE_TIMES=0 -DAGREP_POINTER=1 -DDOTCOMPRESSED=$(DOTCOMPRESSED)
CFLAGS = $(MYDEFINEFLAGS) $(INCLUDEFLAGS) $(SUBDIRCFLAGS)
SUBDIRLINKFLAGS = $(PROFILEFLAGS)
LINKFLAGS = $(INCLUDEFLAGS) $(SUBDIRLINKFLAGS)
OTHERLIBS =
PROG = agrep
NOTCPROG = notc$(PROG)
all: $(NOTCPROG)
cp $(PROG) $(BINDIR)/.
LIB = $(LIBDIR)/lib$(PROG).a
HDRS = agrep.h checkfile.h re.h defs.h config.h
TCOMPLIBOBJ = \
$(TCOMPDIR)/hash.o \
$(TCOMPDIR)/string.o \
$(TCOMPDIR)/misc.o \
$(TCOMPDIR)/quick.o \
$(TCOMPDIR)/cast.o \
$(TCOMPDIR)/uncast.o \
$(TCOMPDIR)/tsimpletest.o \
$(TCOMPDIR)/tbuild.o\
$(TCOMPDIR)/tmemlook.o
OBJS = \
follow.o \
asearch.o \
asearch1.o \
agrep.o \
bitap.o \
checkfile.o \
compat.o \
maskgen.o \
parse.o \
checksg.o \
preprocess.o \
delim.o \
asplit.o \
recursive.o \
sgrep.o \
newmgrep.o \
utilities.o
$(PROG): $(OBJS) main.o $(LIBDIR)/lib$(TCOMP).a
$(CC) -L$(LIBDIR) $(LINKFLAGS) -o $@ $(OBJS) main.o -l$(TCOMP) $(OTHERLIBS)
$(AR) rcv $(LIB) $(OBJS) $(TCOMPLIBOBJ)
$(RANLIB) $(LIB)
$(LIBDIR)/lib$(TCOMP).a:
cd $(TCOMPDIR) ; $(MAKE) -f Makefile.linux CC="$(CC)" SUBDIRCFLAGS="$(SUBDIRCFLAGS)" SUBDIRLINKFLAGS="$(SUBDIRLINKFLAGS)" SHELL="$(SHELL)" HAVE_DIRENT_H="$(HAVE_DIRENT_H)" HAVE_SYS_DIR_H="$(HAVE_SYS_DIR_H)" HAVE_SYS_NDIR_H="$(HAVE_SYS_NDIR_H)" HAVE_NDIR_H="$(HAVE_NDIR_H)" UTIME="$(UTIME)" STRUCTURED_QUERIES="$(STRUCTURED_QUERIES)" ISO_CHAR_SET="$(ISO_CHAR_SET)" SFS_COMPAT="$(SFS_COMPAT)"
$(NOTCPROG): $(OBJS) dummyfilters.o main.o
$(CC) $(LINKFLAGS) -o $(PROG) $(OBJS) dummyfilters.o main.o $(OTHERLIBS)
$(AR) rcv $(LIB) $(OBJS) dummyfilters.o
$(RANLIB) $(LIB)
clean:
-rm -f $(LIB) $(OBJS) dummyfilters.o main.o core a.out $(PROG)
compat.o: agrep.h defs.h config.h
asearch.o: agrep.h defs.h config.h
asearch1.o: agrep.h defs.h config.h
bitap.o: agrep.h defs.h config.h
checkfile.o: agrep.h checkfile.h defs.h config.h
follow.o: re.h agrep.h defs.h config.h
main.o: agrep.h checkfile.h defs.h config.h dummysyscalls.c
agrep.o: agrep.h checkfile.h defs.h config.h
newmgrep.o: agrep.h defs.h config.h
maskgen.o: agrep.h defs.h config.h
next.o: agrep.h defs.h config.h
parse.o: re.h agrep.h defs.h config.h
preprocess.o: agrep.h defs.h config.h
checksg.o: agrep.h checkfile.h defs.h config.h
delim.o: agrep.h defs.h config.h
asplit.o: agrep.h defs.h config.h
sgrep.o: agrep.h defs.h config.h
abm.o: agrep.h defs.h config.h
utilities.o: re.h agrep.h defs.h config.h
dummyfilters.o: dummyfilters.c
|