forked from VirusTotal/yara
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.am
218 lines (179 loc) · 3.8 KB
/
Makefile.am
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# Rules for generating YARA modules from .proto files. For each .proto file
# three files are generated: .c, .pb-c.c, and .pb-c.h. The .c file is generated
# by protoc-gen-yara and the other two by protoc-gen-c. This is done only if
# protoc is found, if not, files already in the repository are used instead
# of generating fresh ones from the .proto file.
#
if PROTOC
SUFFIXES = .proto .pb-c.c .pb-c.h .c
.proto.pb-c.c:
$(PROTOC) --c_out=$(builddir) $^ -Ipb/ -I=$(srcdir)
.proto.pb-c.h:
$(PROTOC) --c_out=$(builddir) $^ -Ipb/ -I=$(srcdir)
.proto.c:
$(PROTOC) --c_out=$(builddir) $^ -Ipb/ -I=$(srcdir)
endif
MODULES = modules/tests/tests.c
MODULES += modules/elf/elf.c
MODULES += modules/math/math.c
MODULES += modules/time/time.c
MODULES += modules/pe/pe.c
MODULES += modules/pe/pe_utils.c
if CUCKOO_MODULE
MODULES += modules/cuckoo/cuckoo.c
endif
if MAGIC_MODULE
MODULES += modules/magic/magic.c
endif
if HASH_MODULE
MODULES += modules/hash/hash.c
endif
if DOTNET_MODULE
MODULES += modules/dotnet/dotnet.c
endif
if MACHO_MODULE
MODULES += modules/macho/macho.c
endif
if DEX_MODULE
MODULES += modules/dex/dex.c
endif
if PB_TESTS_MODULE
MODULES += modules/pb_tests/pb_tests.c
MODULES += modules/pb_tests/pb_tests.pb-c.c
endif
#
# Add your modules here:
#
# MODULES += modules/yourmodule.c
#
AM_YFLAGS=-d
AM_CFLAGS=-Wall -Wno-deprecated-declarations \
-D_GNU_SOURCE \
-I$(srcdir)/include
if DEBUG
AM_CFLAGS+=-g
endif
if OPTIMIZATION
AM_CFLAGS+=-O3
else
AM_CFLAGS+=-O0
endif
if ADDRESS_SANITIZER
AM_CFLAGS+=-fsanitize=address
endif
if GCC
AM_CFLAGS+=-fvisibility=hidden
endif
ACLOCAL_AMFLAGS=-I m4
include_HEADERS = include/yara.h
yaraincludedir = $(includedir)/yara
yarainclude_HEADERS = \
include/yara/ahocorasick.h \
include/yara/arena.h \
include/yara/atoms.h \
include/yara/base64.h \
include/yara/bitmask.h \
include/yara/compiler.h \
include/yara/error.h \
include/yara/exec.h \
include/yara/exefiles.h \
include/yara/filemap.h \
include/yara/hash.h \
include/yara/integers.h \
include/yara/libyara.h \
include/yara/limits.h \
include/yara/mem.h \
include/yara/modules.h \
include/yara/object.h \
include/yara/parser.h \
include/yara/proc.h \
include/yara/re.h \
include/yara/rules.h \
include/yara/scan.h \
include/yara/scanner.h \
include/yara/sizedstr.h \
include/yara/stack.h \
include/yara/stopwatch.h \
include/yara/stream.h \
include/yara/strutils.h \
include/yara/threading.h \
include/yara/types.h \
include/yara/utils.h
noinst_HEADERS = \
crypto.h \
exception.h \
include/yara/dotnet.h \
include/yara/elf.h \
include/yara/endian.h \
include/yara/globals.h \
include/yara/hex_lexer.h \
include/yara/lexer.h \
include/yara/pe.h \
include/yara/pe_utils.h \
include/yara/re_lexer.h \
modules/module_list
dist_noinst_DATA = pb/yara.proto
lib_LTLIBRARIES = libyara.la
libyara_la_LDFLAGS = -version-number 3:11:0
BUILT_SOURCES = \
lexer.c \
hex_lexer.c \
re_lexer.c \
grammar.c \
hex_grammar.c \
re_grammar.c
libyara_la_SOURCES = \
$(MODULES) \
grammar.y \
ahocorasick.c \
arena.c \
atoms.c \
base64.c \
bitmask.c \
compiler.c \
endian.c \
exec.c \
exefiles.c \
filemap.c \
hash.c \
hex_grammar.y \
hex_lexer.l \
lexer.l \
libyara.c \
mem.c \
modules.c \
object.c \
parser.c \
proc.c \
re.c \
re_grammar.y \
re_lexer.l \
rules.c \
scan.c \
scanner.c \
sizedstr.c \
stack.c \
stopwatch.c \
strutils.c \
stream.c \
threading.c
if USE_WINDOWS_PROC
libyara_la_SOURCES += proc/windows.c
endif
if USE_LINUX_PROC
libyara_la_SOURCES += proc/linux.c
endif
if USE_FREEBSD_PROC
libyara_la_SOURCES += proc/freebsd.c
endif
if USE_OPENBSD_PROC
libyara_la_SOURCES += proc/openbsd.c
endif
if USE_MACH_PROC
libyara_la_SOURCES += proc/mach.c
endif
if USE_NO_PROC
libyara_la_SOURCES += proc/none.c
endif
pkgconfigdir = $(libdir)/pkgconfig
nodist_pkgconfig_DATA = yara.pc