refactor: 移除旧子进程模式的 main.* 源文件,Makefile 只编译 DLL

- 删除 engines/c/main.c, engines/cpp/main.cpp, engines/fortran/main.f90
- Makefile 移除 all/exe 构建目标,默认只编译 DLL
This commit is contained in:
2026-06-21 05:33:52 +08:00
parent 7468a2d458
commit e371fa8db1
6 changed files with 10 additions and 3336 deletions
+3 -9
View File
@@ -1,20 +1,18 @@
# engines/fortran/Makefile
# 编译 DLL(主程序通过 ctypes 直接调用)
FC = gfortran
FFLAGS = -O3 -march=native -Wall -Wextra
SRCS = main.f90
LIB_SRC = dynamics_lib.f90
UNAME_S := $(shell uname -s 2>/dev/null || echo Windows)
ifeq ($(UNAME_S),Windows)
STATIC_FLAGS = -static-libgcc -static-libgfortran -static-libquadmath
STATIC_FLAGS = -static
else
STATIC_FLAGS =
endif
TARGET = build/dynamics_f90.exe
ifeq ($(UNAME_S),Linux)
DLL_TARGET = build/dynamics_f90.so
DLL_FLAGS = -shared -fPIC
@@ -28,14 +26,10 @@ endif
.PHONY: all dll clean
all: $(TARGET)
all: dll
dll: $(DLL_TARGET)
$(TARGET): $(SRCS) | build
$(FC) $(FFLAGS) $(STATIC_FLAGS) -o $@ $(SRCS)
@echo " === Fortran engine built: $@ ==="
$(DLL_TARGET): $(LIB_SRC) | build
$(FC) $(FFLAGS) $(STATIC_FLAGS) $(DLL_FLAGS) -o $@ $(LIB_SRC)
@echo " === Fortran DLL built: $@ ==="