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. |
| 19 | |
| 20 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 21 | # Common for all architectures |
Robert Swiecki | a9db9dd | 2016-03-09 16:29:37 +0100 | [diff] [blame] | 22 | CC ?= gcc |
| 23 | LD = $(CC) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 24 | BIN := honggfuzz |
Robert Swiecki | fc35c5e | 2016-03-09 17:18:48 +0100 | [diff] [blame] | 25 | COMMON_CFLAGS := -D_GNU_SOURCE -Wall -Werror -Wframe-larger-than=131072 |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 26 | COMMON_LDFLAGS := -lm |
Robert Swiecki | 0e67388 | 2016-03-31 18:50:29 +0200 | [diff] [blame] | 27 | COMMON_SRCS := honggfuzz.c cmdline.c display.c files.c fuzz.c log.c mangle.c report.c sancov.c subproc.c util.c |
Jagger | a443b69 | 2016-08-29 23:01:15 +0200 | [diff] [blame] | 28 | CFLAGS ?= -O3 |
| 29 | LDFLAGS ?= |
groebert@google.com | 1bd4c21 | 2013-06-19 11:13:56 +0000 | [diff] [blame] | 30 | |
robert.swiecki@gmail.com | 448d281 | 2015-02-02 20:57:13 +0000 | [diff] [blame] | 31 | OS ?= $(shell uname -s) |
robert.swiecki@gmail.com | 15eca6f | 2015-03-04 03:31:36 +0000 | [diff] [blame] | 32 | MARCH ?= $(shell uname -m) |
groebert@google.com | 1bd4c21 | 2013-06-19 11:13:56 +0000 | [diff] [blame] | 33 | |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 34 | ifeq ($(OS),Linux) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 35 | ARCH := LINUX |
Robert Swiecki | ac310a8 | 2016-02-22 18:58:36 +0100 | [diff] [blame] | 36 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 37 | ARCH_CFLAGS := -std=c11 -I. -I/usr/local/include -I/usr/include \ |
| 38 | -Wextra -Wno-initializer-overrides -Wno-override-init \ |
Robert Swiecki | 0a7ce04 | 2016-08-25 15:31:31 +0200 | [diff] [blame] | 39 | -Wno-unknown-warning-option -funroll-loops \ |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 40 | -D_FILE_OFFSET_BITS=64 |
Jagger | 2e06f56 | 2016-02-11 09:32:39 +0100 | [diff] [blame] | 41 | ARCH_LDFLAGS := -L/usr/local/include -L/usr/include \ |
Jagger | 2e06f56 | 2016-02-11 09:32:39 +0100 | [diff] [blame] | 42 | -lpthread -lunwind-ptrace -lunwind-generic -lbfd -lopcodes -lrt |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 43 | ARCH_SRCS := $(wildcard linux/*.c) |
robert.swiecki@gmail.com | 3ad0bb3 | 2015-03-04 17:19:13 +0000 | [diff] [blame] | 44 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 45 | ifeq ("$(wildcard /usr/include/bfd.h)","") |
| 46 | WARN_LIBRARY += binutils-devel |
| 47 | endif |
| 48 | ifeq ("$(wildcard /usr/include/libunwind-ptrace.h)","") |
| 49 | WARN_LIBRARY += libunwind-devel/libunwind8-devel |
| 50 | endif |
Jagger | 9797ac5 | 2016-02-04 23:57:29 +0100 | [diff] [blame] | 51 | ifeq ("$(wildcard /usr/local/include/intel-pt.h)","/usr/local/include/intel-pt.h") |
| 52 | ARCH_CFLAGS += -D_HF_LINUX_INTEL_PT_LIB |
| 53 | ARCH_CFLAGS += -I/usr/local/include |
Jagger | 070b2c6 | 2016-02-05 06:01:15 +0100 | [diff] [blame] | 54 | ARCH_LDFLAGS += -L/usr/local/lib -lipt -Wl,--rpath=/usr/local/lib |
Jagger | 9797ac5 | 2016-02-04 23:57:29 +0100 | [diff] [blame] | 55 | endif |
| 56 | ifeq ("$(wildcard /usr/include/intel-pt.h)","/usr/include/intel-pt.h") |
| 57 | ARCH_CFLAGS += -D_HF_LINUX_INTEL_PT_LIB |
Jagger | 3594cda | 2016-02-08 00:05:47 +0100 | [diff] [blame] | 58 | ARCH_LDFLAGS += -lipt |
Jagger | 9797ac5 | 2016-02-04 23:57:29 +0100 | [diff] [blame] | 59 | endif |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 60 | ifdef WARN_LIBRARY |
| 61 | $(info ***************************************************************) |
| 62 | $(info Development libraries which are most likely missing on your OS:) |
| 63 | $(info $(WARN_LIBRARY)) |
| 64 | $(info ***************************************************************) |
| 65 | endif |
robert.swiecki@gmail.com | 15eca6f | 2015-03-04 03:31:36 +0000 | [diff] [blame] | 66 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 67 | ifeq ($(MARCH),$(filter $(MARCH),x86_64 i386)) |
| 68 | # Support for popcnt (used in linux/perf.c) |
| 69 | ARCH_CFLAGS += -msse4.2 |
| 70 | endif # MARCH |
| 71 | # OS Linux |
| 72 | else ifeq ($(OS),Darwin) |
| 73 | ARCH := DARWIN |
Anestis Bechtsoudis | 0e5c2c5 | 2015-10-08 13:30:03 -0700 | [diff] [blame] | 74 | CRASHWRANGLER := third_party/mac |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 75 | OS_VERSION := $(shell sw_vers -productVersion) |
Anestis Bechtsoudis | 0e5c2c5 | 2015-10-08 13:30:03 -0700 | [diff] [blame] | 76 | ifneq (,$(findstring 10.11,$(OS_VERSION))) |
Robert Swiecki | 1cd09ae | 2016-02-10 15:56:48 +0100 | [diff] [blame] | 77 | # El Capitan didn't break compatibility |
Anestis Bechtsoudis | 0e5c2c5 | 2015-10-08 13:30:03 -0700 | [diff] [blame] | 78 | SDK_NAME := "macosx10.11" |
| 79 | CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Yosemite.o |
| 80 | else ifneq (,$(findstring 10.10,$(OS_VERSION))) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 81 | SDK_NAME := "macosx10.10" |
Anestis Bechtsoudis | 0e5c2c5 | 2015-10-08 13:30:03 -0700 | [diff] [blame] | 82 | CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Yosemite.o |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 83 | else ifneq (,$(findstring 10.9,$(OS_VERSION))) |
| 84 | SDK_NAME := "macosx10.9" |
Anestis Bechtsoudis | 0e5c2c5 | 2015-10-08 13:30:03 -0700 | [diff] [blame] | 85 | CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Mavericks.o |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 86 | else ifneq (,$(findstring 10.8,$(OS_VERSION))) |
| 87 | SDK_NAME := "macosx10.8" |
Anestis Bechtsoudis | 0e5c2c5 | 2015-10-08 13:30:03 -0700 | [diff] [blame] | 88 | CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Mountain_Lion.o |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 89 | else |
Anestis Bechtsoudis | 0e5c2c5 | 2015-10-08 13:30:03 -0700 | [diff] [blame] | 90 | $(error Unsupported MAC OS X version) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 91 | endif |
| 92 | SDK := $(shell xcrun --sdk $(SDK_NAME) --show-sdk-path 2>/dev/null) |
| 93 | ifeq (,$(findstring MacOSX.platform,$(SDK))) |
| 94 | XC_PATH := $(shell xcode-select -p) |
| 95 | $(error $(SDK_NAME) not found in $(XC_PATH)) |
| 96 | endif |
| 97 | CC := $(shell xcrun --sdk $(SDK_NAME) --find cc) |
| 98 | LD := $(shell xcrun --sdk $(SDK_NAME) --find cc) |
Robert Swiecki | 0a7ce04 | 2016-08-25 15:31:31 +0200 | [diff] [blame] | 99 | ARCH_CFLAGS := -arch x86_64 -std=c99 -isysroot $(SDK) -I. \ |
Robert Swiecki | a9db9dd | 2016-03-09 16:29:37 +0100 | [diff] [blame] | 100 | -x objective-c -pedantic -fblocks \ |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 101 | -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized \ |
| 102 | -Wreturn-type -Wpointer-arith -Wno-gnu-case-range -Wno-gnu-designator \ |
| 103 | -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-attributes |
| 104 | ARCH_LDFLAGS := -F/System/Library/PrivateFrameworks -framework CoreSymbolication -framework IOKit \ |
| 105 | -F$(SDK)/System/Library/Frameworks -F$(SDK)/System/Library/PrivateFrameworks \ |
| 106 | -framework Foundation -framework ApplicationServices -framework Symbolication \ |
| 107 | -framework CoreServices -framework CrashReporterSupport -framework CoreFoundation \ |
| 108 | -framework CommerceKit $(CRASH_REPORT) |
| 109 | MIG_RET := $(shell mig -header mac/mach_exc.h -user mac/mach_excUser.c -sheader mac/mach_excServer.h \ |
| 110 | -server mac/mach_excServer.c $(SDK)/usr/include/mach/mach_exc.defs &>/dev/null; echo $$?) |
| 111 | ifeq ($(MIG_RET),1) |
| 112 | $(error mig failed to generate RPC code) |
| 113 | endif |
| 114 | ARCH_SRCS := $(wildcard mac/*.c) |
| 115 | # OS Darwin |
tlogic@gmail.com | 479f0f9 | 2015-04-15 18:03:16 +0000 | [diff] [blame] | 116 | else |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 117 | ARCH := POSIX |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 118 | ARCH_SRCS := $(wildcard posix/*.c) |
Jagger | 2381ef4 | 2016-03-20 23:32:05 +0100 | [diff] [blame] | 119 | ARCH_CFLAGS := -std=c11 -I. -I/usr/local/include -I/usr/include \ |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 120 | -Wextra -Wno-initializer-overrides -Wno-override-init \ |
Robert Swiecki | ac310a8 | 2016-02-22 18:58:36 +0100 | [diff] [blame] | 121 | -Wno-unknown-warning-option -Wno-unknown-pragmas \ |
Robert Swiecki | 0a7ce04 | 2016-08-25 15:31:31 +0200 | [diff] [blame] | 122 | -U__STRICT_ANSI__ -funroll-loops |
Jagger | f159a15 | 2016-09-02 02:22:09 +0200 | [diff] [blame] | 123 | ARCH_LDFLAGS := -lpthread -L/usr/local/include -L/usr/include -lrt |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 124 | # OS Posix |
tlogic@gmail.com | 479f0f9 | 2015-04-15 18:03:16 +0000 | [diff] [blame] | 125 | endif |
robert.swiecki@gmail.com | b0cac5b | 2015-02-17 00:19:59 +0000 | [diff] [blame] | 126 | |
Jagger | 9856150 | 2016-03-10 00:01:08 +0100 | [diff] [blame] | 127 | COMPILER = $(shell $(CC) -v 2>&1 | grep -E '(gcc|clang) version' | grep -oE '(clang|gcc)') |
| 128 | ifeq ($(COMPILER),clang) |
| 129 | ARCH_CFLAGS += -fblocks |
| 130 | ARCH_LDFLAGS += -lBlocksRuntime |
| 131 | endif |
| 132 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 133 | SRCS := $(COMMON_SRCS) $(ARCH_SRCS) |
| 134 | OBJS := $(SRCS:.c=.o) |
Jagger | a72ac9d | 2016-04-01 23:48:12 +0200 | [diff] [blame] | 135 | |
Jagger | efeb4be | 2016-09-06 02:41:51 +0200 | [diff] [blame^] | 136 | LIBS_SRCS := $(wildcard libhfuzz/*.c) |
Jagger | a72ac9d | 2016-04-01 23:48:12 +0200 | [diff] [blame] | 137 | LIBS_OBJS := $(LIBS_SRCS:.c=.o) |
Jagger | efeb4be | 2016-09-06 02:41:51 +0200 | [diff] [blame^] | 138 | HFUZZ_ARCH := libhfuzz/libhfuzz.a |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 139 | |
| 140 | # Respect external user defines |
| 141 | CFLAGS += $(COMMON_CFLAGS) $(ARCH_CFLAGS) -D_HF_ARCH_${ARCH} |
| 142 | LDFLAGS += $(COMMON_LDFLAGS) $(ARCH_LDFLAGS) |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 143 | |
Anestis Bechtsoudis | 3485c73 | 2015-09-10 17:40:04 +0300 | [diff] [blame] | 144 | ifeq ($(DEBUG),true) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 145 | CFLAGS += -g -ggdb |
Robert Swiecki | caf9d76 | 2016-03-10 16:13:18 +0100 | [diff] [blame] | 146 | LDFLAGS += -g -ggdb |
Anestis Bechtsoudis | 3485c73 | 2015-09-10 17:40:04 +0300 | [diff] [blame] | 147 | endif |
| 148 | |
Anestis Bechtsoudis | cfc39fb | 2015-08-06 10:31:36 +0300 | [diff] [blame] | 149 | # Control Android builds |
| 150 | ANDROID_DEBUG_ENABLED ?= false |
Anestis Bechtsoudis | d1fccd5 | 2016-05-06 13:11:27 +0300 | [diff] [blame] | 151 | ANDROID_CLANG ?= false |
Anestis Bechtsoudis | cfc39fb | 2015-08-06 10:31:36 +0300 | [diff] [blame] | 152 | ANDROID_APP_ABI ?= armeabi-v7a |
| 153 | NDK_BUILD_ARGS := |
| 154 | ifeq ($(ANDROID_DEBUG_ENABLED),true) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 155 | NDK_BUILD_ARGS += V=1 NDK_DEBUG=1 APP_OPTIM=debug |
Anestis Bechtsoudis | cfc39fb | 2015-08-06 10:31:36 +0300 | [diff] [blame] | 156 | endif |
| 157 | |
Anestis Bechtsoudis | d1fccd5 | 2016-05-06 13:11:27 +0300 | [diff] [blame] | 158 | ifeq ($(ANDROID_CLANG),true) |
| 159 | # clang works only for APIs >= 23, so default to it if not set |
Jagger | d18ba37 | 2016-09-04 19:03:46 +0200 | [diff] [blame] | 160 | ANDROID_API ?= android-24 |
Anestis Bechtsoudis | d1fccd5 | 2016-05-06 13:11:27 +0300 | [diff] [blame] | 161 | ifeq ($(ANDROID_APP_ABI),armeabi-v7a) |
Jagger | d18ba37 | 2016-09-04 19:03:46 +0200 | [diff] [blame] | 162 | ANDROID_NDK_TOOLCHAIN ?= arm-linux-androideabi-4.9 |
Anestis Bechtsoudis | d1fccd5 | 2016-05-06 13:11:27 +0300 | [diff] [blame] | 163 | else ifeq ($(ANDROID_APP_ABI),x86) |
Jagger | d18ba37 | 2016-09-04 19:03:46 +0200 | [diff] [blame] | 164 | ANDROID_NDK_TOOLCHAIN ?= x86-clang |
Anestis Bechtsoudis | d1fccd5 | 2016-05-06 13:11:27 +0300 | [diff] [blame] | 165 | else ifeq ($(ANDROID_APP_ABI),arm64-v8a) |
Jagger | d18ba37 | 2016-09-04 19:03:46 +0200 | [diff] [blame] | 166 | ANDROID_NDK_TOOLCHAIN ?= aarch64-linux-android-clang |
Anestis Bechtsoudis | d1fccd5 | 2016-05-06 13:11:27 +0300 | [diff] [blame] | 167 | else ifeq ($(ANDROID_APP_ABI),x86_64) |
Jagger | d18ba37 | 2016-09-04 19:03:46 +0200 | [diff] [blame] | 168 | ANDROID_NDK_TOOLCHAIN ?= x86_64-clang |
Anestis Bechtsoudis | d1fccd5 | 2016-05-06 13:11:27 +0300 | [diff] [blame] | 169 | else |
| 170 | $(error Unsuported / Unknown APP_API '$(ANDROID_APP_ABI)') |
| 171 | endif |
| 172 | else |
Jagger | d18ba37 | 2016-09-04 19:03:46 +0200 | [diff] [blame] | 173 | ANDROID_API ?= android-24 |
Anestis Bechtsoudis | d1fccd5 | 2016-05-06 13:11:27 +0300 | [diff] [blame] | 174 | ANDROID_NDK_TOOLCHAIN ?= |
| 175 | endif |
| 176 | |
Jagger | 22f2395 | 2016-09-04 17:43:47 +0200 | [diff] [blame] | 177 | SUBDIR_ROOTS := linux mac posix lib |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 178 | DIRS := . $(shell find $(SUBDIR_ROOTS) -type d) |
| 179 | CLEAN_PATTERNS := *.o *~ core *.a *.dSYM *.la *.so *.dylib |
| 180 | SUBDIR_GARBAGE := $(foreach DIR,$(DIRS),$(addprefix $(DIR)/,$(CLEAN_PATTERNS))) |
| 181 | MAC_GARGBAGE := $(wildcard mac/mach_exc*) |
| 182 | ANDROID_GARBAGE := obj libs |
| 183 | |
Jagger | 9a135bb | 2016-08-21 21:37:06 +0200 | [diff] [blame] | 184 | all: $(BIN) $(HFUZZ_ARCH) |
robert.swiecki@gmail.com | f761052 | 2015-02-16 10:52:02 +0000 | [diff] [blame] | 185 | |
robert.swiecki | 661d83a | 2015-03-12 14:27:51 +0000 | [diff] [blame] | 186 | %.o: %.c |
robert.swiecki@gmail.com | 2a32b51 | 2015-03-10 16:06:43 +0000 | [diff] [blame] | 187 | $(CC) -c $(CFLAGS) -o $@ $< |
robert.swiecki@gmail.com | f761052 | 2015-02-16 10:52:02 +0000 | [diff] [blame] | 188 | |
robert.swiecki | 661d83a | 2015-03-12 14:27:51 +0000 | [diff] [blame] | 189 | %.so: %.c |
| 190 | $(CC) -fPIC -shared $(CFLAGS) -o $@ $< |
| 191 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 192 | %.dylib: %.c |
| 193 | $(CC) -fPIC -shared $(CFLAGS) -o $@ $< |
robert.swiecki@gmail.com | c5f5be6 | 2015-02-15 17:17:21 +0000 | [diff] [blame] | 194 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 195 | $(BIN): $(OBJS) |
| 196 | $(LD) -o $(BIN) $(OBJS) $(LDFLAGS) |
groebert@google.com | 1bd4c21 | 2013-06-19 11:13:56 +0000 | [diff] [blame] | 197 | |
Jagger | 9a135bb | 2016-08-21 21:37:06 +0200 | [diff] [blame] | 198 | $(HFUZZ_ARCH): $(LIBS_OBJS) |
| 199 | $(AR) rcs $(HFUZZ_ARCH) $(LIBS_OBJS) |
| 200 | |
Robert Swiecki | 1cd09ae | 2016-02-10 15:56:48 +0100 | [diff] [blame] | 201 | .PHONY: clean |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 202 | clean: |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 203 | $(RM) -r core $(OBJS) $(BIN) $(MAC_GARGBAGE) $(ANDROID_GARBAGE) $(SUBDIR_GARBAGE) |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 204 | |
Robert Swiecki | 1cd09ae | 2016-02-10 15:56:48 +0100 | [diff] [blame] | 205 | .PHONY: indent |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 206 | indent: |
Jagger | 400fd8f | 2015-08-16 10:50:55 +0200 | [diff] [blame] | 207 | indent -linux -l100 -lc100 -nut -i4 *.c *.h */*.c */*.h; rm -f *~ */*~ |
robert.swiecki@gmail.com | cc050fd | 2015-02-02 20:00:42 +0000 | [diff] [blame] | 208 | |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 209 | .PHONY: depend |
robert.swiecki@gmail.com | cc050fd | 2015-02-02 20:00:42 +0000 | [diff] [blame] | 210 | depend: |
robert.swiecki@gmail.com | 42f2a3e | 2015-02-17 00:20:49 +0000 | [diff] [blame] | 211 | makedepend -Y. -Y* -- $(SRCS) |
Anestis Bechtsoudis | 057c99f | 2015-09-24 14:39:57 +0300 | [diff] [blame] | 212 | |
| 213 | .PHONY: android |
Anestis Bechtsoudis | c1f6faa | 2015-07-31 05:32:19 +0300 | [diff] [blame] | 214 | android: |
Anestis Bechtsoudis | 3b5bd87 | 2015-09-13 10:58:30 +0300 | [diff] [blame] | 215 | ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./android/Android.mk \ |
Anestis Bechtsoudis | 539dbc5 | 2015-12-26 20:11:46 +0200 | [diff] [blame] | 216 | APP_PLATFORM=$(ANDROID_API) APP_ABI=$(ANDROID_APP_ABI) \ |
| 217 | NDK_TOOLCHAIN=$(ANDROID_NDK_TOOLCHAIN) $(NDK_BUILD_ARGS) |
Anestis Bechtsoudis | b42f3e0 | 2015-08-17 08:57:42 +0300 | [diff] [blame] | 218 | |
robert.swiecki@gmail.com | cc050fd | 2015-02-02 20:00:42 +0000 | [diff] [blame] | 219 | |
robert.swiecki | 3bb518c | 2010-10-14 00:48:24 +0000 | [diff] [blame] | 220 | # DO NOT DELETE |
robert.swiecki@gmail.com | cc050fd | 2015-02-02 20:00:42 +0000 | [diff] [blame] | 221 | |
Jagger | 08816fd | 2016-03-11 01:32:38 +0100 | [diff] [blame] | 222 | honggfuzz.o: common.h cmdline.h display.h log.h files.h fuzz.h util.h |
Robert Swiecki | 8b76934 | 2016-01-21 16:35:48 +0100 | [diff] [blame] | 223 | cmdline.o: cmdline.h common.h log.h files.h util.h |
Robert Swiecki | 81c6a0d | 2015-09-08 15:43:20 +0200 | [diff] [blame] | 224 | display.o: common.h display.h log.h util.h |
Robert Swiecki | 8ca2822 | 2016-03-15 20:35:44 +0100 | [diff] [blame] | 225 | files.o: common.h files.h log.h util.h |
Jagger | 08816fd | 2016-03-11 01:32:38 +0100 | [diff] [blame] | 226 | fuzz.o: common.h fuzz.h arch.h files.h log.h mangle.h report.h sancov.h |
Jagger | c8b6eda | 2016-09-01 03:52:35 +0200 | [diff] [blame] | 227 | fuzz.o: subproc.h util.h |
| 228 | log.o: common.h log.h util.h |
Jagger | 400fd8f | 2015-08-16 10:50:55 +0200 | [diff] [blame] | 229 | mangle.o: common.h mangle.h log.h util.h |
Jagger | 3db1d95 | 2016-03-10 02:02:46 +0100 | [diff] [blame] | 230 | report.o: common.h report.h log.h util.h |
Jagger | 733849b | 2016-03-10 03:19:04 +0100 | [diff] [blame] | 231 | sancov.o: common.h sancov.h files.h log.h util.h |
Jagger | 2ed5b73 | 2016-09-04 17:45:59 +0200 | [diff] [blame] | 232 | subproc.o: common.h subproc.h arch.h files.h log.h sancov.h util.h |
Jagger | c8b6eda | 2016-09-01 03:52:35 +0200 | [diff] [blame] | 233 | util.o: common.h util.h files.h log.h |
Robert Swiecki | 2cb3de0 | 2016-03-24 14:43:56 +0100 | [diff] [blame] | 234 | linux/ptrace_utils.o: common.h linux/ptrace_utils.h files.h linux/bfd.h |
Jagger | c8b6eda | 2016-09-01 03:52:35 +0200 | [diff] [blame] | 235 | linux/ptrace_utils.o: linux/unwind.h linux/unwind.h log.h sancov.h subproc.h |
| 236 | linux/ptrace_utils.o: util.h |
Jagger | 3e4abcc | 2016-07-18 20:41:00 +0200 | [diff] [blame] | 237 | linux/perf.o: common.h linux/perf.h files.h linux/pt.h log.h util.h |
| 238 | linux/bfd.o: common.h linux/bfd.h linux/unwind.h files.h log.h util.h |
Jagger | c8b6eda | 2016-09-01 03:52:35 +0200 | [diff] [blame] | 239 | linux/pt.o: common.h linux/pt.h log.h util.h |
Robert Swiecki | 2cb3de0 | 2016-03-24 14:43:56 +0100 | [diff] [blame] | 240 | linux/unwind.o: common.h linux/unwind.h log.h |
Jagger | 3e4abcc | 2016-07-18 20:41:00 +0200 | [diff] [blame] | 241 | linux/arch.o: common.h arch.h files.h linux/perf.h linux/ptrace_utils.h log.h |
| 242 | linux/arch.o: sancov.h subproc.h util.h |