Hasnain Lakhani | cf41a1c | 2025-08-25 10:55:35 -0700 | [diff] [blame^] | 1 | # |
| 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 | |
| 20 | AUTOMAKE_OPTIONS = subdir-objects serial-tests nostdinc |
| 21 | |
| 22 | BUILT_SOURCES = \ |
| 23 | gen-c_glib/fuzz_test_no_uuid_types.h \ |
| 24 | gen-c_glib/fuzz_test_no_uuid_types.c |
| 25 | |
| 26 | noinst_LTLIBRARIES = libtestgencfuzz.la |
| 27 | nodist_libtestgencfuzz_la_SOURCES = \ |
| 28 | gen-c_glib/fuzz_test_no_uuid_types.c \ |
| 29 | gen-c_glib/fuzz_test_no_uuid_types.h |
| 30 | |
| 31 | libtestgencfuzz_la_LIBADD = $(top_builddir)/lib/c_glib/libthrift_c_glib.la |
| 32 | |
| 33 | AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -I../gen-c_glib -I./gen-c_glib -I$(top_builddir) |
| 34 | AM_CFLAGS = -g $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) -I$(top_srcdir)/lib/c_glib/src -I../gen-c_glib -I./gen-c_glib -I$(top_builddir) |
| 35 | AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) |
| 36 | |
| 37 | if USING_CLANG |
| 38 | AM_LDFLAGS += -fsanitize=fuzzer |
| 39 | endif |
| 40 | |
| 41 | check_PROGRAMS = fuzz_parse_compact fuzz_parse_binary |
| 42 | |
| 43 | fuzz_parse_compact_SOURCES = fuzz_parse_compact.c |
| 44 | fuzz_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 | |
| 50 | fuzz_parse_binary_SOURCES = fuzz_parse_binary.c |
| 51 | fuzz_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 | # |
| 60 | gen-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 | |
| 63 | clean-local: |
| 64 | $(RM) -r gen-c_glib/ |
| 65 | $(RM) *.o |
| 66 | $(RM) libtestgencfuzz.la |