robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 1 | # honggfuzz - Makefile |
| 2 | # ----------------------------------------- |
| 3 | # |
| 4 | # Author: Robert Swiecki <swiecki@google.com> |
| 5 | # |
robert.swiecki@gmail.com | ba85c3e | 2015-02-02 14:55:16 +0000 | [diff] [blame] | 6 | # Copyright 2010-2015 by Google Inc. All Rights Reserved. |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 7 | # |
| 8 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | # you may not use this file except in compliance with the License. |
| 10 | # You may obtain a copy of the License at |
| 11 | # |
| 12 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | # |
| 14 | # Unless required by applicable law or agreed to in writing, software |
| 15 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | # See the License for the specific language governing permissions and |
| 18 | # limitations under the License. |
Aaron Carreras | 0903ae4 | 2016-10-14 13:25:55 -0400 | [diff] [blame] | 19 | # |
| 20 | # NOTE: xcrun is within xcode...xcode is required on OSX. |
| 21 | # |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 22 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 23 | # Common for all architectures |
Robert Swiecki | a9db9dd | 2016-03-09 16:29:37 +0100 | [diff] [blame] | 24 | CC ?= gcc |
| 25 | LD = $(CC) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 26 | BIN := honggfuzz |
Robert Swiecki | c87e1c5 | 2018-01-07 01:28:30 +0100 | [diff] [blame] | 27 | HFUZZ_CC_BIN := hfuzz_cc/hfuzz-cc |
Robert Swiecki | 241a741 | 2017-05-24 01:53:15 +0200 | [diff] [blame] | 28 | HFUZZ_CC_SRCS := hfuzz_cc/hfuzz-cc.c |
Robert Swiecki | 54fd5a4 | 2018-02-03 00:35:47 +0100 | [diff] [blame] | 29 | COMMON_CFLAGS := -D_GNU_SOURCE -Wall -Werror -Wno-format-truncation -I. |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 30 | COMMON_LDFLAGS := -lm libhfcommon/libhfcommon.a |
Bernhard M. Wiedemann | 5dd074d | 2017-05-29 13:53:02 +0200 | [diff] [blame] | 31 | COMMON_SRCS := $(sort $(wildcard *.c)) |
Robert Swiecki | feb2115 | 2019-01-17 22:30:06 +0100 | [diff] [blame] | 32 | CFLAGS ?= -O3 -mtune=native |
Jagger | a443b69 | 2016-08-29 23:01:15 +0200 | [diff] [blame] | 33 | LDFLAGS ?= |
Robert Swiecki | 5883f46 | 2019-01-31 11:27:48 +0100 | [diff] [blame] | 34 | LIBS_CFLAGS ?= -fPIC -fno-stack-protector |
Robert Swiecki | e7da411 | 2018-01-16 22:21:08 +0100 | [diff] [blame] | 35 | GREP_COLOR ?= |
groebert@google.com | 1bd4c21 | 2013-06-19 11:13:56 +0000 | [diff] [blame] | 36 | |
robert.swiecki@gmail.com | 448d281 | 2015-02-02 20:57:13 +0000 | [diff] [blame] | 37 | OS ?= $(shell uname -s) |
robert.swiecki@gmail.com | 15eca6f | 2015-03-04 03:31:36 +0000 | [diff] [blame] | 38 | MARCH ?= $(shell uname -m) |
Paul Grandperrin | 23eb312 | 2018-02-22 22:26:16 +0100 | [diff] [blame] | 39 | KERNEL ?= $(shell uname -r) |
groebert@google.com | 1bd4c21 | 2013-06-19 11:13:56 +0000 | [diff] [blame] | 40 | |
Paul Grandperrin | 8dd69f5 | 2018-02-22 22:38:19 +0100 | [diff] [blame] | 41 | ifeq ($(OS)$(findstring Microsoft,$(KERNEL)),Linux) # matches Linux but excludes WSL (Windows Subsystem for Linux) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 42 | ARCH := LINUX |
Robert Swiecki | ac310a8 | 2016-02-22 18:58:36 +0100 | [diff] [blame] | 43 | |
Robert Swiecki | b567b4a | 2017-09-28 18:28:15 +0200 | [diff] [blame] | 44 | ARCH_CFLAGS := -std=c11 -I/usr/local/include \ |
Robert Swiecki | ab7134a | 2017-05-29 17:28:11 +0200 | [diff] [blame] | 45 | -Wextra -Wno-override-init \ |
| 46 | -funroll-loops \ |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 47 | -D_FILE_OFFSET_BITS=64 |
Robert Swiecki | 30f83c6 | 2017-09-28 18:31:39 +0200 | [diff] [blame] | 48 | ARCH_LDFLAGS := -L/usr/local/include \ |
Kamil Rytarowski | ea9dc6f | 2018-08-15 05:21:30 +0200 | [diff] [blame] | 49 | -pthread -lunwind-ptrace -lunwind-generic -lbfd -lopcodes -lrt -ldl |
Bernhard M. Wiedemann | 5dd074d | 2017-05-29 13:53:02 +0200 | [diff] [blame] | 50 | ARCH_SRCS := $(sort $(wildcard linux/*.c)) |
Robert Swiecki | cd8d2ac | 2017-12-12 14:45:14 +0100 | [diff] [blame] | 51 | LIBS_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 |
robert.swiecki@gmail.com | 3ad0bb3 | 2015-03-04 17:19:13 +0000 | [diff] [blame] | 52 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 53 | ifeq ("$(wildcard /usr/include/bfd.h)","") |
| 54 | WARN_LIBRARY += binutils-devel |
| 55 | endif |
| 56 | ifeq ("$(wildcard /usr/include/libunwind-ptrace.h)","") |
| 57 | WARN_LIBRARY += libunwind-devel/libunwind8-devel |
| 58 | endif |
Jagger | 9797ac5 | 2016-02-04 23:57:29 +0100 | [diff] [blame] | 59 | ifeq ("$(wildcard /usr/local/include/intel-pt.h)","/usr/local/include/intel-pt.h") |
| 60 | ARCH_CFLAGS += -D_HF_LINUX_INTEL_PT_LIB |
| 61 | ARCH_CFLAGS += -I/usr/local/include |
Jagger | 070b2c6 | 2016-02-05 06:01:15 +0100 | [diff] [blame] | 62 | ARCH_LDFLAGS += -L/usr/local/lib -lipt -Wl,--rpath=/usr/local/lib |
Jagger | 9797ac5 | 2016-02-04 23:57:29 +0100 | [diff] [blame] | 63 | endif |
| 64 | ifeq ("$(wildcard /usr/include/intel-pt.h)","/usr/include/intel-pt.h") |
| 65 | ARCH_CFLAGS += -D_HF_LINUX_INTEL_PT_LIB |
Jagger | 3594cda | 2016-02-08 00:05:47 +0100 | [diff] [blame] | 66 | ARCH_LDFLAGS += -lipt |
Jagger | 9797ac5 | 2016-02-04 23:57:29 +0100 | [diff] [blame] | 67 | endif |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 68 | ifdef WARN_LIBRARY |
Robert Swiecki | e2cf25b | 2019-01-30 20:16:28 +0100 | [diff] [blame] | 69 | $(info --------------------------------------------------------) |
Robert Swiecki | 2fbd587 | 2019-02-03 01:10:20 +0100 | [diff] [blame] | 70 | $(info Libraries which are most likely missing on your OS. ) |
| 71 | $(info This can result in linking/compilation errors. ) |
| 72 | $(info > $(WARN_LIBRARY)) |
Robert Swiecki | e2cf25b | 2019-01-30 20:16:28 +0100 | [diff] [blame] | 73 | $(info --------------------------------------------------------) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 74 | endif |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 75 | # OS Linux |
| 76 | else ifeq ($(OS),Darwin) |
| 77 | ARCH := DARWIN |
Aaron Carreras | bfd365f | 2016-10-16 09:22:19 -0400 | [diff] [blame] | 78 | |
Robert Swiecki | e7da411 | 2018-01-16 22:21:08 +0100 | [diff] [blame] | 79 | # MacOS-X grep seem to use colors unconditionally |
| 80 | GREP_COLOR = --color=never |
| 81 | |
Aaron Carreras | bfd365f | 2016-10-16 09:22:19 -0400 | [diff] [blame] | 82 | # Figure out which crash reporter to use. |
Anestis Bechtsoudis | 0e5c2c5 | 2015-10-08 13:30:03 -0700 | [diff] [blame] | 83 | CRASHWRANGLER := third_party/mac |
Aaron Carreras | 623f4eb | 2016-10-15 07:52:13 -0400 | [diff] [blame] | 84 | OS_VERSION := $(shell sw_vers -productVersion) |
Yishuai Li | 081c596 | 2018-10-08 18:52:50 -0400 | [diff] [blame] | 85 | ifneq (,$(findstring 10.14,$(OS_VERSION))) |
| 86 | CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Sierra.o |
| 87 | else ifneq (,$(findstring 10.13,$(OS_VERSION))) |
Anestis Bechtsoudis | 6f902a4 | 2017-11-03 07:13:54 +0200 | [diff] [blame] | 88 | CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Sierra.o |
| 89 | else ifneq (,$(findstring 10.12,$(OS_VERSION))) |
Robert Swiecki | 1fe7972 | 2018-02-21 18:34:08 +0100 | [diff] [blame] | 90 | CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Sierra.o |
Aaron Carreras | 623f4eb | 2016-10-15 07:52:13 -0400 | [diff] [blame] | 91 | else ifneq (,$(findstring 10.11,$(OS_VERSION))) |
| 92 | # El Capitan didn't break compatibility |
| 93 | CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Yosemite.o |
| 94 | else ifneq (,$(findstring 10.10,$(OS_VERSION))) |
| 95 | CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Yosemite.o |
| 96 | else ifneq (,$(findstring 10.9,$(OS_VERSION))) |
| 97 | CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Mavericks.o |
| 98 | else ifneq (,$(findstring 10.8,$(OS_VERSION))) |
| 99 | CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Mountain_Lion.o |
| 100 | else |
| 101 | $(error Unsupported MAC OS X version) |
| 102 | endif |
| 103 | |
Aaron Carreras | bfd365f | 2016-10-16 09:22:19 -0400 | [diff] [blame] | 104 | # Figure out which XCode SDK to use. |
| 105 | OSX_SDK_VERSION := $(shell xcrun --show-sdk-version) |
Robert Swiecki | 1fe7972 | 2018-02-21 18:34:08 +0100 | [diff] [blame] | 106 | SDK_NAME_V := macosx$(OSX_SDK_VERSION) |
| 107 | SDK_V := $(shell xcrun --sdk $(SDK_NAME) --show-sdk-path 2>/dev/null) |
| 108 | SDK_NAME := macosx |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 109 | SDK := $(shell xcrun --sdk $(SDK_NAME) --show-sdk-path 2>/dev/null) |
Aaron Carreras | bfd365f | 2016-10-16 09:22:19 -0400 | [diff] [blame] | 110 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 111 | CC := $(shell xcrun --sdk $(SDK_NAME) --find cc) |
| 112 | LD := $(shell xcrun --sdk $(SDK_NAME) --find cc) |
Robert Swiecki | 10eeb0a | 2017-09-28 15:42:52 +0200 | [diff] [blame] | 113 | ARCH_CFLAGS := -arch x86_64 -std=c99 -isysroot $(SDK) \ |
Robert Swiecki | a9db9dd | 2016-03-09 16:29:37 +0100 | [diff] [blame] | 114 | -x objective-c -pedantic -fblocks \ |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 115 | -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized \ |
| 116 | -Wreturn-type -Wpointer-arith -Wno-gnu-case-range -Wno-gnu-designator \ |
Robert Swiecki | d1df4b5 | 2018-08-21 15:12:56 +0200 | [diff] [blame] | 117 | -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-attributes \ |
| 118 | -Wno-embedded-directive |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 119 | ARCH_LDFLAGS := -F/System/Library/PrivateFrameworks -framework CoreSymbolication -framework IOKit \ |
Robert Swiecki | 1fe7972 | 2018-02-21 18:34:08 +0100 | [diff] [blame] | 120 | -F$(SDK_V)/System/Library/Frameworks -F$(SDK_V)/System/Library/PrivateFrameworks \ |
| 121 | -F$(SDK)/System/Library/Frameworks \ |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 122 | -framework Foundation -framework ApplicationServices -framework Symbolication \ |
| 123 | -framework CoreServices -framework CrashReporterSupport -framework CoreFoundation \ |
| 124 | -framework CommerceKit $(CRASH_REPORT) |
Anestis Bechtsoudis | 9dcb66a | 2017-04-08 20:12:44 +0300 | [diff] [blame] | 125 | |
Robert Swiecki | e7da411 | 2018-01-16 22:21:08 +0100 | [diff] [blame] | 126 | XCODE_VER := $(shell xcodebuild -version | grep $(GREP_COLOR) "^Xcode" | cut -d " " -f2) |
Anestis Bechtsoudis | 9dcb66a | 2017-04-08 20:12:44 +0300 | [diff] [blame] | 127 | ifeq "8.3" "$(word 1, $(sort 8.3 $(XCODE_VER)))" |
| 128 | ARCH_LDFLAGS += -F/Applications/Xcode.app/Contents/SharedFrameworks \ |
| 129 | -framework CoreSymbolicationDT \ |
| 130 | -Wl,-rpath,/Applications/Xcode.app/Contents/SharedFrameworks |
| 131 | endif |
| 132 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 133 | MIG_RET := $(shell mig -header mac/mach_exc.h -user mac/mach_excUser.c -sheader mac/mach_excServer.h \ |
| 134 | -server mac/mach_excServer.c $(SDK)/usr/include/mach/mach_exc.defs &>/dev/null; echo $$?) |
| 135 | ifeq ($(MIG_RET),1) |
| 136 | $(error mig failed to generate RPC code) |
| 137 | endif |
Bernhard M. Wiedemann | 5dd074d | 2017-05-29 13:53:02 +0200 | [diff] [blame] | 138 | ARCH_SRCS := $(sort $(wildcard mac/*.c)) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 139 | # OS Darwin |
Kamil Rytarowski | 45a1cf4 | 2018-08-15 06:26:26 +0200 | [diff] [blame] | 140 | else ifeq ($(OS),NetBSD) |
| 141 | ARCH := NETBSD |
| 142 | |
| 143 | ARCH_SRCS := $(sort $(wildcard netbsd/*.c)) |
Robert Swiecki | 3d606ec | 2018-08-25 12:24:24 +0200 | [diff] [blame] | 144 | ARCH_CFLAGS := -std=c11 -I/usr/local/include -I/usr/pkg/include \ |
Kamil Rytarowski | 45a1cf4 | 2018-08-15 06:26:26 +0200 | [diff] [blame] | 145 | -Wextra -Wno-override-init \ |
| 146 | -funroll-loops -D_KERNTYPES |
David Carlier | 293e6ed | 2018-10-09 21:29:17 +0100 | [diff] [blame] | 147 | ARCH_LDFLAGS := -L/usr/local/lib -L/usr/pkg/lib \ |
Robert Swiecki | 3d606ec | 2018-08-25 12:24:24 +0200 | [diff] [blame] | 148 | -pthread -lcapstone -lrt \ |
| 149 | -Wl,--rpath=/usr/pkg/lib |
Kamil Rytarowski | 45a1cf4 | 2018-08-15 06:26:26 +0200 | [diff] [blame] | 150 | |
| 151 | # OS NetBSD |
tlogic@gmail.com | 479f0f9 | 2015-04-15 18:03:16 +0000 | [diff] [blame] | 152 | else |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 153 | ARCH := POSIX |
Robert Swiecki | f2e23ff | 2018-01-12 00:12:01 +0100 | [diff] [blame] | 154 | |
Bernhard M. Wiedemann | 5dd074d | 2017-05-29 13:53:02 +0200 | [diff] [blame] | 155 | ARCH_SRCS := $(sort $(wildcard posix/*.c)) |
Robert Swiecki | b567b4a | 2017-09-28 18:28:15 +0200 | [diff] [blame] | 156 | ARCH_CFLAGS := -std=c11 -I/usr/local/include \ |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 157 | -Wextra -Wno-initializer-overrides -Wno-override-init \ |
Robert Swiecki | ac310a8 | 2016-02-22 18:58:36 +0100 | [diff] [blame] | 158 | -Wno-unknown-warning-option -Wno-unknown-pragmas \ |
Robert Swiecki | 5b71fba | 2017-12-16 04:55:40 +0100 | [diff] [blame] | 159 | -funroll-loops |
plusun | 05c6720 | 2018-06-29 11:20:20 +0000 | [diff] [blame] | 160 | ARCH_LDFLAGS := -pthread -L/usr/local/lib |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 161 | # OS Posix |
tlogic@gmail.com | 479f0f9 | 2015-04-15 18:03:16 +0000 | [diff] [blame] | 162 | endif |
robert.swiecki@gmail.com | b0cac5b | 2015-02-17 00:19:59 +0000 | [diff] [blame] | 163 | |
Robert Swiecki | e0c3137 | 2018-01-13 04:36:00 +0100 | [diff] [blame] | 164 | CFLAGS_BLOCKS = |
Anestis Bechtsoudis | d962229 | 2017-06-15 13:30:15 +0400 | [diff] [blame] | 165 | COMPILER = $(shell $(CC) -v 2>&1 | \ |
Robert Swiecki | e7da411 | 2018-01-16 22:21:08 +0100 | [diff] [blame] | 166 | grep $(GREP_COLOR) -oE '((gcc|clang) version|LLVM version.*clang)' | \ |
| 167 | grep $(GREP_COLOR) -oE '(clang|gcc)' | head -n1) |
Jagger | 9856150 | 2016-03-10 00:01:08 +0100 | [diff] [blame] | 168 | ifeq ($(COMPILER),clang) |
Anestis Bechtsoudis | d962229 | 2017-06-15 13:30:15 +0400 | [diff] [blame] | 169 | ARCH_CFLAGS += -Wno-initializer-overrides -Wno-unknown-warning-option |
Robert Swiecki | 89d444a | 2018-01-11 23:45:19 +0100 | [diff] [blame] | 170 | ARCH_CFLAGS += -Wno-gnu-empty-initializer -Wno-format-pedantic |
| 171 | ARCH_CFLAGS += -Wno-gnu-statement-expression |
Robert Swiecki | e0c3137 | 2018-01-13 04:36:00 +0100 | [diff] [blame] | 172 | CFLAGS_BLOCKS = -fblocks |
Anestis Bechtsoudis | d962229 | 2017-06-15 13:30:15 +0400 | [diff] [blame] | 173 | |
| 174 | ifneq ($(OS),Darwin) |
Jagger | 9856150 | 2016-03-10 00:01:08 +0100 | [diff] [blame] | 175 | ARCH_LDFLAGS += -lBlocksRuntime |
Anestis Bechtsoudis | d962229 | 2017-06-15 13:30:15 +0400 | [diff] [blame] | 176 | endif |
Jagger | 9856150 | 2016-03-10 00:01:08 +0100 | [diff] [blame] | 177 | endif |
| 178 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 179 | SRCS := $(COMMON_SRCS) $(ARCH_SRCS) |
| 180 | OBJS := $(SRCS:.c=.o) |
Jagger | a72ac9d | 2016-04-01 23:48:12 +0200 | [diff] [blame] | 181 | |
Robert Swiecki | cf8cd90 | 2018-08-24 10:35:00 +0200 | [diff] [blame] | 182 | LHFUZZ_SRCS := $(sort $(wildcard libhfuzz/*.c)) |
Robert Swiecki | a1d23b5 | 2017-05-25 00:42:43 +0200 | [diff] [blame] | 183 | LHFUZZ_OBJS := $(LHFUZZ_SRCS:.c=.o) |
Robert Swiecki | ec03fc5 | 2017-05-25 00:41:23 +0200 | [diff] [blame] | 184 | LHFUZZ_ARCH := libhfuzz/libhfuzz.a |
Robert Swiecki | a87c8af | 2017-09-28 15:59:04 +0200 | [diff] [blame] | 185 | HFUZZ_INC ?= $(shell pwd) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 186 | |
Robert Swiecki | cf8cd90 | 2018-08-24 10:35:00 +0200 | [diff] [blame] | 187 | LCOMMON_SRCS := $(sort $(wildcard libhfcommon/*.c)) |
Robert Swiecki | ec03fc5 | 2017-05-25 00:41:23 +0200 | [diff] [blame] | 188 | LCOMMON_OBJS := $(LCOMMON_SRCS:.c=.o) |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 189 | LCOMMON_ARCH := libhfcommon/libhfcommon.a |
Robert Swiecki | 241a741 | 2017-05-24 01:53:15 +0200 | [diff] [blame] | 190 | |
Robert Swiecki | cf8cd90 | 2018-08-24 10:35:00 +0200 | [diff] [blame] | 191 | LNETDRIVER_SRCS := $(sort $(wildcard libhfnetdriver/*.c)) |
Robert Swiecki | 90892fb | 2018-01-04 16:00:54 +0100 | [diff] [blame] | 192 | LNETDRIVER_OBJS := $(LNETDRIVER_SRCS:.c=.o) |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 193 | LNETDRIVER_ARCH := libhfnetdriver/libhfnetdriver.a |
Robert Swiecki | 90892fb | 2018-01-04 16:00:54 +0100 | [diff] [blame] | 194 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 195 | # Respect external user defines |
Robert Swiecki | 68fef5b | 2017-04-29 13:09:46 +0200 | [diff] [blame] | 196 | CFLAGS += $(COMMON_CFLAGS) $(ARCH_CFLAGS) -D_HF_ARCH_${ARCH} |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 197 | LDFLAGS += $(COMMON_LDFLAGS) $(ARCH_LDFLAGS) |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 198 | |
Anestis Bechtsoudis | 3485c73 | 2015-09-10 17:40:04 +0300 | [diff] [blame] | 199 | ifeq ($(DEBUG),true) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 200 | CFLAGS += -g -ggdb |
Robert Swiecki | caf9d76 | 2016-03-10 16:13:18 +0100 | [diff] [blame] | 201 | LDFLAGS += -g -ggdb |
Anestis Bechtsoudis | 3485c73 | 2015-09-10 17:40:04 +0300 | [diff] [blame] | 202 | endif |
| 203 | |
Anestis Bechtsoudis | cfc39fb | 2015-08-06 10:31:36 +0300 | [diff] [blame] | 204 | # Control Android builds |
Robert Swiecki | dec78f1 | 2017-12-15 04:43:22 +0100 | [diff] [blame] | 205 | ANDROID_API ?= android-26 |
Anestis Bechtsoudis | cfc39fb | 2015-08-06 10:31:36 +0300 | [diff] [blame] | 206 | ANDROID_DEBUG_ENABLED ?= false |
Anestis Bechtsoudis | a187dcf | 2017-12-04 10:44:02 +0200 | [diff] [blame] | 207 | ANDROID_CLANG ?= true |
Anestis Bechtsoudis | cfc39fb | 2015-08-06 10:31:36 +0300 | [diff] [blame] | 208 | ANDROID_APP_ABI ?= armeabi-v7a |
Anestis Bechtsoudis | f5ded93 | 2016-10-18 10:50:00 +0300 | [diff] [blame] | 209 | ANDROID_SKIP_CLEAN ?= false |
Anestis Bechtsoudis | cfc39fb | 2015-08-06 10:31:36 +0300 | [diff] [blame] | 210 | NDK_BUILD_ARGS := |
Anestis Bechtsoudis | f5ded93 | 2016-10-18 10:50:00 +0300 | [diff] [blame] | 211 | |
Anestis Bechtsoudis | cfc39fb | 2015-08-06 10:31:36 +0300 | [diff] [blame] | 212 | ifeq ($(ANDROID_DEBUG_ENABLED),true) |
Anestis Bechtsoudis | f5ded93 | 2016-10-18 10:50:00 +0300 | [diff] [blame] | 213 | NDK_BUILD_ARGS += V=1 NDK_DEBUG=1 APP_OPTIM=debug |
| 214 | endif |
| 215 | |
| 216 | # By default ndk-build cleans all project files to ensure that no semi-completed |
| 217 | # builds reach the app package. The following flag disables this check. It's mainly |
| 218 | # purposed to be used with android-all rule where we want recursive invocations |
| 219 | # to keep previous targets' binaries. |
| 220 | ifeq ($(ANDROID_SKIP_CLEAN),true) |
| 221 | NDK_BUILD_ARGS += NDK_APP.local.cleaned_binaries=true |
Anestis Bechtsoudis | cfc39fb | 2015-08-06 10:31:36 +0300 | [diff] [blame] | 222 | endif |
| 223 | |
Anestis Bechtsoudis | d1fccd5 | 2016-05-06 13:11:27 +0300 | [diff] [blame] | 224 | ifeq ($(ANDROID_CLANG),true) |
Anestis Bechtsoudis | a187dcf | 2017-12-04 10:44:02 +0200 | [diff] [blame] | 225 | ANDROID_NDK_TOOLCHAIN_VER := clang |
Anestis Bechtsoudis | 6a938ed | 2016-10-12 12:04:34 +0300 | [diff] [blame] | 226 | # clang works only against APIs >= 23 |
| 227 | ifeq ($(ANDROID_APP_ABI),$(filter $(ANDROID_APP_ABI),armeabi armeabi-v7a)) |
Anestis Bechtsoudis | f017925 | 2016-09-06 12:11:05 +0300 | [diff] [blame] | 228 | ANDROID_NDK_TOOLCHAIN ?= arm-linux-androideabi-clang |
Anestis Bechtsoudis | b4446a8 | 2016-10-28 11:30:10 +0300 | [diff] [blame] | 229 | ANDROID_ARCH_CPU := arm |
Anestis Bechtsoudis | 6a938ed | 2016-10-12 12:04:34 +0300 | [diff] [blame] | 230 | else ifeq ($(ANDROID_APP_ABI),$(filter $(ANDROID_APP_ABI),x86)) |
Jagger | d18ba37 | 2016-09-04 19:03:46 +0200 | [diff] [blame] | 231 | ANDROID_NDK_TOOLCHAIN ?= x86-clang |
Anestis Bechtsoudis | b4446a8 | 2016-10-28 11:30:10 +0300 | [diff] [blame] | 232 | ANDROID_ARCH_CPU := x86 |
Anestis Bechtsoudis | 6a938ed | 2016-10-12 12:04:34 +0300 | [diff] [blame] | 233 | else ifeq ($(ANDROID_APP_ABI),$(filter $(ANDROID_APP_ABI),arm64-v8a)) |
Jagger | d18ba37 | 2016-09-04 19:03:46 +0200 | [diff] [blame] | 234 | ANDROID_NDK_TOOLCHAIN ?= aarch64-linux-android-clang |
Anestis Bechtsoudis | b4446a8 | 2016-10-28 11:30:10 +0300 | [diff] [blame] | 235 | ANDROID_ARCH_CPU := arm64 |
Anestis Bechtsoudis | 6a938ed | 2016-10-12 12:04:34 +0300 | [diff] [blame] | 236 | else ifeq ($(ANDROID_APP_ABI),$(filter $(ANDROID_APP_ABI),x86_64)) |
Jagger | d18ba37 | 2016-09-04 19:03:46 +0200 | [diff] [blame] | 237 | ANDROID_NDK_TOOLCHAIN ?= x86_64-clang |
Anestis Bechtsoudis | b4446a8 | 2016-10-28 11:30:10 +0300 | [diff] [blame] | 238 | ANDROID_ARCH_CPU := x86_64 |
Anestis Bechtsoudis | d1fccd5 | 2016-05-06 13:11:27 +0300 | [diff] [blame] | 239 | else |
| 240 | $(error Unsuported / Unknown APP_API '$(ANDROID_APP_ABI)') |
| 241 | endif |
| 242 | else |
Anestis Bechtsoudis | a187dcf | 2017-12-04 10:44:02 +0200 | [diff] [blame] | 243 | ANDROID_NDK_TOOLCHAIN_VER := 4.9 |
Anestis Bechtsoudis | 6a938ed | 2016-10-12 12:04:34 +0300 | [diff] [blame] | 244 | ifeq ($(ANDROID_APP_ABI),$(filter $(ANDROID_APP_ABI),armeabi armeabi-v7a)) |
| 245 | ANDROID_NDK_TOOLCHAIN ?= arm-linux-androideabi-4.9 |
Anestis Bechtsoudis | b4446a8 | 2016-10-28 11:30:10 +0300 | [diff] [blame] | 246 | ANDROID_ARCH_CPU := arm |
Anestis Bechtsoudis | 6a938ed | 2016-10-12 12:04:34 +0300 | [diff] [blame] | 247 | else ifeq ($(ANDROID_APP_ABI),$(filter $(ANDROID_APP_ABI),x86)) |
| 248 | ANDROID_NDK_TOOLCHAIN ?= x86-4.9 |
Anestis Bechtsoudis | b4446a8 | 2016-10-28 11:30:10 +0300 | [diff] [blame] | 249 | ANDROID_ARCH_CPU := x86 |
Anestis Bechtsoudis | 6a938ed | 2016-10-12 12:04:34 +0300 | [diff] [blame] | 250 | else ifeq ($(ANDROID_APP_ABI),$(filter $(ANDROID_APP_ABI),arm64-v8a)) |
| 251 | ANDROID_NDK_TOOLCHAIN ?= aarch64-linux-android-4.9 |
Anestis Bechtsoudis | b4446a8 | 2016-10-28 11:30:10 +0300 | [diff] [blame] | 252 | ANDROID_ARCH_CPU := arm64 |
Anestis Bechtsoudis | 6a938ed | 2016-10-12 12:04:34 +0300 | [diff] [blame] | 253 | else ifeq ($(ANDROID_APP_ABI),$(filter $(ANDROID_APP_ABI),x86_64)) |
| 254 | ANDROID_NDK_TOOLCHAIN ?= x86_64-4.9 |
Anestis Bechtsoudis | b4446a8 | 2016-10-28 11:30:10 +0300 | [diff] [blame] | 255 | ANDROID_ARCH_CPU := x86_64 |
Anestis Bechtsoudis | 6a938ed | 2016-10-12 12:04:34 +0300 | [diff] [blame] | 256 | else |
| 257 | $(error Unsuported / Unknown APP_API '$(ANDROID_APP_ABI)') |
| 258 | endif |
Anestis Bechtsoudis | d1fccd5 | 2016-05-06 13:11:27 +0300 | [diff] [blame] | 259 | endif |
| 260 | |
Kamil Rytarowski | 45a1cf4 | 2018-08-15 06:26:26 +0200 | [diff] [blame] | 261 | SUBDIR_ROOTS := linux mac netbsd posix libhfuzz libhfcommon libhfnetdriver |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 262 | DIRS := . $(shell find $(SUBDIR_ROOTS) -type d) |
| 263 | CLEAN_PATTERNS := *.o *~ core *.a *.dSYM *.la *.so *.dylib |
| 264 | SUBDIR_GARBAGE := $(foreach DIR,$(DIRS),$(addprefix $(DIR)/,$(CLEAN_PATTERNS))) |
| 265 | MAC_GARGBAGE := $(wildcard mac/mach_exc*) |
| 266 | ANDROID_GARBAGE := obj libs |
| 267 | |
Anestis Bechtsoudis | 2b60dcd | 2017-06-06 10:48:06 +0400 | [diff] [blame] | 268 | CLEAN_TARGETS := core Makefile.bak \ |
Robert Swiecki | c87e1c5 | 2018-01-07 01:28:30 +0100 | [diff] [blame] | 269 | $(OBJS) $(BIN) $(HFUZZ_CC_BIN) \ |
Robert Swiecki | 90892fb | 2018-01-04 16:00:54 +0100 | [diff] [blame] | 270 | $(LHFUZZ_ARCH) $(LHFUZZ_OBJS) \ |
| 271 | $(LCOMMON_ARCH) $(LCOMMON_OBJS) \ |
| 272 | $(LNETDRIVER_ARCH) $(LNETDRIVER_OBJS) \ |
Anestis Bechtsoudis | 2b60dcd | 2017-06-06 10:48:06 +0400 | [diff] [blame] | 273 | $(MAC_GARGBAGE) $(ANDROID_GARBAGE) $(SUBDIR_GARBAGE) |
| 274 | |
Robert Swiecki | c87e1c5 | 2018-01-07 01:28:30 +0100 | [diff] [blame] | 275 | all: $(BIN) $(HFUZZ_CC_BIN) $(LHFUZZ_ARCH) $(LCOMMON_ARCH) $(LNETDRIVER_ARCH) |
robert.swiecki@gmail.com | f761052 | 2015-02-16 10:52:02 +0000 | [diff] [blame] | 276 | |
robert.swiecki | 661d83a | 2015-03-12 14:27:51 +0000 | [diff] [blame] | 277 | %.o: %.c |
Robert Swiecki | e0c3137 | 2018-01-13 04:36:00 +0100 | [diff] [blame] | 278 | $(CC) -c $(CFLAGS) $(CFLAGS_BLOCKS) -o $@ $< |
robert.swiecki@gmail.com | f761052 | 2015-02-16 10:52:02 +0000 | [diff] [blame] | 279 | |
robert.swiecki | 661d83a | 2015-03-12 14:27:51 +0000 | [diff] [blame] | 280 | %.so: %.c |
| 281 | $(CC) -fPIC -shared $(CFLAGS) -o $@ $< |
| 282 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 283 | %.dylib: %.c |
| 284 | $(CC) -fPIC -shared $(CFLAGS) -o $@ $< |
robert.swiecki@gmail.com | c5f5be6 | 2015-02-15 17:17:21 +0000 | [diff] [blame] | 285 | |
Robert Swiecki | ec03fc5 | 2017-05-25 00:41:23 +0200 | [diff] [blame] | 286 | $(BIN): $(OBJS) $(LCOMMON_ARCH) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 287 | $(LD) -o $(BIN) $(OBJS) $(LDFLAGS) |
groebert@google.com | 1bd4c21 | 2013-06-19 11:13:56 +0000 | [diff] [blame] | 288 | |
Robert Swiecki | c87e1c5 | 2018-01-07 01:28:30 +0100 | [diff] [blame] | 289 | $(HFUZZ_CC_BIN): $(LCOMMON_ARCH) $(LHFUZZ_ARCH) $(LNETDRIVER_ARCH) $(HFUZZ_CC_SRCS) |
Robert Swiecki | e0c3137 | 2018-01-13 04:36:00 +0100 | [diff] [blame] | 290 | $(LD) -o $@ $(HFUZZ_CC_SRCS) $(LDFLAGS) $(CFLAGS) $(CFLAGS_BLOCKS) -D_HFUZZ_INC_PATH=$(HFUZZ_INC) |
Robert Swiecki | 3fbf924 | 2017-05-08 03:11:58 +0200 | [diff] [blame] | 291 | |
Robert Swiecki | 90892fb | 2018-01-04 16:00:54 +0100 | [diff] [blame] | 292 | $(LCOMMON_OBJS): $(LCOMMON_SRCS) |
Robert Swiecki | e0c3137 | 2018-01-13 04:36:00 +0100 | [diff] [blame] | 293 | $(CC) -c $(CFLAGS) $(LIBS_CFLAGS) -o $@ $(@:.o=.c) |
Robert Swiecki | 90892fb | 2018-01-04 16:00:54 +0100 | [diff] [blame] | 294 | |
| 295 | $(LCOMMON_ARCH): $(LCOMMON_OBJS) |
| 296 | $(AR) rcs $(LCOMMON_ARCH) $(LCOMMON_OBJS) |
| 297 | |
Robert Swiecki | ec03fc5 | 2017-05-25 00:41:23 +0200 | [diff] [blame] | 298 | $(LHFUZZ_OBJS): $(LHFUZZ_SRCS) |
Robert Swiecki | e0c3137 | 2018-01-13 04:36:00 +0100 | [diff] [blame] | 299 | $(CC) -c $(CFLAGS) $(LIBS_CFLAGS) -o $@ $(@:.o=.c) |
Jagger | c0dce05 | 2016-09-11 15:46:39 +0200 | [diff] [blame] | 300 | |
Robert Swiecki | 787aaab | 2018-01-20 02:28:13 +0100 | [diff] [blame] | 301 | $(LHFUZZ_ARCH): $(LHFUZZ_OBJS) $(LCOMMON_OBJS) |
Robert Swiecki | ec03fc5 | 2017-05-25 00:41:23 +0200 | [diff] [blame] | 302 | $(AR) rcs $(LHFUZZ_ARCH) $(LHFUZZ_OBJS) $(LCOMMON_OBJS) |
Jagger | 9a135bb | 2016-08-21 21:37:06 +0200 | [diff] [blame] | 303 | |
Robert Swiecki | 90892fb | 2018-01-04 16:00:54 +0100 | [diff] [blame] | 304 | $(LNETDRIVER_OBJS): $(LNETDRIVER_SRCS) |
Robert Swiecki | e0c3137 | 2018-01-13 04:36:00 +0100 | [diff] [blame] | 305 | $(CC) -c $(CFLAGS) $(LIBS_CFLAGS) -o $@ $(@:.o=.c) |
Robert Swiecki | 79e3053 | 2017-05-24 03:25:11 +0200 | [diff] [blame] | 306 | |
Robert Swiecki | 787aaab | 2018-01-20 02:28:13 +0100 | [diff] [blame] | 307 | $(LNETDRIVER_ARCH): $(LNETDRIVER_OBJS) $(LCOMMON_OBJS) |
Robert Swiecki | 90892fb | 2018-01-04 16:00:54 +0100 | [diff] [blame] | 308 | $(AR) rcs $(LNETDRIVER_ARCH) $(LNETDRIVER_OBJS) $(LCOMMON_OBJS) |
Robert Swiecki | 241a741 | 2017-05-24 01:53:15 +0200 | [diff] [blame] | 309 | |
Robert Swiecki | 1cd09ae | 2016-02-10 15:56:48 +0100 | [diff] [blame] | 310 | .PHONY: clean |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 311 | clean: |
Anestis Bechtsoudis | 2b60dcd | 2017-06-06 10:48:06 +0400 | [diff] [blame] | 312 | $(RM) -r $(CLEAN_TARGETS) |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 313 | |
Robert Swiecki | 1cd09ae | 2016-02-10 15:56:48 +0100 | [diff] [blame] | 314 | .PHONY: indent |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 315 | indent: |
Robert Swiecki | 98e2337 | 2019-01-30 11:50:18 +0100 | [diff] [blame] | 316 | clang-format -style="{BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 100, AlignAfterOpenBracket: DontAlign, AllowShortFunctionsOnASingleLine: false, AlwaysBreakBeforeMultilineStrings: false}" -i -sort-includes *.c *.h */*.c */*.h |
robert.swiecki@gmail.com | cc050fd | 2015-02-02 20:00:42 +0000 | [diff] [blame] | 317 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 318 | .PHONY: depend |
Robert Swiecki | 2173383 | 2018-02-17 17:55:54 +0100 | [diff] [blame] | 319 | depend: all |
Jagger | 59c0d0e | 2016-09-11 15:56:47 +0200 | [diff] [blame] | 320 | makedepend -Y. -Y* -- *.c */*.c |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 321 | |
| 322 | .PHONY: android |
Anestis Bechtsoudis | c1f6faa | 2015-07-31 05:32:19 +0300 | [diff] [blame] | 323 | android: |
Robert Swiecki | 1abedcd | 2017-06-08 00:21:18 +0200 | [diff] [blame] | 324 | $(info ***************************************************************) |
Anestis Bechtsoudis | 364b182 | 2017-06-15 13:59:39 +0400 | [diff] [blame] | 325 | $(info * Use Android NDK 15 or newer *) |
Robert Swiecki | 1abedcd | 2017-06-08 00:21:18 +0200 | [diff] [blame] | 326 | $(info ***************************************************************) |
Anestis Bechtsoudis | b4446a8 | 2016-10-28 11:30:10 +0300 | [diff] [blame] | 327 | @ANDROID_API=$(ANDROID_API) third_party/android/scripts/compile-libunwind.sh \ |
| 328 | third_party/android/libunwind $(ANDROID_ARCH_CPU) |
| 329 | |
| 330 | @ANDROID_API=$(ANDROID_API) third_party/android/scripts/compile-capstone.sh \ |
| 331 | third_party/android/capstone $(ANDROID_ARCH_CPU) |
| 332 | |
| 333 | ifeq ($(ANDROID_CLANG),true) |
| 334 | @ANDROID_API=$(ANDROID_API) third_party/android/scripts/compile-libBlocksRuntime.sh \ |
| 335 | third_party/android/libBlocksRuntime $(ANDROID_ARCH_CPU) |
| 336 | endif |
| 337 | |
Anestis Bechtsoudis | 3b5bd87 | 2015-09-13 10:58:30 +0300 | [diff] [blame] | 338 | ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./android/Android.mk \ |
Anestis Bechtsoudis | f5ded93 | 2016-10-18 10:50:00 +0300 | [diff] [blame] | 339 | APP_PLATFORM=$(ANDROID_API) APP_ABI=$(ANDROID_APP_ABI) \ |
Anestis Bechtsoudis | a187dcf | 2017-12-04 10:44:02 +0200 | [diff] [blame] | 340 | NDK_TOOLCHAIN=$(ANDROID_NDK_TOOLCHAIN) NDK_TOOLCHAIN_VERSION=$(ANDROID_NDK_TOOLCHAIN_VER) \ |
| 341 | $(NDK_BUILD_ARGS) APP_MODULES='honggfuzz hfuzz' |
Anestis Bechtsoudis | f5ded93 | 2016-10-18 10:50:00 +0300 | [diff] [blame] | 342 | |
| 343 | # Loop all ABIs and pass-through flags since visibility is lost due to sub-process |
| 344 | .PHONY: android-all |
| 345 | android-all: |
| 346 | @echo "Cleaning workspace:" |
| 347 | $(MAKE) clean |
| 348 | @echo "" |
| 349 | |
| 350 | @for abi in armeabi armeabi-v7a arm64-v8a x86 x86_64; do \ |
| 351 | ANDROID_APP_ABI=$$abi ANDROID_SKIP_CLEAN=true ANDROID_CLANG=$(ANDROID_CLANG) \ |
| 352 | ANDROID_API=$(ANDROID_API) ANDROID_DEBUG_ENABLED=$(ANDROID_DEBUG_ENABLED) \ |
| 353 | $(MAKE) android || { \ |
| 354 | echo "Recursive make failed"; exit 1; }; \ |
| 355 | echo ""; \ |
| 356 | done |
Anestis Bechtsoudis | b42f3e0 | 2015-08-17 08:57:42 +0300 | [diff] [blame] | 357 | |
Anestis Bechtsoudis | 6257b61 | 2016-10-28 11:30:43 +0300 | [diff] [blame] | 358 | .PHONY: android-clean-deps |
| 359 | android-clean-deps: |
| 360 | @for cpu in arm arm64 x86 x86_64; do \ |
| 361 | make -C "third_party/android/capstone" clean; \ |
| 362 | rm -rf "third_party/android/capstone/$$cpu"; \ |
| 363 | make -C "third_party/android/libunwind" clean; \ |
| 364 | rm -rf "third_party/android/libunwind/$$cpu"; \ |
| 365 | ndk-build -C "third_party/android/libBlocksRuntime" \ |
| 366 | NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk clean; \ |
| 367 | rm -rf "third_party/android/libBlocksRuntime/$$cpu"; \ |
| 368 | done |
| 369 | |
Robert Swiecki | e26e579 | 2018-07-13 14:01:07 +0200 | [diff] [blame] | 370 | PREFIX ?= /usr/local |
| 371 | BIN_PATH =$(PREFIX)/bin |
| 372 | |
| 373 | install: all |
| 374 | mkdir -p -m 755 $${DESTDIR}$(BIN_PATH) |
| 375 | install -m 755 honggfuzz $${DESTDIR}$(BIN_PATH) |
| 376 | install -m 755 hfuzz_cc/hfuzz-cc $${DESTDIR}$(BIN_PATH) |
| 377 | install -m 755 hfuzz_cc/hfuzz-clang $${DESTDIR}$(BIN_PATH) |
| 378 | install -m 755 hfuzz_cc/hfuzz-clang++ $${DESTDIR}$(BIN_PATH) |
| 379 | install -m 755 hfuzz_cc/hfuzz-gcc $${DESTDIR}$(BIN_PATH) |
| 380 | install -m 755 hfuzz_cc/hfuzz-g++ $${DESTDIR}$(BIN_PATH) |
| 381 | |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 382 | # DO NOT DELETE |
Robert Swiecki | 5627619 | 2018-01-21 15:43:02 +0100 | [diff] [blame] | 383 | |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 384 | cmdline.o: cmdline.h honggfuzz.h libhfcommon/util.h libhfcommon/common.h |
Robert Swiecki | 8a1fc67 | 2018-01-25 23:22:47 +0100 | [diff] [blame] | 385 | cmdline.o: display.h libhfcommon/files.h libhfcommon/common.h |
| 386 | cmdline.o: libhfcommon/log.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 387 | display.o: display.h honggfuzz.h libhfcommon/util.h libhfcommon/common.h |
| 388 | display.o: libhfcommon/log.h |
| 389 | fuzz.o: fuzz.h honggfuzz.h libhfcommon/util.h arch.h input.h |
| 390 | fuzz.o: libhfcommon/common.h libhfcommon/files.h libhfcommon/common.h |
Robert Swiecki | 8267c77 | 2018-08-23 23:21:40 +0200 | [diff] [blame] | 391 | fuzz.o: libhfcommon/log.h mangle.h report.h sanitizers.h socketfuzzer.h |
| 392 | fuzz.o: subproc.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 393 | honggfuzz.o: cmdline.h honggfuzz.h libhfcommon/util.h libhfcommon/common.h |
| 394 | honggfuzz.o: display.h fuzz.h input.h libhfcommon/files.h |
Robert Swiecki | 64d5243 | 2019-02-14 23:02:13 +0100 | [diff] [blame] | 395 | honggfuzz.o: libhfcommon/common.h libhfcommon/log.h socketfuzzer.h subproc.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 396 | input.o: input.h honggfuzz.h libhfcommon/util.h libhfcommon/common.h |
Robert Swiecki | 0f2c30a | 2018-01-13 14:03:39 +0100 | [diff] [blame] | 397 | input.o: libhfcommon/files.h libhfcommon/common.h mangle.h subproc.h |
| 398 | input.o: libhfcommon/log.h |
Robert Swiecki | 3ab1664 | 2018-01-12 18:08:37 +0100 | [diff] [blame] | 399 | mangle.o: mangle.h honggfuzz.h libhfcommon/util.h input.h |
Robert Swiecki | 0f2c30a | 2018-01-13 14:03:39 +0100 | [diff] [blame] | 400 | mangle.o: libhfcommon/common.h libhfcommon/log.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 401 | report.o: report.h honggfuzz.h libhfcommon/util.h libhfcommon/common.h |
| 402 | report.o: libhfcommon/log.h |
Robert Swiecki | 15801e8 | 2018-11-20 15:59:25 +0100 | [diff] [blame] | 403 | sanitizers.o: sanitizers.h honggfuzz.h libhfcommon/util.h cmdline.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 404 | sanitizers.o: libhfcommon/common.h libhfcommon/files.h libhfcommon/common.h |
| 405 | sanitizers.o: libhfcommon/log.h |
Robert Swiecki | c6e51b1 | 2019-05-22 16:02:57 +0200 | [diff] [blame] | 406 | socketfuzzer.o: socketfuzzer.h honggfuzz.h libhfcommon/util.h |
| 407 | socketfuzzer.o: libhfcommon/common.h libhfcommon/files.h libhfcommon/common.h |
| 408 | socketfuzzer.o: libhfcommon/log.h libhfcommon/ns.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 409 | subproc.o: subproc.h honggfuzz.h libhfcommon/util.h arch.h fuzz.h |
| 410 | subproc.o: libhfcommon/common.h libhfcommon/files.h libhfcommon/common.h |
| 411 | subproc.o: libhfcommon/log.h |
| 412 | hfuzz_cc/hfuzz-cc.o: honggfuzz.h libhfcommon/util.h libhfcommon/common.h |
| 413 | hfuzz_cc/hfuzz-cc.o: libhfcommon/files.h libhfcommon/common.h |
| 414 | hfuzz_cc/hfuzz-cc.o: libhfcommon/log.h |
| 415 | libhfcommon/files.o: libhfcommon/files.h libhfcommon/common.h |
| 416 | libhfcommon/files.o: libhfcommon/common.h libhfcommon/log.h |
| 417 | libhfcommon/files.o: libhfcommon/util.h |
| 418 | libhfcommon/log.o: libhfcommon/log.h libhfcommon/common.h libhfcommon/util.h |
| 419 | libhfcommon/ns.o: libhfcommon/ns.h libhfcommon/common.h libhfcommon/files.h |
| 420 | libhfcommon/ns.o: libhfcommon/common.h libhfcommon/log.h |
| 421 | libhfcommon/util.o: libhfcommon/util.h libhfcommon/common.h |
| 422 | libhfcommon/util.o: libhfcommon/files.h libhfcommon/common.h |
| 423 | libhfcommon/util.o: libhfcommon/log.h |
Robert Swiecki | 5cc1f7b | 2018-01-16 20:55:43 +0100 | [diff] [blame] | 424 | libhfnetdriver/netdriver.o: libhfnetdriver/netdriver.h honggfuzz.h |
| 425 | libhfnetdriver/netdriver.o: libhfcommon/util.h libhfcommon/common.h |
Robert Swiecki | c44a6ef | 2018-01-10 23:24:46 +0100 | [diff] [blame] | 426 | libhfnetdriver/netdriver.o: libhfcommon/files.h libhfcommon/common.h |
Robert Swiecki | a1c8ef7 | 2018-01-08 16:43:48 +0100 | [diff] [blame] | 427 | libhfnetdriver/netdriver.o: libhfcommon/log.h libhfcommon/ns.h |
Robert Swiecki | 5204089 | 2019-02-07 23:02:32 +0100 | [diff] [blame] | 428 | libhfuzz/fetch.o: libhfuzz/fetch.h honggfuzz.h libhfcommon/util.h |
| 429 | libhfuzz/fetch.o: libhfcommon/common.h libhfcommon/files.h |
| 430 | libhfuzz/fetch.o: libhfcommon/common.h libhfcommon/log.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 431 | libhfuzz/instrument.o: libhfuzz/instrument.h honggfuzz.h libhfcommon/util.h |
| 432 | libhfuzz/instrument.o: libhfcommon/common.h libhfcommon/log.h |
Robert Swiecki | 28c7d9e | 2018-02-07 15:26:24 +0100 | [diff] [blame] | 433 | libhfuzz/linux.o: libhfcommon/common.h libhfcommon/files.h |
| 434 | libhfuzz/linux.o: libhfcommon/common.h libhfcommon/log.h libhfcommon/ns.h |
| 435 | libhfuzz/linux.o: libhfuzz/libhfuzz.h |
Robert Swiecki | 89d444a | 2018-01-11 23:45:19 +0100 | [diff] [blame] | 436 | libhfuzz/memorycmp.o: libhfcommon/common.h libhfuzz/instrument.h |
Robert Swiecki | c6e51b1 | 2019-05-22 16:02:57 +0200 | [diff] [blame] | 437 | libhfuzz/persistent.o: honggfuzz.h libhfcommon/util.h libhfcommon/common.h |
| 438 | libhfuzz/persistent.o: libhfcommon/files.h libhfcommon/common.h |
| 439 | libhfuzz/persistent.o: libhfcommon/log.h libhfuzz/fetch.h |
| 440 | libhfuzz/persistent.o: libhfuzz/instrument.h libhfuzz/libhfuzz.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 441 | linux/arch.o: arch.h honggfuzz.h libhfcommon/util.h fuzz.h |
| 442 | linux/arch.o: libhfcommon/common.h libhfcommon/files.h libhfcommon/common.h |
| 443 | linux/arch.o: libhfcommon/log.h libhfcommon/ns.h linux/perf.h linux/trace.h |
Robert Swiecki | 8267c77 | 2018-08-23 23:21:40 +0200 | [diff] [blame] | 444 | linux/arch.o: sanitizers.h subproc.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 445 | linux/bfd.o: linux/bfd.h linux/unwind.h honggfuzz.h libhfcommon/util.h |
| 446 | linux/bfd.o: libhfcommon/common.h libhfcommon/files.h libhfcommon/common.h |
| 447 | linux/bfd.o: libhfcommon/log.h |
| 448 | linux/perf.o: linux/perf.h honggfuzz.h libhfcommon/util.h |
| 449 | linux/perf.o: libhfcommon/common.h libhfcommon/files.h libhfcommon/common.h |
| 450 | linux/perf.o: libhfcommon/log.h linux/pt.h |
Robert Swiecki | c6e51b1 | 2019-05-22 16:02:57 +0200 | [diff] [blame] | 451 | linux/pt.o: linux/pt.h honggfuzz.h libhfcommon/util.h libhfcommon/common.h |
| 452 | linux/pt.o: libhfcommon/log.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 453 | linux/trace.o: linux/trace.h honggfuzz.h libhfcommon/util.h |
| 454 | linux/trace.o: libhfcommon/common.h libhfcommon/files.h libhfcommon/common.h |
Robert Swiecki | 8267c77 | 2018-08-23 23:21:40 +0200 | [diff] [blame] | 455 | linux/trace.o: libhfcommon/log.h linux/bfd.h linux/unwind.h sanitizers.h |
| 456 | linux/trace.o: socketfuzzer.h subproc.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 457 | linux/unwind.o: linux/unwind.h honggfuzz.h libhfcommon/util.h |
| 458 | linux/unwind.o: libhfcommon/common.h libhfcommon/log.h |
Robert Swiecki | df02b9d | 2018-02-21 21:20:13 +0100 | [diff] [blame] | 459 | mac/arch.o: arch.h honggfuzz.h libhfcommon/util.h fuzz.h libhfcommon/common.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 460 | mac/arch.o: libhfcommon/files.h libhfcommon/common.h libhfcommon/log.h |
Robert Swiecki | 8267c77 | 2018-08-23 23:21:40 +0200 | [diff] [blame] | 461 | mac/arch.o: subproc.h |
Kamil Rytarowski | 45a1cf4 | 2018-08-15 06:26:26 +0200 | [diff] [blame] | 462 | netbsd/arch.o: arch.h honggfuzz.h libhfcommon/util.h fuzz.h |
| 463 | netbsd/arch.o: libhfcommon/common.h libhfcommon/files.h libhfcommon/common.h |
Robert Swiecki | 12738cd | 2019-01-30 16:35:53 +0100 | [diff] [blame] | 464 | netbsd/arch.o: libhfcommon/log.h libhfcommon/ns.h netbsd/trace.h subproc.h |
Kamil Rytarowski | 45a1cf4 | 2018-08-15 06:26:26 +0200 | [diff] [blame] | 465 | netbsd/trace.o: netbsd/trace.h honggfuzz.h libhfcommon/util.h |
| 466 | netbsd/trace.o: libhfcommon/common.h libhfcommon/files.h libhfcommon/common.h |
Robert Swiecki | 12738cd | 2019-01-30 16:35:53 +0100 | [diff] [blame] | 467 | netbsd/trace.o: libhfcommon/log.h netbsd/unwind.h socketfuzzer.h subproc.h |
Kamil Rytarowski | bde3da8 | 2018-08-20 11:29:45 +0200 | [diff] [blame] | 468 | netbsd/unwind.o: netbsd/unwind.h honggfuzz.h libhfcommon/util.h |
Kamil Rytarowski | 45a1cf4 | 2018-08-15 06:26:26 +0200 | [diff] [blame] | 469 | netbsd/unwind.o: libhfcommon/common.h libhfcommon/log.h |
Robert Swiecki | 246af3e | 2018-01-05 14:56:32 +0100 | [diff] [blame] | 470 | posix/arch.o: arch.h honggfuzz.h libhfcommon/util.h fuzz.h |
| 471 | posix/arch.o: libhfcommon/common.h libhfcommon/files.h libhfcommon/common.h |
Robert Swiecki | 8267c77 | 2018-08-23 23:21:40 +0200 | [diff] [blame] | 472 | posix/arch.o: libhfcommon/log.h subproc.h |