3 Star 1 Fork 1

Gitee 极速下载/biosim4

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/davidrmiller/biosim4
克隆/下载
Makefile 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
David R. Miller 提交于 2022-07-30 22:32 . Simplified makefile (#72)
ifneq ($(BUILD),debug)
BUILD = release
endif
CXX = c++
LD = c++
CXXFLAGS += \
-Wall \
-pedantic \
-std=c++17 \
-fexceptions \
-fopenmp \
$(shell pkg-config --cflags opencv4)
LDFLAGS += \
-lopencv_core \
-lopencv_video \
-lopencv_videoio \
-lgomp \
-lpthread \
-fopenmp
ifeq ($(BUILD),debug)
OUT_DIR = bin/Debug/
OBJ_DIR = obj/Debug/src
CXXFLAGS += -g
else
OUT_DIR = bin/Release/
OBJ_DIR = obj/Release/src
CXXFLAGS += -O3
LDFLAGS += -O3 -s
endif
SOURCE := $(wildcard src/*.cpp src/*.h)
CXXSOURCE := $(filter %.cpp, $(SOURCE))
HEADERS := $(filter %.h, $(SOURCE))
OBJS := $(subst src/,$(OBJ_DIR)/, $(CXXSOURCE:.cpp=.o))
all: debug release
before_debug:
test -d bin/Debug || mkdir -p bin/Debug
test -d obj/Debug/src || mkdir -p obj/Debug/src
before_release:
test -d bin/Release || mkdir -p bin/Release
test -d obj/Release/src || mkdir -p obj/Release/src
.PHONY : release debug
debug: before_debug
@$(MAKE) --no-print-directory bin/Debug/biosim4 BUILD=$@
release: before_release
@$(MAKE) --no-print-directory bin/Release/biosim4 BUILD=$@
$(OUT_DIR)biosim4: $(OBJS)
$(LD) -o $@ $^ $(LDFLAGS)
$(OBJS): $(HEADERS)
$(OBJ_DIR)%.o : src%.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
clean: clean_debug clean_release
clean_debug:
$(RM) -f obj/Debug/src/*
$(RM) -f bin/Debug/biosim4
clean_release:
$(RM) -f obj/Release/src/*
$(RM) -f bin/Release/biosim4
distclean: clean
$(RM) -f logs/* images/*
.PHONY: all clean distclean
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/biosim4.git
git@gitee.com:mirrors/biosim4.git
mirrors
biosim4
biosim4
main

搜索帮助