blob: e7d0e3555218948203d6da341f52a3a0b182fa65 [file] [log] [blame]
Hasnain Lakhanicf41a1c2025-08-25 10:55:35 -07001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
19
20AUTOMAKE_OPTIONS = subdir-objects serial-tests nostdinc
21
22BUILT_SOURCES = \
23 gen-c_glib/fuzz_test_no_uuid_types.h \
24 gen-c_glib/fuzz_test_no_uuid_types.c
25
26noinst_LTLIBRARIES = libtestgencfuzz.la
27nodist_libtestgencfuzz_la_SOURCES = \
28 gen-c_glib/fuzz_test_no_uuid_types.c \
29 gen-c_glib/fuzz_test_no_uuid_types.h
30
31libtestgencfuzz_la_LIBADD = $(top_builddir)/lib/c_glib/libthrift_c_glib.la
32
33AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -I../gen-c_glib -I./gen-c_glib -I$(top_builddir)
34AM_CFLAGS = -g $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) -I$(top_srcdir)/lib/c_glib/src -I../gen-c_glib -I./gen-c_glib -I$(top_builddir)
35AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS)
36
37if USING_CLANG
38AM_LDFLAGS += -fsanitize=fuzzer
39endif
40
41check_PROGRAMS = fuzz_parse_compact fuzz_parse_binary
42
43fuzz_parse_compact_SOURCES = fuzz_parse_compact.c
44fuzz_parse_compact_LDADD = \
45 libtestgencfuzz.la \
46 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
47 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
48 $(top_builddir)/lib/c_glib/src/thrift/c_glib/libthrift_c_glib_la-thrift_configuration.o
49
50fuzz_parse_binary_SOURCES = fuzz_parse_binary.c
51fuzz_parse_binary_LDADD = \
52 libtestgencfuzz.la \
53 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
54 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
55 $(top_builddir)/lib/c_glib/src/thrift/c_glib/libthrift_c_glib_la-thrift_configuration.o
56
57#
58# Common thrift code generation rules
59#
60gen-c_glib/fuzz_test_no_uuid_types.c gen-c_glib/fuzz_test_no_uuid_types.h: $(top_srcdir)/test/v0.16/FuzzTestNoUuid.thrift
61 $(THRIFT) --gen c_glib -r $<
62
63clean-local:
64 $(RM) -r gen-c_glib/
65 $(RM) *.o
66 $(RM) libtestgencfuzz.la