makefile

来自「freemodbus-v1-1-1-0.zip v1.1.1版本的代码 支持多」· 代码 · 共 81 行

TXT
81
字号
## FreeModbus Linux PORT - Makefile## Copyright (c) 2006 Christian Walter, © s::can, Vienna 2006.## ---------------------------------------------------------------------------# ---------------------------------------------------------------------------# platform dependencies# ---------------------------------------------------------------------------ifneq ($(strip $(shell gcc -v 2>&1 |grep "cygwin")),)	CYGWIN_BUILD = YESendifCC	    = gccCXX	    = g++OBJCOPY	    = objcopyINSIGHT     = /opt/insight-x86/bin/insight# ---------------------------------------------------------------------------# project specifics# ---------------------------------------------------------------------------CFLAGS	    = -MD -g3 -Wall -Iport -I../../modbus/rtu \		-I../../modbus/ascii -I../../modbus/include LDFLAGS     =ifeq ($(CYGWIN_BUILD),YES)elseLDFLAGS     += -lpthreadCFLAGS      += -pthreadendifTGT         = demoOTHER_CSRC  = OTHER_ASRC  = CSRC        = demo.c port/portserial.c port/portother.c \              port/portevent.c port/porttimer.c \              ../../modbus/mb.c \              ../../modbus/rtu/mbrtu.c ../../modbus/rtu/mbcrc.c \			  ../../modbus/ascii/mbascii.c \              ../../modbus/functions/mbfunccoils.c \              ../../modbus/functions/mbfuncdiag.c \              ../../modbus/functions/mbfuncholding.c \              ../../modbus/functions/mbfuncinput.c \              ../../modbus/functions/mbfuncother.c \              ../../modbus/functions/mbfuncdisc.c \              ../../modbus/functions/mbutils.c ASRC        = OBJS        = $(CSRC:.c=.o) $(ASRC:.S=.o)NOLINK_OBJS = $(OTHER_CSRC:.c=.o) $(OTHER_ASRC:.S=.o)DEPS        = $(OBJS:.o=.d) $(NOLINK_OBJS:.o=.d)BIN         = $(TGT).PHONY: clean allall: $(BIN)debug:	$(INSIGHT) --se=$(TGT)$(BIN): $(OBJS) $(NOLINK_OBJS)	$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@clean:	rm -f $(DEPS)	rm -f $(OBJS) $(NOLINK_OBJS)	rm -f $(BIN)# ---------------------------------------------------------------------------# rules for code generation# ---------------------------------------------------------------------------%.o:    %.c	$(CC) $(CFLAGS) -o $@ -c $<%.o:    %.S	$(CC) $(ASFLAGS) -o $@ -c $<# ---------------------------------------------------------------------------#  # compiler generated dependencies# ----------------------------------------------------------------------------include $(LWOS_DEPS) $(PORT_DEPS) $(APPL_DEPS)

⌨️ 快捷键说明

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