Files
hasherezade-tiny_tracer/makefile.rules
T
2026-05-23 21:08:50 +02:00

71 lines
2.3 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.
#
##############################################################
# TinyTracer-specific configuration to generate proper DLL name.
ifeq ($(TARGET),intel64)
BITNESS := 64
else
BITNESS := 32
endif
##############################################################
#
# Windows SDK (needed for PIN 4.x clang-cl builds)
#
##############################################################
ifeq ($(OS),Windows_NT)
-include sdk_lib.mk
ifdef WINDOWS_SDK_KERNEL32
TOOL_LIBS += $(WINDOWS_SDK_KERNEL32)
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
# Auto-generate SDK lib path on Windows if missing
ifeq ($(OS),Windows_NT)
sdk_lib.mk: find_sdk_win.sh
bash find_sdk_win.sh
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)