📄 makefile
字号:
# Obtain the architectureifndef _ARCH _ARCH := $(shell uname) export _ARCHendif# Compiler definition (per architecture)ifeq ($(_ARCH),Linux) CC = /usr/bin/gcc MEX = /usr/local/bin/mex -DMATLAB -DMATLABDEBUG CFLAGS = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -g -c LFLAGS = -lgsl -lgslcblas -lm -o MLFLAGS = -lgsl -lgslcblas -lmendif# Assumes that libgsl is installed with Fink in /sw/include and /sw/libifeq ($(_ARCH),Darwin) CC = /usr/bin/gcc# MEX = /Applications/MATLAB73/bin/mex -I/sw/include -DMATLAB -DMATLABDEBUG MEX = /Applications/MATLAB73/bin/mex -I/sw/include -DMATLAB CFLAGS = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -g \ -I/sw/include -c -DDARWIN LFLAGS = -L/sw/lib -lgsl -lgslcblas -lm -o MLFLAGS = -L/sw/lib -lgsl -lgslcblas -lmendifDEBUG = -DDEBUG -g# NUMERIC = -ansi -pedantic -W \# -Wmissing-prototypes -Wstrict-prototypes \# -Wconversion -Wshadow \# -Wpointer-arith -Wcast-qual -Wcast-align \# -Wwrite-strings -Wnested-externs \# -fshort-enums -fno-common -Dinline= -O4 \# -Wtraditional# Defining the object filesieee802154a = ieee802154a_parameters.o ieee802154a.oieee802154a_d = $(subst .o,.do,$(ieee802154a))ieee802154a_mex = $(subst .o,.c,$(ieee802154a)).PHONY: clean# Default ruleall: channel_gendebug: channel_gen_dmex: mex_channel# Linking object fileschannel_gen: main.o $(ieee802154a) $(CC) $(LFLAGS) $@ $+channel_gen_d: main.do $(ieee802154a_d) $(CC) $(LFLAGS) $@ $+ mv channel_gen_d channel_genmex_channel: mex_main.c $(ieee802154a_mex) $(MEX) $(MLFLAGS) -argcheck -output $@ $+# Compiling source files# How to build .o files from .c%.o: %.c $(CC) $(NUMERIC) $(CFLAGS) $+%.do: %.c $(CC) $(DEBUG) $(NUMERIC) $(CFLAGS) -o $@ $+# Object file dependencies#main.o:#util.o: #util.h# Clean-up everythingclean: rm -f channel_gen *.o *.do *.mo *.mexmac *.mexglxmrproper: clean rm -f *~
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -