LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1020|回复: 4

这个makefile 怎么改成在 arm 的 ?

[复制链接]
发表于 2006-7-2 21:28:26 | 显示全部楼层 |阅读模式
程序是用qt 写的
在linux 下编译通过了 (当然包含了几个库也编译过了的)
想把他改成 arm 上运行的  
用 tmake 生成的不管用,修改的话,应该怎么修改讷 ?
我的环境变量已经设置正确 ,编译其他东西没有问题
求高人相助


######################################

PROG            = cphone

SOURCES         :=  \
                 addressbookSub.cxx \
                 audiopropertiesSub.cxx \
                 callanswerSub.cxx \
                 cpendpoint.cxx \
                 main.cxx \
                 mainwindowSub.cxx \
                 message.cxx \
                 options.cxx \
                 precompile.cxx \
                 qtvid.cxx \
                 settingsSub.cxx \
                 vdisplay.cxx \
                 videopropertiesSub.cxx

UIFILES         := \
                 addressbook.ui \
                 audioproperties.ui \
                 callanswer.ui \
                 mainwindow.ui \
                 settings.ui \
                 videoproperties.ui

MOCFILES        := \
                 vdisplay.h


#                 message.h \




##################################################

ifndef QTDIR
ifneq (,$(wildcard /usr/local/qt))
QTDIR=/usr/local/qt
else
ifneq (,$(wildcard /usr/lib/qt3))
QTDIR=/usr/lib/qt3
else
ifneq (,$(wildcard ~/qt))
QTDIR=~/qt
else
ifneq (,$(wildcard ../qt))
QTDIR=../qt
else
ifneq (,$(wildcard /usr/X11R6/include/qapplication.h))
QTDIR=/usr/X11R6
endif
endif
endif
endif
endif
endif

ifndef XLIBDIR
XLIBDIR=/usr/X11R6/lib
endif
ifndef QTLIBDIR
QTLIBDIR=$(QTDIR)/lib
endif


UIC             = $(QTDIR)/bin/uic
MOC             = $(QTDIR)/bin/moc

STDCCFLAGS      += -I$(QTDIR)/include -DQT_THREAD_SUPPORT
LDFLAGS         += -L$(QTLIBDIR) -L$(XLIBDIR)
ENDLDLIBS       += -lqt-mt -lSM -lICE -lXext -lX11
ifeq ($(OSTYPE),linux)
ENDLDLIBS       += -ldl
endif

UISRC           := $(patsubst %.ui,%.cxx,$(UIFILES))
UIHDRS          := $(patsubst %.ui,%.h,$(UIFILES))

MOCFILES        += $(UIHDRS)
MOCSRCRAW       := $(addprefix moc_, $(MOCFILES))
MOCSRC          := $(patsubst %.h,%.cxx,$(MOCSRCRAW))


SOURCES         += $(MOCSRC) $(UISRC)


##################################################

ifndef OPENH323DIR
OPENH323DIR=$(HOME)/openh323
endif


include $(OPENH323DIR)/openh323u.mak

##################################################

%.cxx %.h : %.ui
        $(UIC) -impl $*.h $*.ui > $*.cxx
        $(UIC) $*.ui > $*.h

moc_%.cxx: %.h
        $(MOC) -f$*.h -o $@ < $*.h


.PRECIOUS: $(UIHDRS) $(MOCSRC)

clean::
        rm -f $(UISRC) $(UIHDRS) $(MOCSRC)


main.cxx : mainwindow.h

addressbookSub.cxx : addressbook.h mainwindow.h callanswer.h

audiopropertiesSub.cxx : audioproperties.h mainwindow.h

callanswerSub.cxx : callanswer.h mainwindow.h

mainwindowSub.cxx : $(UIHDRS)

options.cxx : mainwindow.h

settingsSub.cxx : settings.h mainwindow.h

videopropertiesSub.cxx : videoproperties.h mainwindow.h

# End of File ####################################
 楼主| 发表于 2006-7-3 14:57:42 | 显示全部楼层

怎么

有人看 没人回哦 ~~~
回复 支持 反对

使用道具 举报

发表于 2006-7-3 22:29:52 | 显示全部楼层
主要是你的编译器换成开发包下的编译器(形如arm-linux-g++),用-I显式指定你的头文件搜索路径为你开发包内核include目录(一般为$(BASEDIR)/linux/include),用-L显式指定你lib文件的搜索路径,当然你要确保你的那些lib文件也是用你的arm编译链生成的。
另外不同的平台可能还有一些他们特殊的编译选项,这个就因平台而异了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-4 15:11:42 | 显示全部楼层
谢谢
那 我的编译器要指定吗?
现在默认的是g++
我怎么改成arm-linux-g++ 呢 ?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-6 14:45:19 | 显示全部楼层
还有没有人能帮帮我`~~
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表