一句话 makefile

事实证明网上的 makfile 都不简单,费话不多说上代码。
#!/bin/sh
TARGET = segmenter.exe
CC = gcc
INCLUDE = -I../include
LIB = -L ../lib -lavformat -lavcodec -lavutil -lws2_32
CFLAGS = -O2 -Wall


SOURCE = \
	segmenter.c
	
all:$(TARGET)
clean:
	@-rm -f $(TARGET)
$(TARGET):$(SOURCE)
	@$(CC)  $(CFLAGS) -o $@ $^ $(INCLUDE) $(LIB)
# @->TARGET ^->source


你可能感兴趣的:(include,makefile)