软件生手的问题:手头的代码是Linux的版本,想向Windows 移植,主要是把Makefile写成VC++格式的,然后修改一些代码,怎么改写Makefile,我自己尝试的都不成功,请大侠指点迷津!或者在哪里能找到这个问题的论述!谢谢大家!
代码一、系统框架的Makefile
! include $(SRC)\host.mak
LSRC = $(SRC)
#includes: FORCE
# $(MAKE) -f $(LSRC)/tmman/Makefile includes
# first tmman for dll dependencies
target: FORCE
# -$(MKDIR) host_comm tmman
cd tmman
$(MAKE) -f $(LSRC)/tmman/Makefile target
(cd host_comm; $(MAKE) -f $(LSRC)/host_comm/Makefile target)
host: FORCE
# -$(MKDIR) dvd host_comm tmman
(cd dvd ; $(MAKE) -f $(LSRC)/dvd/Makefile host)
(cd host_comm; $(MAKE) -f $(LSRC)/host_comm/Makefile host)
(cd tmman ; $(MAKE) -f $(LSRC)/tmman/Makefile host)
FORCE:
代码二、C程序的Makefile
############################################################################
#
#
# AUTHOR Tilakraj Roy @ Philips Semiconductors
###########################################################################
! include $(SRC)\host\WinNT\host.mak
###############################################################################
MODULE = tmcrt
EXT = dll
CFLAGS = -W3 -Zp4 -c -Od -Ze -Gs -MD
CINCS = -I$(LSRC) \
-I$(LSRC)\..\..\include \
-I$(LSRC)\..\include \
-I$(SDK)\vc\include \
-I$(TCS)\include\tmlib \
-I$(TCS)\include\WinNT \
-I$(TCS)\include\tm1
#CDEFS = -DWIN32 -Di386 -D_X86_ -DTMMAN_HOST -DUSE_DVD
CDEFS = -DWIN32 -Di386 -D_X86_ -DTMMAN_HOST
LIBS = \
libload.lib \
c:\TriMedia\lib\WinNT\host_comm.lib \
kernel32.lib \
wsock32.lib \
user32.lib \
winmm.lib \
advapi32.lib \
tmman32.lib \
authhost.lib \
c:\TriMedia\lib\WinNT\custom_ops\libtcs.lib
# $(SUPPORT)\lib\libtcs.lib
###################################################################
release : $(MODULE).$(EXT) FORCE
copy $(MODULE).lib $(TCS)\lib\WinNT
copy $(MODULE).lib $(SUPPORT)\lib\WinNT
copy $(MODULE).lib $(TCS)\lib\Win95
copy $(MODULE).lib $(SUPPORT)\lib\Win95
copy $(MODULE).$(EXT) $(TCS)\bin
FORCE:
######################################################################
OBJS = tmcrt.obj \
verinfo.obj \
DVD_Ctl_PC.obj \
$(MODULE).res
#$(MODULE).$(EXT) : $(OBJS)
# $(SDK)\vc\bin\link -machine:i386 -entry:DLLInitialize -subsystem:windows -dll -incremental:no -pdb:$(MODULE).pdb -out:$(MODULE).$(EXT) -map:$(MODULE).map -def:$(LSRC)\$(MODULE).def -implib:$(MODULE).lib -libpath:$(SDK)\vc\lib -libpath:$(TCS)\lib\WinNT $(OBJS) $(LIBS)
$(MODULE).$(EXT) : $(OBJS)
$(SDK)\vc\bin\link -machine:i386 -entry:DLLInitialize -subsystem:windows -dll -VERBOSE -DEFAULTLIB:MSVCRT -DEFAULTLIB:LIBCMT -NODEFAULTLIB:LIBC -NODEFAULTLIB:libcpmt -incremental:no -pdb:$(MODULE).pdb -out:$(MODULE).$(EXT) -map:$(MODULE).map -def:$(LSRC)\$(MODULE).def -implib:$(MODULE).lib -libpath:$(SDK)\vc\lib -libpath:$(TCS)\lib\WinNT $(OBJS) $(LIBS)
{$(LSRC)\}.c{}.obj :
$(SDK)\vc\\bin\cl $(CFLAGS) $(CINCS) $(CDEFS) -Fd$(MODULE).pbd -Fo$@ $<
{$(LSRC)\..\..}.c{}.obj :
$(SDK)\vc\bin\cl $(CFLAGS) $(CDEFS) $(CINCS) -Fd$(LOUT)\$(MODULE).pdb -Fo$@ $<
{$(LSRC)\}.rc{}.res :
$(SDK)\SharedIDE\bin\rc -r -i$(LSRC)\..\..\include -Fo$@ $<
请教这两个东西如何改!
本文地址:http://com.8s8s.com/it/it28863.htm