| 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 | |
| Hasnain Lakhani | cf41a1c | 2025-08-25 10:55:35 -0700 | [diff] [blame] | 22 | noinst_LTLIBRARIES = libtestgencfuzz.la |
| 23 | nodist_libtestgencfuzz_la_SOURCES = \ |
| 24 | gen-c_glib/fuzz_test_no_uuid_types.c \ |
| 25 | gen-c_glib/fuzz_test_no_uuid_types.h |
| 26 | |
| 27 | libtestgencfuzz_la_LIBADD = $(top_builddir)/lib/c_glib/libthrift_c_glib.la |
| 28 | |
| 29 | AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -I../gen-c_glib -I./gen-c_glib -I$(top_builddir) |
| 30 | 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) |
| 31 | AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) |
| 32 | |
| 33 | if USING_CLANG |
| 34 | AM_LDFLAGS += -fsanitize=fuzzer |
| 35 | endif |
| 36 | |
| 37 | check_PROGRAMS = fuzz_parse_compact fuzz_parse_binary |
| 38 | |
| 39 | fuzz_parse_compact_SOURCES = fuzz_parse_compact.c |
| 40 | fuzz_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 | |
| 46 | fuzz_parse_binary_SOURCES = fuzz_parse_binary.c |
| 47 | fuzz_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 | # |
| 56 | 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 |
| 57 | $(THRIFT) --gen c_glib -r $< |
| 58 | |
| Jens Geyer | 21a89c6 | 2026-04-09 22:48:02 +0000 | [diff] [blame] | 59 | # Ensure generated headers exist before compiling sources that include them |
| 60 | fuzz_parse_compact.$(OBJEXT): gen-c_glib/fuzz_test_no_uuid_types.h |
| 61 | fuzz_parse_binary.$(OBJEXT): gen-c_glib/fuzz_test_no_uuid_types.h |
| 62 | |
| Hasnain Lakhani | cf41a1c | 2025-08-25 10:55:35 -0700 | [diff] [blame] | 63 | clean-local: |
| 64 | $(RM) -r gen-c_glib/ |
| 65 | $(RM) *.o |
| 66 | $(RM) libtestgencfuzz.la |