makefile
来自「freemodbus-v1-1-1-0.zip v1.1.1版本的代码 支持多」· 代码 · 共 68 行
TXT
68 行
################################################################################ Makefile for the BARE project################################################################################# General FlagsPROJECT = demoTARGET = demoCC=gccOBJCOPY=/cygdrive/c/WinAVR/bin/avr-objcopy## Options common to compile, link and assembly rulesCOMMON =## Compile options common for all C compilation units.CFLAGS = $(COMMON) \ -Iport -I. \ -I../../modbus/rtu -I../../modbus/ascii -I../../modbus/include CFLAGS += -Wall -gstabs -Os -Wall -Wstrict-prototypesCFLAGS += -Wp,-M,-MP,-MT,$(*F).o,-MF,dep/$(@F).d ## Assembly specific flagsASMFLAGS = $(COMMON)ASMFLAGS += -x assembler-with-cpp -Wa,-gstabs## Linker flagsLDFLAGS = $(COMMON)LDFLAGS += -Wl,-Map=$(TARGET).map,--cref## Objects that must be built in order to linkOBJECTS = demo.oMBPORTOBJECTS = port/portserial.o \ port/portevent.o \ port/porttimer.oMBOBJECTS = ../../modbus/mb.o \ ../../modbus/rtu/mbrtu.o \ ../../modbus/rtu/mbcrc.o \ ../../modbus/ascii/mbascii.o \ ../../modbus/functions/mbfunccoils.o \ ../../modbus/functions/mbfuncdiag.o \ ../../modbus/functions/mbfuncholding.o \ ../../modbus/functions/mbfuncinput.o \ ../../modbus/functions/mbfuncother.o \ ../../modbus/functions/mbfuncdisc.o \ ../../modbus/functions/mbutils.o ## Buildall: $(TARGET).elf ## Compiledemo.o: demo.c $(CC) $(INCLUDES) $(CFLAGS) -c $<##Link$(TARGET).elf: $(OBJECTS) $(MBOBJECTS) $(MBPORTOBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) $(MBPORTOBJECTS) $(MBOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET).elf## Clean target.PHONY: cleanclean: -rm -rf $(OBJECTS) $(MBOBJECTS) $(MBPORTOBJECTS) $(TARGET).elf $(TARGET).map## Other dependencies-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?