c:\"Program Files (x86)\Microsoft Visual Studio 10.0"\VC\bin\nmake -ftest.mak
if errorlevel==0 one.exe
#Microsoft VS2010 make sample, (c) FiveTech Software 2010
HBDIR=c:\harbour
FWDIR=c:\fwh
VCDIR="c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC"
SDKDIR="c:\Program Files\Microsoft SDKs\Windows\v7.0A"
.SUFFIXES: .prg .c .obj .rc .res
one.exe : one.obj two.obj three.obj one.res
echo one.obj two.obj three.obj > msvc.tmp
echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbrtl.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbvm.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\gtgui.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hblang.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbmacro.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbrdd.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\rddntx.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\rddcdx.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\rddfpt.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbsix.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbdebug.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbcommon.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbpp.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbwin.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbcplr.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\xhb.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbpcre.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbct.lib >> msvc.tmp
echo $(HBDIR)\lib\vc32\hbcpage.lib >> msvc.tmp
echo $(SDKDIR)\lib\kernel32.lib >> msvc.tmp
echo $(SDKDIR)\lib\user32.lib >> msvc.tmp
echo $(SDKDIR)\lib\gdi32.lib >> msvc.tmp
echo $(SDKDIR)\lib\winspool.lib >> msvc.tmp
echo $(SDKDIR)\lib\comctl32.lib >> msvc.tmp
echo $(SDKDIR)\lib\comdlg32.lib >> msvc.tmp
echo $(SDKDIR)\lib\advapi32.lib >> msvc.tmp
echo $(SDKDIR)\lib\shell32.lib >> msvc.tmp
echo $(SDKDIR)\lib\ole32.lib >> msvc.tmp
echo $(SDKDIR)\lib\oleaut32.lib >> msvc.tmp
echo $(SDKDIR)\lib\uuid.lib >> msvc.tmp
echo $(SDKDIR)\lib\odbc32.lib >> msvc.tmp
echo $(SDKDIR)\lib\odbccp32.lib >> msvc.tmp
echo $(SDKDIR)\lib\iphlpapi.lib >> msvc.tmp
echo $(SDKDIR)\lib\mpr.lib >> msvc.tmp
echo $(SDKDIR)\lib\version.lib >> msvc.tmp
echo $(SDKDIR)\lib\wsock32.lib >> msvc.tmp
echo $(SDKDIR)\lib\msimg32.lib >> msvc.tmp
echo $(SDKDIR)\lib\oledlg.lib >> msvc.tmp
echo $(SDKDIR)\lib\psapi.lib >> msvc.tmp
echo $(SDKDIR)\lib\gdiplus.lib >> msvc.tmp
echo $(SDKDIR)\lib\winmm.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
SET LIB=$(VCDIR)\lib
SET PATH=$(VCDIR)\bin
link @msvc.tmp /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:libc > link.log
@type link.log
@del one.c
@del two.c
@del three.c
@del msvc.tmp
one.obj : one.c
two.obj : two.c
three.obj : three.c
one.c : one.prg
two.c : two.prg
three.c : three.prg
one.res : one.rc
c:\vc98\bin\rc.exe -r -d__FLAT__ one.rc
.prg.c:
$(HBDIR)\bin\harbour $< /n /i$(FWDIR)\include;$(HBDIR)\include
.c.obj:
SET PATH=$(VCDIR)\bin
cl.exe -c -TP -W3 -I$(HBDIR)\include -I$(SDKDIR)\include -I$(VCDIR)\include $<
{.\Obj}\test.obj : {.\Source}\test.c
{.\Obj}\one.obj : {.\Source}\one.c
HBDIR=c:\harbourmsvc2010
FWDIR=c:\fwh
VCDIR="c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC"
SDKDIR="c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A"
.SUFFIXES: .prg .c .obj
test.lib : {.\Obj}\one.obj {.\Obj}\two.obj {.\Obj}\three.obj {.\Obj}\myc.obj
if not exist test.lib $(VCDIR)\bin\lib /DEF:test.def /OUT:test.lib
$(VCDIR)\bin\lib test.lib /OUT:test.lib {.\Obj}\one.obj {.\Obj}\two.obj {.\Obj}\three.obj {.\Obj}\myc.obj
{.\Obj}\one.obj : {.\Source}\one.c
{.\Obj}\two.obj : {.\Source}\two.c
{.\Obj}\three.obj : {.\Source}\three.c
{.\Obj}\myc.obj : {.\Source}\myc.c
{.\Obj}\one.c : {.\Source}\one.prg
{.\Obj}\two.c : {.\Source}\two.prg
{.\Obj}\three.c : {.\Source}\three.prg
.prg.c:
$(HBDIR)\bin\harbour $< /n /i$(FWDIR)\include;$(HBDIR)\include
.c.obj:
SET PATH=$(VCDIR)\bin
cl.exe -c -TP -W3 -I$(HBDIR)\include -I$(SDKDIR)\include -I$(VCDIR)\include $<
# macros
objdir = c:\lib
wrkdir = c:\work
list = $(objdir)\test1.obj $(objdir)\test2.obj $(objdir)\test3.obj
# inference rules
# compile
# $< represents the dependent file.
# $(*F) represents the targets base name.
# $(*R) represents the targets base name and directory.
{$(wrkdir)}.c{$(objdir)}.obj:
cl /c $<
copy $(*F).obj $(*R).obj
erase $(*F).obj
# link
# $(**R) represents all the dependents including directories.
{$(objdir)}.obj{}.exe:
link $(**R);
# target-dependencies
# $$(@B) represents the base name of the current target.
test1.exe : $(list)
$(objdir)\*.obj : $(wrkdir)\$$(@B).c $(wrkdir)\test1.h $(wrkdir)\test2.h
# macros
objdir = .\obj
wrkdir = .\source
list = $(objdir)\one.obj $(objdir)\two.obj $(objdir)\three.obj $(objdir)\myc.obj
HBDIR=c:\harbourmsvc2010
FWDIR=c:\fwh
VCDIR="c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC"
SDKDIR="c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A"
.SUFFIXES: .prg .c .obj
test.lib : $(objdir)\one.obj $(objdir)\two.obj $(objdir)\three.obj $(objdir)\myc.obj
if not exist test.lib $(VCDIR)\bin\lib /DEF:test.def /OUT:test.lib
$(VCDIR)\bin\lib test.lib /OUT:test.lib $(objdir)\one.obj $(objdir)\two.obj $(objdir)\three.obj $(objdir)\myc.obj
$(objdir)\one.obj : $(objdir)\one.c
$(objdir)\two.obj : $(objdir)\two.c
$(objdir)\three.obj : $(objdir)\three.c
$(objdir)\myc.obj : $(objdir)\myc.c
$(objdir)\one.c : $(wrkdir)\one.prg
$(objdir)\two.c : $(wrkdir)\two.prg
$(objdir)\three.c : $(wrkdir)\three.prg
.prg.c:
$(HBDIR)\bin\harbour $< /n /i$(FWDIR)\include;$(HBDIR)\include
{$(wrkdir)}.c{$(objdir)}.obj:
SET PATH=$(VCDIR)\bin
cl.exe -c -TP -W3 -I$(HBDIR)\include -I$(SDKDIR)\include -I$(VCDIR)\include $<
copy $(*F).obj $(*R).obj
erase $(*F).obj
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 43 guests