1 Star 0 Fork 0

冷心为王/sfSnakePro

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
CC=gcc
CXX=g++
CC_FLAGS=-g -static -Wall -DSFML_STATIC #-Wl,--stack=268435456
CXX_FLAGS=-g -static -std=c++17 -Wall -O2 -DSFML_STATIC #-Wl,--stack=268435456
rm=rm -fr
mkdir=mkdir2 -p
TARGET=sfSnakePro
BUILD_DIR=build
SRC_DIR= src src/screen src/element
SRCS = $(foreach dir, $(SRC_DIR), $(wildcard $(dir)/*.cpp))
# $(foreach dir, $(SRC_DIR), $(wildcard $(dir)/*.c*))
# $(wildcard $(SRC_DIR)/*.c*)
# moveonly_test.cpp add.c
# OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
OBJS = $(addprefix $(BUILD_DIR)/, $(addsuffix .o, $(basename $(SRCS))))
DEPS = $(OBJS:.o=.d)
INC_DIR = ./src c:/sfml-static/include
LIB_DIR = c:/sfml-static/lib
LIBS = sfml-main sfml-audio-s sfml-graphics-s sfml-network-s sfml-window-s sfml-system-s freetype openal32 flac vorbisenc vorbisfile vorbis ogg winmm gdi32 opengl32 ws2_32
INC_FLAGS = $(addprefix -I,$(INC_DIR))
LIB_FLAGS = $(addprefix -L,$(LIB_DIR)) $(addprefix -l,$(LIBS))
LD_FLAGS =
all: $(TARGET)
.PHONY: clean
$(TARGET): $(OBJS)
$(CXX) $(CXX_FLAGS) $(OBJS) -o $@ $(LD_FLAGS) $(LIB_FLAGS)
$(BUILD_DIR)/%.o: %.cpp
@$(mkdir) $(dir $@)
$(CXX) $(CXX_FLAGS) $(INC_FLAGS) -c $< -o $@
$(BUILD_DIR)/%.o: %.c
@$(mkdir) $(dir $@)
$(CC) $(CC_FLAGS) $(INC_FLAGS) -c $< -o $@
clean:
@$(rm) $(BUILD_DIR)
@$(rm) $(TARGET).exe
@echo $(OBJS)
-include $(DEPS)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xue12/sfSnakePro.git
git@gitee.com:xue12/sfSnakePro.git
xue12
sfSnakePro
sfSnakePro
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385