blob: c000754695b3f55bba9599ed7d4770b0b902b575 [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
Hasnain Lakhanicf41a1c2025-08-25 10:55:35 -070022noinst_LTLIBRARIES = libtestgencfuzz.la
23nodist_libtestgencfuzz_la_SOURCES = \
24 gen-c_glib/fuzz_test_no_uuid_types.c \
25 gen-c_glib/fuzz_test_no_uuid_types.h
26
27libtestgencfuzz_la_LIBADD = $(top_builddir)/lib/c_glib/libthrift_c_glib.la
28
29AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -I../gen-c_glib -I./gen-c_glib -I$(top_builddir)
30AM_CFLAGS = -g $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) -I$(top_srcdir)/lib/c_glib/src -I../gen-c_glib -I./gen-c_glib -I$(top_builddir)
31AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS)
32
33if USING_CLANG
34AM_LDFLAGS += -fsanitize=fuzzer
35endif
36
37check_PROGRAMS = fuzz_parse_compact fuzz_parse_binary
38
39fuzz_parse_compact_SOURCES = fuzz_parse_compact.c
40fuzz_parse_compact_LDADD = \
41 libtestgencfuzz.la \
42 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
43 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
44 $(top_builddir)/lib/c_glib/src/thrift/c_glib/libthrift_c_glib_la-thrift_configuration.o
45
46fuzz_parse_binary_SOURCES = fuzz_parse_binary.c
47fuzz_parse_binary_LDADD = \
48 libtestgencfuzz.la \
49 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
50 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
51 $(top_builddir)/lib/c_glib/src/thrift/c_glib/libthrift_c_glib_la-thrift_configuration.o
52
53#
54# Common thrift code generation rules
55#
56gen-c_glib/fuzz_test_no_uuid_types.c gen-c_glib/fuzz_test_no_uuid_types.h: $(top_srcdir)/test/v0.16/FuzzTestNoUuid.thrift
57 $(THRIFT) --gen c_glib -r $<
58
Jens Geyer21a89c62026-04-09 22:48:02 +000059# Ensure generated headers exist before compiling sources that include them
60fuzz_parse_compact.$(OBJEXT): gen-c_glib/fuzz_test_no_uuid_types.h
61fuzz_parse_binary.$(OBJEXT): gen-c_glib/fuzz_test_no_uuid_types.h
62
Hasnain Lakhanicf41a1c2025-08-25 10:55:35 -070063clean-local:
64 $(RM) -r gen-c_glib/
65 $(RM) *.o
66 $(RM) libtestgencfuzz.la