Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
试图makefile将所有 .c 转换为目录中的执行文件。例如:
makefile
am.c 2.c s.c
进入
am 2 s
程式。
一切正常,但它使用cc,但我想使用gcc编译器。我怎样才能做到这一点?
cc
gcc
SRC = $(wildcard *.c) BIN = $(patsubst %.c,%,$(SRC)) all : $(BIN)
在顶部添加一行说
CC = gcc