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

📄 basicdefinitions.mk

📁 大名鼎鼎的传感器网络仿真实验室平台SENSE
💻 MK
字号:
# Common makefile definitions## Copyright 2005, 2007 - Mark Lisee## This 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 file 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 file; if not, write to the Free Software# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA#BIN_DIR := ../binOBJ_DIR := ../objLIB_DIR := ../lib# Declare the scanner generator and supply the flags and output file#SCAN_GEN = flexSCAN_CFILE = $(SCAN_FILE:%.l=%.c)SFLAGS = -o$(SCAN_CFILE)LEX_ARCHIVE = /usr/lib/libfl.a# Declare the parser generator and supply the flags and output file#PARSE_GEN = yaccPARSE_CFILE = $(PARSE_FILE:%.y=%.c)PARSE_HFILE = $(PARSE_FILE:%.y=%.h)PARSE_FLAGS = -d -o $(PARSE_CFILE)YACC_ARCHIVE = /usr/lib/liby.a#PROFILE_FLAGS = -pg -g -ftest-coverage# Declare the compiler and supply compile the flags#CC = g++CCc = gccINC_FLAGS=$(INC_PATHS:%=-I%)# Flags used on all compilesCOMPILE_FLAGS = -Wall -c $(INC_FLAGS) $(OPTIMIZATION) $(PROFILE_FLAGS) \	$(CCFLAGS) $(DEBUG_FLAGS)# Flags used only for C filesC_FLAGS = # Flags used only for C++ filesCPP_FLAGS =# Flags used only for Objective C filesOBJC_FLAGS =# Declare the linker, supply the link flags and the libraries.#LD = /home/mlisee/temp/usr/local/bin/gccLD = g++# GSL is linked sharedLDSHARED = #-Wl,--rpath -Wl,/usr/local/libLIB_FLAGS = $(LIB_PATHS:%=-L%)LDFLAGS = $(LIB_FLAGS) $(OPTIMIZATION) $(LDSHARED) $(PROFILE_FLAGS)# convert the object names into object filesC_CMN_OBJ_FILES = $(PARSE_FILE:%.y=$(OBJ_DIR)/%.o) $(SCAN_FILE:%.l=$(OBJ_DIR)/%.o)C_CMN_OBJ_FILES += $(C_CMN_OBJS:%=$(OBJ_DIR)/%.o)CPP_CMN_OBJ_FILES = $(CPP_CMN_OBJS:%=$(OBJ_DIR)/%.o)OBJC_CMN_OBJ_FILES = $(OBJC_CMN_OBJS:%=$(OBJ_DIR)/%.o)CMN_OBJ_FILES = $(C_CMN_OBJ_FILES) $(OBJC_CMN_OBJ_FILES) $(CPP_CMN_OBJ_FILES)# convert target names into source file names and object file namesC_TGT_OBJ_FILES = $(C_TARGETS:%=$(OBJ_DIR)/%.o)TARGET_FILES = $(C_TARGETS:%=$(BIN_DIR)/%)CPP_TGT_OBJ_FILES = $(CPP_TARGETS:%=$(OBJ_DIR)/%.o)TARGET_FILES += $(CPP_TARGETS:%=$(BIN_DIR)/%)OBJC_TGT_OBJ_FILES = $(OBJC_TARGETS:%=$(OBJ_DIR)/%.o)TARGET_FILES += $(OBJC_TARGETS:%=$(BIN_DIR)/%)TGT_OBJ_FILES = $(C_TGT_OBJ_FILES) $(CPP_TGT_OBJ_FILES) $(OBJC_TGT_OBJ_FILES)# lists of object files by source languageC_OBJ_FILES = $(C_TGT_OBJ_FILES) $(C_CMN_OBJ_FILES)CPP_OBJ_FILES = $(CPP_TGT_OBJ_FILES) $(CPP_CMN_OBJ_FILES)OBJC_OBJ_FILES = $(OBJC_TGT_OBJ_FILES) $(OBJC_CMN_OBJ_FILES)# list of all object filesOBJ_FILES = $(CMN_OBJ_FILES) $(TGT_OBJ_FILES)DEP_C_FILES = $(C_CMN_OBJ_FILES:%.o=%.d) $(C_TGT_OBJ_FILES:%.o=%.d)DEP_CPP_FILES = $(CPP_CMN_OBJ_FILES:%.o=%.d) $(CPP_TGT_OBJ_FILES:%.o=%.d)DEP_OBJC_FILES = $(OBJC_CMN_OBJ_FILES:%.o=%.d) $(OBJC_TGT_OBJ_FILES:%.o=%.d)DEP_FILES = $(DEP_CPP_FILES) $(DEP_C_FILES) $(DEP_OBJC_FILES)# Include the correct libraries in the link commandLIBS = $(if $(strip $(CPP_OBJ_FILES)), stdc++)LIBS += $(if $(strip $(OBJC_OBJ_FILES)), objc pthread)LIBS += $(DEBUG_LIBS)

⌨️ 快捷键说明

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