📄 makefile
字号:
# Comment/uncomment the following line to disable/enable debuggingDEBUG = n# Add your debugging flag (or not) to CFLAGSifeq ($(DEBUG),y) DEBFLAGS = -O -g -DDEBUG # "-O" is needed to expand inlineselse DEBFLAGS = -O2 -DNDEBUG endifARCH = -mapcs-32 -march=armv4 -mtune=arm9tdmi -mshort-load-bytes# C -compiler name, can be replaced by another compilerCC = arm-linux-gcc# show the path to compiler, where to find header files and librariesINCFLAGS = -I. # compiler switchesCFLAGS = -Wall $(ARCH) $(DEBFLAGS) $(INCFLAGS)
MPEG4LIB = lib/libmx21mp4enc.a
find_files = $(wildcard $(dir)/*.c)DIRS := .# list of used sourcefilesSRCS := $(foreach dir,$(DIRS),$(find_files))# object files will be generated from .c sourcefilesOBJS = $(SRCS:.c=.o)# MACRO for cleaning object -filesRM = rm -f#Here are rules for building codes and generating object library.all: .depend mp4test @echo ------------------------------ @echo Testbench is ready! @echo ------------------------------mp4test: $(OBJS) $(MPEG4LIB) $(LIBS) $(CC) $(CFLAGS) $(OBJS) $(MPEG4LIB) -lpthread -o mp4_enc
depend .depend dep: @echo @echo ------------------------------ @echo Updating dependencies! @echo ------------------------------ @echo $(CC) $(CFLAGS) -M $(SRCS) > .depend.PHONY: cleanclean: $(foreach dir,$(DIRS),$(RM) $(dir)/*.o $(dir)/*~ ) $(RM) .depend mp4_encifeq (.depend, $(wildcard .depend))include .dependendif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -