added forced target

This commit is contained in:
2026-01-10 01:38:06 +02:00
parent f4cc90fa25
commit 8f022da4ef
4 changed files with 129 additions and 89 deletions

View File

@@ -8,11 +8,14 @@ TIER2_OBJS := $(TIER2_FILES:.cpp=.o)
FPC_FILES := library/helper.cpp library/target.cpp library/builder.cpp library/runner.cpp library/c.cpp library/ld.cpp library/clang/c.cpp library/clang/ld.cpp
CC = clang
ifeq ($(TARGET),)
REAL_TARGET :=
ifneq ($(FPC_ARCH),)
ifneq ($(FPC_OS),)
ifneq ($(FPC_ABI),)
REAL_TARGET := -target $(FPC_ARCH)-$(FPC_OS)-$(FPC_ABI) -DFPC_ARCH=\"$(FPC_ARCH)\" -DFPC_OS=\"$(FPC_OS)\" -DFPC_ABI=\"$(FPC_ABI)\"
else
REAL_TARGET := -target $(TARGET)
REAL_TARGET := -target $(FPC_ARCH)-$(FPC_OS) -DFPC_ARCH=\"$(FPC_ARCH)\" -DFPC_OS=\"$(FPC_OS)\"
endif
endif
endif
CCFLAGS = $(REAL_TARGET) -g -I../public -Ipublic