makefile
来自「一个UWB仿真程序包」· 代码 · 共 57 行
TXT
57 行
# Compiler definitionCC = gccCFLAGS = -Wall -g -cLFLAGS = -lm -g -o#CFLAGS = -Wall -O2 -c#LFLAGS = -lm -o# Obtain the architectureifndef _ARCH _ARCH := $(shell uname) export _ARCHendif# Matlab compiler definitionifeq ($(_ARCH),Linux) MEX = /usr/local/bin/mexendififeq ($(_ARCH),Darwin)# MEX = /Applications/MATLAB73/bin/mex -DMATLABDEBUG MEX = /Applications/MATLAB73/bin/mexendif# Defining the object filesobjects = lfsr.o.PHONY: clean# Default ruleall: scrambler mex_scramblermex: mex_scrambler# Linking object filesscrambler: main.o $(objects) $(CC) $(LFLAGS) $@ $+mex_scrambler: mex_scrambler.c $(MEX) $+# Compiling source files# How to build .o files from .c%.o: %.c $(CC) $(CFLAGS) $+# Object file dependenciesmain.o:lfsr.o:# Clean-up everythingclean: rm -f scrambler *.o \ mex_scrambler.{mexmac,mexglx}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?