makefile

来自「LPC2148 Demo compiled with winarm includ」· 代码 · 共 26 行

TXT
26
字号
SRC_FILES=port.c portISR.c

#
# Define all object files.
#
ARM_OBJ = $(SRC_FILES:.c=.o)

.PHONY: all
all: $(ARM_OBJ)

$(ARM_OBJ) : %.o : %.c Makefile .depend
	$(CC) -c $(CFLAGS) $< -o $@
	$(AR) r $(COMMON)/common.a $@

#
#  The .depend files contains the list of header files that the
#  various source files depend on.  By doing this, we'll only
#  rebuild the .o's that are affected by header files changing.
#
.depend:
			$(CC) $(CFLAGS) -M $(SRC_FILES) > .depend

ifeq (.depend,$(wildcard .depend))
include .depend
endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?