#MinGW 5.1.6 .PHONY:clean tidy rebuild SRCDIR = src LIBDIR = lib DOCSDIR = docs BUILDDIR = build CC = C:\MinGW\bin\g++.exe SRCEXT = cpp DEPEXT = depend RM = del /f /q MKDIR = mkdir RMDIR = rmdir /q /s FLAGS = -g -Wall -O3 #-save-temps #-fdump-class-hierarchy #-dump_class_hierarchy LIBPATHS = -L"C:\MingW\lib" -L"${LIBDIR}" LIBS = #-lopengl32 #-mwindows SRCT = *.${SRCEXT} SRCS += ${SRCT} SRCS += */${SRCT} SRCS += */*/${SRCT} SRCS += */*/*/${SRCT} SRCS += */*/*/*/${SRCT} SRCS += */*/*/*/*/${SRCT} SRC = ${wildcard ${addprefix ${SRCDIR}/,${SRCS}}} OBJ = ${patsubst ${SRCDIR}/%.${SRCEXT},${BUILDDIR}/%.o,${SRC}} DEP = ${patsubst ${SRCDIR}/%.${SRCEXT},${BUILDDIR}/%.${DEPEXT},${SRC}} BIN = ${BUILDDIR}/${notdir ${CURDIR}.exe} build: ${BIN} rebuild: tidy build ${BIN}: ${OBJ} @echo make target: ${BIN} @${C
MinGW 比较通用的Makefile
最新推荐文章于 2024-05-11 16:19:20 发布
本文详细介绍了如何在MinGW环境下编写和使用通用的Makefile,包括编译规则、依赖管理和目标设置等方面,帮助开发者高效组织C/C++项目。
摘要由CSDN通过智能技术生成