mirror of
https://github.com/hasherezade/tiny_tracer
synced 2026-06-08 14:36:37 +00:00
86 lines
2.6 KiB
Plaintext
86 lines
2.6 KiB
Plaintext
#
|
|
# Copyright (C) 2012-2020 Intel Corporation.
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
##############################################################
|
|
#
|
|
# This file includes all the test targets as well as all the
|
|
# non-default build rules and test recipes.
|
|
#
|
|
##############################################################
|
|
|
|
ifneq ($(TARGET),intel64)
|
|
ifneq ($(TARGET),ia32)
|
|
$(error Unsupported TARGET '$(TARGET)'. Expected TARGET=intel64 or TARGET=ia32)
|
|
endif
|
|
endif
|
|
|
|
# TinyTracer-specific configuration to generate proper DLL name.
|
|
ifeq ($(TARGET),intel64)
|
|
BITNESS := 64
|
|
else ifeq ($(TARGET),ia32)
|
|
BITNESS := 32
|
|
endif
|
|
|
|
##############################################################
|
|
#
|
|
# Windows SDK (needed for PIN 4.x clang-cl builds)
|
|
#
|
|
##############################################################
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
# Auto-generate Windows SDK import-library path when sdk_lib.mk is missing.
|
|
sdk_lib.mk: find_sdk_win.sh
|
|
bash find_sdk_win.sh
|
|
|
|
-include sdk_lib.mk
|
|
|
|
ifeq ($(TARGET),intel64)
|
|
ifdef WINDOWS_SDK_KERNEL32_X64
|
|
TOOL_LPATHS += -LIBPATH:$(dir $(WINDOWS_SDK_KERNEL32_X64))
|
|
endif
|
|
else ifeq ($(TARGET),ia32)
|
|
ifdef WINDOWS_SDK_KERNEL32_X86
|
|
TOOL_LPATHS += -LIBPATH:$(dir $(WINDOWS_SDK_KERNEL32_X86))
|
|
endif
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
##############################################################
|
|
#
|
|
# Test targets
|
|
#
|
|
##############################################################
|
|
|
|
###### Place all generic definitions here ######
|
|
|
|
# This defines tests which run tools of the same name. This is simply for convenience to avoid
|
|
# defining the test name twice (once in TOOL_ROOTS and again in TEST_ROOTS).
|
|
# Tests defined here should not be defined in TOOL_ROOTS and TEST_ROOTS.
|
|
TEST_TOOL_ROOTS := TinyTracer$(BITNESS)
|
|
|
|
##############################################################
|
|
#
|
|
# Build rules
|
|
#
|
|
##############################################################
|
|
|
|
# This section contains the build rules for all binaries that have special build rules.
|
|
# See makefile.default.rules for the default build rules.
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
EVASION_CHECKS=$(OBJDIR)AntiDebug$(OBJ_SUFFIX) $(OBJDIR)AntiVm$(OBJ_SUFFIX) $(OBJDIR)EvasionWatch$(OBJ_SUFFIX)
|
|
EXPORTS_INFO=$(OBJDIR)ExportsInfo$(OBJ_SUFFIX)
|
|
else
|
|
EVASION_CHECKS=
|
|
EXPORTS_INFO=
|
|
endif
|
|
|
|
$(OBJDIR)TinyTracer$(BITNESS)$(PINTOOL_SUFFIX): $(OBJDIR)Util$(OBJ_SUFFIX) $(OBJDIR)SysUtil$(OBJ_SUFFIX) $(OBJDIR)Settings$(OBJ_SUFFIX) $(OBJDIR)TraceLog$(OBJ_SUFFIX) \
|
|
$(OBJDIR)TinyTracer$(OBJ_SUFFIX) $(OBJDIR)ModuleInfo$(OBJ_SUFFIX) $(OBJDIR)ProcessInfo$(OBJ_SUFFIX) $(OBJDIR)FuncWatch$(OBJ_SUFFIX) \
|
|
$(OBJDIR)TrackReturns$(OBJ_SUFFIX) $(EVASION_CHECKS) $(EXPORTS_INFO)
|
|
$(LINKER) $(TOOL_LDFLAGS) $(LINK_EXE)$@ $^ $(TOOL_LPATHS) $(TOOL_LIBS)
|