아래는 내 메이크 메이크를 통해 일부 줄 바꿈입니다 :출력이
: 디렉토리에 위의 플래그와 몇 개의 파일로TARGET = prog
LIBS = -lm
CC = gcc
CFLAGS = -pthread -Wextra -Wall -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wwrite-strings -Waggregate-return -Wcast-qual -Wswitch-default -Wswitch-enum -Wconversion -Wunreachable-code
.PHONY: clean all default
default: $(TARGET) clean
all: default
OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c))
HEADERS = $(wildcard *.h)
%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c $< -o [email protected]
.PRECIOUS: $(TARGET) $(OBJECTS)
$(TARGET): $(OBJECTS)
$(CC) $(OBJECTS) -Wall $(LIBS) -o [email protected]
clean:
-rm -f *.o
, 출력은 매우 어려운 경고를 찾을 수 있습니다
GCC을 호출 할 때마다 줄 바꿈을 어떻게 할 수 있습니까? 어쩌면 경고가 좀 더 돋보일 수 있을까요?
'@echo Compiling $ <; @ $ (CC) $ (CFLAGS) -c $ <-o $ @;'? – user657267
@ user657267 로그인하여 신용을 얻을 수 있도록 답변 해주십시오. 그게 내가 찾은 가장 깨끗하고 간단한 대답이야, 고마워. – 8protons