forked from Wikinaut/agrep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
132 lines (108 loc) · 3.36 KB
/
Makefile
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
132
#
# agrep
#
# Makefile for the LINUX version of AGREP
#
# Copyright (c) 1994 Sun Wu, Udi Manber, Burra Gopal. All Rights Reserved.
#
# CC = gcc -ansi -O3
# for cross-compilation to Windows
# see http://mxe.cc/#tutorial
#
# use
# make CROSS=i686-pc-mingw32-
CC=$(CROSS)gcc
# ---------------------------------------------------------------------
# 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 codepage_SET to be 1 if you want to use the international
# 8bit character set. Else define it to be 0.
# ---------------------------------------------------------------------
# This switch has not been introduced by me ! [TG] 05.10.96
ISO_CHAR_SET = 1
OPTIMIZEFLAGS = -O3
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) \
-DS_IFLNK=-1 \
-Dlstat=stat
SUBDIRCFLAGS = -c $(DEFINEFLAGS) $(OPTIMIZEFLAGS)
MYDEFINEFLAGS = -DMEASURE_TIMES=0 \
-DAGREP_POINTER=1 \
-DDOTCOMPRESSED=0
# -Werror=no-unprototyped-calls
CFLAGS = $(MYDEFINEFLAGS) $(SUBDIRCFLAGS)
OTHERLIBS =
PROG = agrep
HDRS = agrep.h checkfil.h re.h defs.h config.h codepage.h version.h
OBJS = follow.o \
asearch.o \
asearch1.o \
agrep.o \
bitap.o \
checkfil.o \
compat.o \
dummyfil.o \
main.o \
maskgen.o \
parse.o \
checksg.o \
preproce.o \
delim.o \
asplit.o \
recursiv.o \
sgrep.o \
newmgrep.o \
utilitie.o \
codepage.o \
agrephlp.o
ifeq ($(CROSS),i686-pc-mingw32-)
$(PROG).exe: $(OBJS) $(HDRS)
$(CC) -o $(PROG).exe $(OBJS)
else
$(PROG): $(OBJS) $(HDRS)
$(CC) -o $(PROG) $(OBJS)
endif
clean:
rm -f *.o
rm -f $(PROG)
rm -f $(PROG).exe
# The header file config.h should be visible in the whole source code
# Apparently, it is not at the moment. [TG] 28.09.96
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 codepage.h
checkfil.o: agrep.h checkfil.h defs.h config.h
follow.o: re.h agrep.h defs.h config.h
main.o: agrep.h checkfil.h defs.h config.h
agrep.o: agrep.h checkfil.h defs.h config.h version.h codepage.h
agrephlp.o: version.h config.h
newmgrep.o: agrep.h defs.h config.h codepage.h
maskgen.o: agrep.h defs.h config.h codepage.h
next.o: agrep.h defs.h config.h
parse.o: re.h agrep.h defs.h config.h
preproce.o: agrep.h defs.h config.h
checksg.o: agrep.h checkfil.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 codepage.h
abm.o: agrep.h defs.h config.h
utilitie.o: re.h agrep.h defs.h config.h
dummyfil.o: config.h
codepage.o: codepage.h config.h agrep.h