当前位置: 技术问答>linux和unix
Makefile移植问题!请大家帮忙看看!
来源: 互联网 发布时间:2016-07-15
本文导语: 本帖最后由 jianzhibeihang 于 2009-11-13 21:08:25 编辑 一个windows下面的makefile,我想要把他移植到linux下,请大家帮忙看看怎么移植? 其实主要的问题是windows和linux文件路径的表示方法不一样,所以我打算把字符都转成/字...
其实主要的问题是windows和linux文件路径的表示方法不一样,所以我打算把字符都转成/字符
windows下面这种....转成linux下面是不是:../../ 呢?请大家指教!!多谢了!!!
makefile文件部分内容:
# $Id:$
#*************************************************************************
# Copyright (c) 1999-2007, AdventNet Inc., All rights reserved.
#
# File Name : Makefile
#
# Purpose : To compile the generated agent source code.
#
# Author : AdventNet Agent Toolkit C Edition 6
#
# Date : Fri Nov 13 17:56:23 CST 2009
#
#*************************************************************************
# ------------- Directory path for source files -------------
SRC_DIR=src
# ------------- Directory Path for header files -------------
MIB_HDR_DIR=include
SYSTEM_HDR_DIR=....sourcesysteminclude
SNMP_HDR_DIR=....sourceprotocolssnmpinclude
CMU_HDR_DIR=....sourceprotocolssnmpincludecmu
ACL_HDR_DIR=....sourceprotocolssnmpincludeacl
SNMPV3_HDR_DIR=....sourceprotocolssnmpincludesnmpv3
SNMPV3_SEC_HDR_DIR=....sourceprotocolssnmpincludesnmpv3security
ACL_HDR_DIR=....sourceprotocolssnmpincludeacl
UTILS_HDR_DIR=....sourceutilsinclude
MAIN_HDR_DIR=....sourcemaininclude
NSCRTVROOT_HDR_DIR=..nscrtv-rootinclude
# ------------- Directory Path for library files -------------
LIB_DIR=lib
# ------------- Directory Path for object files -------------
OBJ_DIR=objs
# ------------- Directory Path for binary files -------------
BIN_DIR=bin
# ------------- Include directories -------------------
INC= -I$(MAIN_HDR_DIR) -I$(SNMP_HDR_DIR) -I$(CMU_HDR_DIR) -I$(SYSTEM_HDR_DIR) -I$(MIB_HDR_DIR) -I$(UTILS_HDR_DIR) -I$(ACL_HDR_DIR) -I$(SNMPV3_HDR_DIR) -I$(SNMPV3_SEC_HDR_DIR) -I$(NSCRTVROOT_HDR_DIR)
# ------------- Other Included Libraries -------------------
OTHER_INC=Wsock32.lib libcmt.lib /NODEFAULTLIB:libc.lib
# ------------- Compiler to compile source files ------------
COMPILER=cl.exe
# ------------- Compiler options -------------
COMP_OPT=-c -Ze -Zi /Fo$@
# ------------- Agent options -------------
SRC_OPT=-DWINDOWS
# ----------- Library utility to create library ---------
LIB_NAME=lib.exe
# -------------- Library utility Options -------------
LIB_OPT=/OUT:
# ------------- Library file extension -------------
LIB_EXT=lib
# ------------- Object file extension -------------
OBJ_EXT=obj
# ------------- Command to delete file(s) -------------
DEL=del
# ------------- Command to display file(s) -------------
DIR=dir
# ------------- Module header files -------------
MIB_HDRS= $(MIB_HDR_DIR)oamoperation.h
$(MIB_HDR_DIR)vlanidadddeltable.h //这个是在这用来换行还是,如何解决这个问题?
$(MIB_HDR_DIR)vlanidsubtable.h
$(MIB_HDR_DIR)accessl2.h
$(MIB_HDR_DIR)qos.h
$(MIB_HDR_DIR)dba.h
$(MIB_HDR_DIR)mac.h
$(MIB_HDR_DIR)cnumanage.h
$(MIB_HDR_DIR)exceptioninfo.h
$(MIB_HDR_DIR)llid.h
$(MIB_HDR_DIR)link.h
$(MIB_HDR_DIR)para.h
$(MIB_HDR_DIR)recvorsendcont.h
$(MIB_HDR_DIR)eocphycounter.h
$(MIB_HDR_DIR)grpcastscb.h
$(MIB_HDR_DIR)vlan.h
$(MIB_HDR_DIR)classify.h
$(MIB_HDR_DIR)stream.h
$(MIB_HDR_DIR)arltable.h
$(MIB_HDR_DIR)cont.h
$(MIB_HDR_DIR)externaldevice.h
$(MIB_HDR_DIR)version.h
$(MIB_HDR_DIR)regoperation.h
$(MIB_HDR_DIR)system.h
$(MAIN_HDR_DIR)deprecate.h
$(SYSTEM_HDR_DIR)config.h
Makefile
|
>COMPILER=cl.exe
>COMP_OPT=-c -Ze -Zi /Fo$@
>OTHER_INC=Wsock32.lib libcmt.lib /NODEFAULTLIB:libc.lib
>COMP_OPT=-c -Ze -Zi /Fo$@
都要改
>COMP_OPT=-c -Ze -Zi /Fo$@
>OTHER_INC=Wsock32.lib libcmt.lib /NODEFAULTLIB:libc.lib
>COMP_OPT=-c -Ze -Zi /Fo$@
都要改
|
.... 这些都改成 ../../
行尾的 确实是代表换行的,不用改。