⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 linux下的CAN BUS驱动代码。适合在arm平台使用。
💻
字号:
#****************************************************************************# Copyright (C) 2001-2006  PEAK System-Technik GmbH## linux@peak-system.com# www.peak-system.com## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.## Maintainer(s): Klaus Hitschler (klaus.hitschler@gmx.de)#****************************************************************************#****************************************************************************## Makefile - Makefile for receivetest and transmittest programs## $Id: Makefile 518 2007-08-08 07:40:31Z edouard $##****************************************************************************SRC     = srcINC     = -I. -I../lib -I../driverRT      = NO_RTifeq ($(RT), XENOMAI)SKIN = xeno### Xenomai directory, xeno-config and library directory ###########RT_DIR          ?= /usr/xenomaiRT_CONFIG       ?= $(RT_DIR)/bin/xeno-configRT_LIB_DIR      ?= $(shell $(RT_CONFIG) --library-dir) -Wl,-rpath $(shell $(RT_CONFIG) --library-dir)### User space application compile options #########################USERAPP_LIBS      ?= -lnative -lpcanUSERAPP_LDFLAGS   ?= $(shell $(RT_CONFIG) --$(SKIN)-ldflags) -L$(RT_LIB_DIR)USERAPP_CFLAGS    ?= $(shell $(RT_CONFIG) --$(SKIN)-cflags)endififeq ($(RT), RTAI)SKIN = lxrt### Rtai directory, rtai-config and library directory ###########RT_DIR          ?= /usr/realtimeRT_CONFIG       ?= $(RT_DIR)/bin/rtai-configRT_LIB_DIR      ?= $(shell $(RT_CONFIG) --library-dir) -Wl,-rpath $(shell $(RT_CONFIG) --library-dir)### User space application compile options #########################USERAPP_LIBS      ?= -llxrt -lpcanUSERAPP_LDFLAGS   ?= $(shell $(RT_CONFIG) --$(SKIN)-ldflags) -L$(RT_LIB_DIR)USERAPP_CFLAGS    ?= $(shell $(RT_CONFIG) --$(SKIN)-cflags)endififeq ($(RT), NO_RT)  USERAPP_LIBS = -lpcanendififeq ($(HOSTTYPE),x86_64)  LDLIBS  = -L../lib -L/lib64 -L/usr/lib64 -L/usr/local/lib64else  LDLIBS  = -L../lib -L/lib -L/usr/lib -L/usr/local/libendififneq ($(RT), NO_RT)DBGFLAGS   =elseDBGFLAGS   = -gendififeq ($(DBG), DEBUG)CFLAGS  = $(DBGFLAGS) $(INC) $(LDLIBS)elseCFLAGS  = $(INC) $(LDLIBS)endifTARGET1 = receivetestFILES1  = $(SRC)/$(TARGET1).c $(SRC)/common.cTARGET2 = transmitestFILES2  = $(SRC)/$(TARGET2).cpp $(SRC)/common.c $(SRC)/parser.cppTARGET3 = bitratetestFILES3  = $(SRC)/$(TARGET3).c $(SRC)/common.cTARGET4 = filtertestFILES4  = $(SRC)/$(TARGET4).cpp $(SRC)/common.call:    $(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4)$(TARGET1): $(FILES1)	$(CC) $(FILES1) $(CFLAGS) -o $(TARGET1) $(USERAPP_CFLAGS) $(USERAPP_LDFLAGS) $(USERAPP_LIBS) -D$(RT)$(TARGET2): $(FILES2)	$(CC) $(FILES2) $(CFLAGS) -o $(TARGET2) $(USERAPP_CFLAGS) $(USERAPP_LDFLAGS) $(USERAPP_LIBS) -lstdc++ -D$(RT)	$(TARGET3): $(FILES3)	$(CC) $(FILES3) $(CFLAGS) -o $(TARGET3) $(USERAPP_CFLAGS) $(USERAPP_LDFLAGS) $(USERAPP_LIBS) -D$(RT)$(TARGET4): $(FILES4)	$(CC) $(FILES4) $(CFLAGS) -o $(TARGET4) $(USERAPP_CFLAGS) $(USERAPP_LDFLAGS) $(USERAPP_LIBS) -lstdc++ -D$(RT)	clean:	rm -f $(SRC)/*~ $(SRC)/*.o *~ $(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4)	install:	cp $(TARGET1) /usr/local/bin	cp $(TARGET2) /usr/local/bin	cp $(TARGET3) /usr/local/bin	cp $(TARGET4) /usr/local/bin

⌨️ 快捷键说明

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