📄 makefile
字号:
#****************************************************************************# Copyright (C) 2001-2007 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 the shared library libpcan.so.x.x## $Id: Makefile 517 2007-07-09 09:40:42Z edouard $##****************************************************************************SRC = srcINC = -I. -I../driverFILES = $(SRC)/libpcan.cDBG = -gRT = NO_RTifeq ($(RT), XENOMAI)#****************************************************************************# Define flags for XENOMAI installation only#USB = NO_USB_SUPPORTPCC = NO_PCCARD_SUPPORTINC = -I. -I../driver -I/usr/xenomai/includeSKIN = xenoRT_DIR ?= /usr/xenomaiRT_CONFIG ?= $(RT_DIR)/bin/xeno-configRT_LIB_DIR ?= $(shell $(RT_CONFIG) --library-dir) -Wl,-rpath $(shell $(RT_CONFIG) --library-dir)RT_CFLAGS ?= $(shell $(RT_CONFIG) --$(SKIN)-cflags)endififeq ($(RT), RTAI)#****************************************************************************# Define flags for RTAI installation only#USB = NO_USB_SUPPORTPCC = NO_PCCARD_SUPPORTINC = -I. -I../driver -I/usr/realtime/includeSKIN = lxrtRT_DIR ?= /usr/realtimeRT_CONFIG ?= $(RT_DIR)/bin/rtai-configRT_LIB_DIR ?= $(shell $(RT_CONFIG) --library-dir) -Wl,-rpath $(shell $(RT_CONFIG) --library-dir)RT_CFLAGS ?= $(shell $(RT_CONFIG) --$(SKIN)-cflags)endififeq ($(HOSTTYPE),x86_64) LIBPATH = /usr/lib64else LIBPATH = /usr/libendifLDNAME = libpcan.soSONAME = $(LDNAME).0TARGET = $(SONAME).6ifneq ($(RT), NO_RT) CFLAGS = -fPIC -shared -O2 -Wall -Wl,-soname,$(SONAME) -lc $(INC) -D$(RT) $(RT_CFLAGS) -L$(RT_LIB_DIR) -lrtdmelse CFLAGS = -fPIC -shared -O2 -Wall -Wl,-soname,$(SONAME) -lc $(INC) -D$(RT)endifall: $(TARGET)$(TARGET) : $(FILES) # ln -sf ../driver/pcan.h pcan.h $(CC) $(FILES) $(CFLAGS) -o $(TARGET) ln -sf $(TARGET) $(LDNAME)clean: rm -f $(SRC)/*~ $(SRC)/*.o *~ *.so.*#********** this entry is reserved for root access only *********************install: cp $(TARGET) $(LIBPATH)/$(TARGET) ln -sf $(LIBPATH)/$(TARGET) $(LIBPATH)/$(SONAME) ln -sf $(LIBPATH)/$(SONAME) $(LIBPATH)/$(LDNAME) cp libpcan.h /usr/include/libpcan.h chmod 644 /usr/include/libpcan.h /sbin/ldconfig
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -