Browse code

Add bytecode test tool.

Török Edvin authored on 2009/06/27 02:23:52
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,7 @@
0
+bin_PROGRAMS = clambc
1
+clambc_SOURCES = \
2
+    bcrun.c
3
+
4
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
5
+LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@
6
+CLEANFILES=*.gcda *.gcno
0 7
new file mode 100644
... ...
@@ -0,0 +1,534 @@
0
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
1
+# @configure_input@
2
+
3
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
5
+# This Makefile.in is free software; the Free Software Foundation
6
+# gives unlimited permission to copy and/or distribute it,
7
+# with or without modifications, as long as this notice is preserved.
8
+
9
+# This program is distributed in the hope that it will be useful,
10
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
+# PARTICULAR PURPOSE.
13
+
14
+@SET_MAKE@
15
+
16
+VPATH = @srcdir@
17
+pkgdatadir = $(datadir)/@PACKAGE@
18
+pkglibdir = $(libdir)/@PACKAGE@
19
+pkgincludedir = $(includedir)/@PACKAGE@
20
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
21
+install_sh_DATA = $(install_sh) -c -m 644
22
+install_sh_PROGRAM = $(install_sh) -c
23
+install_sh_SCRIPT = $(install_sh) -c
24
+INSTALL_HEADER = $(INSTALL_DATA)
25
+transform = $(program_transform_name)
26
+NORMAL_INSTALL = :
27
+PRE_INSTALL = :
28
+POST_INSTALL = :
29
+NORMAL_UNINSTALL = :
30
+PRE_UNINSTALL = :
31
+POST_UNINSTALL = :
32
+build_triplet = @build@
33
+host_triplet = @host@
34
+target_triplet = @target@
35
+bin_PROGRAMS = clambc$(EXEEXT)
36
+subdir = clambc
37
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39
+am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
40
+	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
41
+	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
42
+	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
43
+	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
44
+	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
45
+	$(top_srcdir)/m4/lt~obsolete.m4 \
46
+	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
47
+	$(top_srcdir)/configure.in
48
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
49
+	$(ACLOCAL_M4)
50
+mkinstalldirs = $(install_sh) -d
51
+CONFIG_HEADER = $(top_builddir)/clamav-config.h
52
+CONFIG_CLEAN_FILES =
53
+am__installdirs = "$(DESTDIR)$(bindir)"
54
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
55
+PROGRAMS = $(bin_PROGRAMS)
56
+am_clambc_OBJECTS = bcrun.$(OBJEXT)
57
+clambc_OBJECTS = $(am_clambc_OBJECTS)
58
+clambc_LDADD = $(LDADD)
59
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
60
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
61
+am__depfiles_maybe = depfiles
62
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
63
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
64
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
65
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
66
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
67
+CCLD = $(CC)
68
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
69
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
70
+	$(LDFLAGS) -o $@
71
+SOURCES = $(clambc_SOURCES)
72
+DIST_SOURCES = $(clambc_SOURCES)
73
+ETAGS = etags
74
+CTAGS = ctags
75
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
76
+ACLOCAL = @ACLOCAL@
77
+AMTAR = @AMTAR@
78
+AR = @AR@
79
+ARGZ_H = @ARGZ_H@
80
+AUTOCONF = @AUTOCONF@
81
+AUTOHEADER = @AUTOHEADER@
82
+AUTOMAKE = @AUTOMAKE@
83
+AWK = @AWK@
84
+CC = @CC@
85
+CCDEPMODE = @CCDEPMODE@
86
+CFGDIR = @CFGDIR@
87
+CFLAGS = @CFLAGS@
88
+CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
89
+CHECK_LIBS = @CHECK_LIBS@
90
+CLAMAVGROUP = @CLAMAVGROUP@
91
+CLAMAVUSER = @CLAMAVUSER@
92
+CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
93
+CLAMD_LIBS = @CLAMD_LIBS@
94
+CPP = @CPP@
95
+CPPFLAGS = @CPPFLAGS@
96
+CURSES_CPPFLAGS = @CURSES_CPPFLAGS@
97
+CURSES_LIBS = @CURSES_LIBS@
98
+CYGPATH_W = @CYGPATH_W@
99
+DBDIR = @DBDIR@
100
+DEFS = @DEFS@
101
+DEPDIR = @DEPDIR@
102
+DSYMUTIL = @DSYMUTIL@
103
+DUMPBIN = @DUMPBIN@
104
+ECHO_C = @ECHO_C@
105
+ECHO_N = @ECHO_N@
106
+ECHO_T = @ECHO_T@
107
+EGREP = @EGREP@
108
+EXEEXT = @EXEEXT@
109
+FGREP = @FGREP@
110
+FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
111
+GCOV = @GCOV@
112
+GENHTML = @GENHTML@
113
+GETENT = @GETENT@
114
+GPERF = @GPERF@
115
+GREP = @GREP@
116
+INCLTDL = @INCLTDL@
117
+INSTALL = @INSTALL@
118
+INSTALL_DATA = @INSTALL_DATA@
119
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
120
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
121
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
122
+LCOV = @LCOV@
123
+LD = @LD@
124
+LDFLAGS = @LDFLAGS@
125
+LIBADD_DL = @LIBADD_DL@
126
+LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
127
+LIBADD_DLOPEN = @LIBADD_DLOPEN@
128
+LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
129
+LIBBZ2 = @LIBBZ2@
130
+LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
131
+LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
132
+LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
133
+LIBLTDL = @LIBLTDL@
134
+LIBOBJS = @LIBOBJS@
135
+LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@
136
+LIBTOOL = @LIBTOOL@
137
+LIPO = @LIPO@
138
+LN_S = @LN_S@
139
+LTDLDEPS = @LTDLDEPS@
140
+LTDLINCL = @LTDLINCL@
141
+LTDLOPEN = @LTDLOPEN@
142
+LTLIBBZ2 = @LTLIBBZ2@
143
+LTLIBOBJS = @LTLIBOBJS@
144
+LT_CONFIG_H = @LT_CONFIG_H@
145
+LT_DLLOADERS = @LT_DLLOADERS@
146
+LT_DLPREOPEN = @LT_DLPREOPEN@
147
+MAINT = @MAINT@
148
+MAKEINFO = @MAKEINFO@
149
+MKDIR_P = @MKDIR_P@
150
+NM = @NM@
151
+NMEDIT = @NMEDIT@
152
+OBJDUMP = @OBJDUMP@
153
+OBJEXT = @OBJEXT@
154
+OTOOL = @OTOOL@
155
+OTOOL64 = @OTOOL64@
156
+PACKAGE = @PACKAGE@
157
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
158
+PACKAGE_NAME = @PACKAGE_NAME@
159
+PACKAGE_STRING = @PACKAGE_STRING@
160
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
161
+PACKAGE_VERSION = @PACKAGE_VERSION@
162
+PATH_SEPARATOR = @PATH_SEPARATOR@
163
+RANLIB = @RANLIB@
164
+SED = @SED@
165
+SET_MAKE = @SET_MAKE@
166
+SHELL = @SHELL@
167
+STRIP = @STRIP@
168
+THREAD_LIBS = @THREAD_LIBS@
169
+TH_SAFE = @TH_SAFE@
170
+VERSION = @VERSION@
171
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
172
+abs_builddir = @abs_builddir@
173
+abs_srcdir = @abs_srcdir@
174
+abs_top_builddir = @abs_top_builddir@
175
+abs_top_srcdir = @abs_top_srcdir@
176
+ac_ct_CC = @ac_ct_CC@
177
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
178
+am__include = @am__include@
179
+am__leading_dot = @am__leading_dot@
180
+am__quote = @am__quote@
181
+am__tar = @am__tar@
182
+am__untar = @am__untar@
183
+bindir = @bindir@
184
+build = @build@
185
+build_alias = @build_alias@
186
+build_cpu = @build_cpu@
187
+build_os = @build_os@
188
+build_vendor = @build_vendor@
189
+builddir = @builddir@
190
+datadir = @datadir@
191
+datarootdir = @datarootdir@
192
+docdir = @docdir@
193
+dvidir = @dvidir@
194
+exec_prefix = @exec_prefix@
195
+host = @host@
196
+host_alias = @host_alias@
197
+host_cpu = @host_cpu@
198
+host_os = @host_os@
199
+host_vendor = @host_vendor@
200
+htmldir = @htmldir@
201
+includedir = @includedir@
202
+infodir = @infodir@
203
+install_sh = @install_sh@
204
+libdir = @libdir@
205
+libexecdir = @libexecdir@
206
+localedir = @localedir@
207
+localstatedir = @localstatedir@
208
+lt_ECHO = @lt_ECHO@
209
+ltdl_LIBOBJS = @ltdl_LIBOBJS@
210
+ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
211
+mandir = @mandir@
212
+mkdir_p = @mkdir_p@
213
+oldincludedir = @oldincludedir@
214
+pdfdir = @pdfdir@
215
+prefix = @prefix@
216
+program_transform_name = @program_transform_name@
217
+psdir = @psdir@
218
+sbindir = @sbindir@
219
+sharedstatedir = @sharedstatedir@
220
+srcdir = @srcdir@
221
+sys_symbol_underscore = @sys_symbol_underscore@
222
+sysconfdir = @sysconfdir@
223
+target = @target@
224
+target_alias = @target_alias@
225
+target_cpu = @target_cpu@
226
+target_os = @target_os@
227
+target_vendor = @target_vendor@
228
+top_build_prefix = @top_build_prefix@
229
+top_builddir = @top_builddir@
230
+top_srcdir = @top_srcdir@
231
+clambc_SOURCES = \
232
+    bcrun.c
233
+
234
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
235
+CLEANFILES = *.gcda *.gcno
236
+all: all-am
237
+
238
+.SUFFIXES:
239
+.SUFFIXES: .c .lo .o .obj
240
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
241
+	@for dep in $?; do \
242
+	  case '$(am__configure_deps)' in \
243
+	    *$$dep*) \
244
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
245
+	        && { if test -f $@; then exit 0; else break; fi; }; \
246
+	      exit 1;; \
247
+	  esac; \
248
+	done; \
249
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  clambc/Makefile'; \
250
+	cd $(top_srcdir) && \
251
+	  $(AUTOMAKE) --foreign  clambc/Makefile
252
+.PRECIOUS: Makefile
253
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
254
+	@case '$?' in \
255
+	  *config.status*) \
256
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
257
+	  *) \
258
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
259
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
260
+	esac;
261
+
262
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
263
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
264
+
265
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
266
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
267
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
268
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
269
+install-binPROGRAMS: $(bin_PROGRAMS)
270
+	@$(NORMAL_INSTALL)
271
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
272
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
273
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
274
+	  if test -f $$p \
275
+	     || test -f $$p1 \
276
+	  ; then \
277
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
278
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
279
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
280
+	  else :; fi; \
281
+	done
282
+
283
+uninstall-binPROGRAMS:
284
+	@$(NORMAL_UNINSTALL)
285
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
286
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
287
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
288
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
289
+	done
290
+
291
+clean-binPROGRAMS:
292
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
293
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
294
+	  echo " rm -f $$p $$f"; \
295
+	  rm -f $$p $$f ; \
296
+	done
297
+
298
+installcheck-binPROGRAMS: $(bin_PROGRAMS)
299
+	bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
300
+	  case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
301
+	   *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
302
+	  esac; \
303
+	  f=`echo "$$p" | \
304
+	     sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
305
+	  for opt in --help --version; do \
306
+	    if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
307
+	         2>c$${pid}_.err </dev/null \
308
+		 && test -n "`cat c$${pid}_.out`" \
309
+		 && test -z "`cat c$${pid}_.err`"; then :; \
310
+	    else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
311
+	  done; \
312
+	done; rm -f c$${pid}_.???; exit $$bad
313
+clambc$(EXEEXT): $(clambc_OBJECTS) $(clambc_DEPENDENCIES) 
314
+	@rm -f clambc$(EXEEXT)
315
+	$(LINK) $(clambc_OBJECTS) $(clambc_LDADD) $(LIBS)
316
+
317
+mostlyclean-compile:
318
+	-rm -f *.$(OBJEXT)
319
+
320
+distclean-compile:
321
+	-rm -f *.tab.c
322
+
323
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcrun.Po@am__quote@
324
+
325
+.c.o:
326
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
327
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
328
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
329
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
330
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
331
+
332
+.c.obj:
333
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
334
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
335
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
336
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
337
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
338
+
339
+.c.lo:
340
+@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
341
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
342
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
343
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
344
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
345
+
346
+mostlyclean-libtool:
347
+	-rm -f *.lo
348
+
349
+clean-libtool:
350
+	-rm -rf .libs _libs
351
+
352
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
353
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
354
+	unique=`for i in $$list; do \
355
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
356
+	  done | \
357
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
358
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
359
+	mkid -fID $$unique
360
+tags: TAGS
361
+
362
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
363
+		$(TAGS_FILES) $(LISP)
364
+	tags=; \
365
+	here=`pwd`; \
366
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
367
+	unique=`for i in $$list; do \
368
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
369
+	  done | \
370
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
371
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
372
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
373
+	  test -n "$$unique" || unique=$$empty_fix; \
374
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
375
+	    $$tags $$unique; \
376
+	fi
377
+ctags: CTAGS
378
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
379
+		$(TAGS_FILES) $(LISP)
380
+	tags=; \
381
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
382
+	unique=`for i in $$list; do \
383
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
384
+	  done | \
385
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
386
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
387
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
388
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
389
+	     $$tags $$unique
390
+
391
+GTAGS:
392
+	here=`$(am__cd) $(top_builddir) && pwd` \
393
+	  && cd $(top_srcdir) \
394
+	  && gtags -i $(GTAGS_ARGS) $$here
395
+
396
+distclean-tags:
397
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
398
+
399
+distdir: $(DISTFILES)
400
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
401
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
402
+	list='$(DISTFILES)'; \
403
+	  dist_files=`for file in $$list; do echo $$file; done | \
404
+	  sed -e "s|^$$srcdirstrip/||;t" \
405
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
406
+	case $$dist_files in \
407
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
408
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
409
+			   sort -u` ;; \
410
+	esac; \
411
+	for file in $$dist_files; do \
412
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
413
+	  if test -d $$d/$$file; then \
414
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
415
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
416
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
417
+	    fi; \
418
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
419
+	  else \
420
+	    test -f $(distdir)/$$file \
421
+	    || cp -p $$d/$$file $(distdir)/$$file \
422
+	    || exit 1; \
423
+	  fi; \
424
+	done
425
+check-am: all-am
426
+check: check-am
427
+all-am: Makefile $(PROGRAMS)
428
+installdirs:
429
+	for dir in "$(DESTDIR)$(bindir)"; do \
430
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
431
+	done
432
+install: install-am
433
+install-exec: install-exec-am
434
+install-data: install-data-am
435
+uninstall: uninstall-am
436
+
437
+install-am: all-am
438
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
439
+
440
+installcheck: installcheck-am
441
+install-strip:
442
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
443
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
444
+	  `test -z '$(STRIP)' || \
445
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
446
+mostlyclean-generic:
447
+
448
+clean-generic:
449
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
450
+
451
+distclean-generic:
452
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
453
+
454
+maintainer-clean-generic:
455
+	@echo "This command is intended for maintainers to use"
456
+	@echo "it deletes files that may require special tools to rebuild."
457
+clean: clean-am
458
+
459
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
460
+
461
+distclean: distclean-am
462
+	-rm -rf ./$(DEPDIR)
463
+	-rm -f Makefile
464
+distclean-am: clean-am distclean-compile distclean-generic \
465
+	distclean-tags
466
+
467
+dvi: dvi-am
468
+
469
+dvi-am:
470
+
471
+html: html-am
472
+
473
+info: info-am
474
+
475
+info-am:
476
+
477
+install-data-am:
478
+
479
+install-dvi: install-dvi-am
480
+
481
+install-exec-am: install-binPROGRAMS
482
+
483
+install-html: install-html-am
484
+
485
+install-info: install-info-am
486
+
487
+install-man:
488
+
489
+install-pdf: install-pdf-am
490
+
491
+install-ps: install-ps-am
492
+
493
+installcheck-am: installcheck-binPROGRAMS
494
+
495
+maintainer-clean: maintainer-clean-am
496
+	-rm -rf ./$(DEPDIR)
497
+	-rm -f Makefile
498
+maintainer-clean-am: distclean-am maintainer-clean-generic
499
+
500
+mostlyclean: mostlyclean-am
501
+
502
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
503
+	mostlyclean-libtool
504
+
505
+pdf: pdf-am
506
+
507
+pdf-am:
508
+
509
+ps: ps-am
510
+
511
+ps-am:
512
+
513
+uninstall-am: uninstall-binPROGRAMS
514
+
515
+.MAKE: install-am install-strip
516
+
517
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
518
+	clean-generic clean-libtool ctags distclean distclean-compile \
519
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
520
+	dvi-am html html-am info info-am install install-am \
521
+	install-binPROGRAMS install-data install-data-am install-dvi \
522
+	install-dvi-am install-exec install-exec-am install-html \
523
+	install-html-am install-info install-info-am install-man \
524
+	install-pdf install-pdf-am install-ps install-ps-am \
525
+	install-strip installcheck installcheck-am \
526
+	installcheck-binPROGRAMS installdirs maintainer-clean \
527
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
528
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
529
+	tags uninstall uninstall-am uninstall-binPROGRAMS
530
+
531
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
532
+# Otherwise a system limit (for SysV at least) may be exceeded.
533
+.NOEXPORT:
0 534
new file mode 100644
... ...
@@ -0,0 +1,76 @@
0
+/*
1
+ *  ClamAV bytecode handler tool.
2
+ *
3
+ *  Copyright (C) 2009 Sourcefire, Inc.
4
+ *
5
+ *  Authors: Török Edvin
6
+ *
7
+ *  This program is free software; you can redistribute it and/or modify
8
+ *  it under the terms of the GNU General Public License version 2 as
9
+ *  published by the Free Software Foundation.
10
+ *
11
+ *  This program is distributed in the hope that it will be useful,
12
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+ *  GNU General Public License for more details.
15
+ *
16
+ *  You should have received a copy of the GNU General Public License
17
+ *  along with this program; if not, write to the Free Software
18
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ *  MA 02110-1301, USA.
20
+ */
21
+#if HAVE_CONFIG_H
22
+#include "clamav-config.h"
23
+#endif
24
+#include "bytecode.h"
25
+#include "clamav.h"
26
+
27
+#include <stdlib.h>
28
+
29
+int main(int argc, char *argv[])
30
+{
31
+    FILE *f;
32
+    struct cli_bc *bc;
33
+    struct cli_bc_ctx *ctx;
34
+    int rc;
35
+    /* TODO: use optparser */
36
+    if (argc != 2) {
37
+	fprintf(stderr, "Usage: %s <filename>\n", argv[0]);
38
+	exit(1);
39
+    }
40
+
41
+    f = fopen(argv[1], "r");
42
+    if (!f) {
43
+	fprintf(stderr, "Unable to load %s\n", argv[1]);
44
+	exit(2);
45
+    }
46
+
47
+    bc = malloc(sizeof(*bc));
48
+    if (!bc) {
49
+	fprintf(stderr, "Out of memory\n");
50
+	exit(3);
51
+    }
52
+
53
+    cl_debug();
54
+    rc = cli_bytecode_load(bc, f, NULL);
55
+    if (rc != CL_SUCCESS) {
56
+	fprintf(stderr,"Unable to load bytecode: %s\n", cl_strerror(rc));
57
+	exit(4);
58
+    }
59
+    fclose(f);
60
+
61
+    printf("Bytecode loaded\n");
62
+    ctx = cli_bytecode_alloc_context();
63
+    if (!ctx) {
64
+	fprintf(stderr,"Out of memory\n");
65
+	exit(3);
66
+    }
67
+
68
+    printf("Running bytecode\n");
69
+    cli_bytecode_run(bc, ctx);
70
+    printf("Bytecode run finished\n");
71
+    cli_bytecode_destroy_context(ctx);
72
+    cli_bytecode_destroy(bc);
73
+    free(bc);
74
+    return 0;
75
+}