Batch for compiling and linking with Harbour

Batch for compiling and linking with Harbour

Postby Massimo Linossi » Thu Jun 10, 2010 2:59 pm

Hi.
I'm using Xharbour commercial, but I want to make some tests with the Harbour that comes
with FWH. I don't know how to make the compiling process of several Prg and to link them
with some Libs. Can I have and example how to make it ?
Thanks in advance.
Massimo.
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Batch for compiling and linking with Harbour

Postby ukoenig » Thu Jun 10, 2010 3:34 pm

Hello Massimo,

The Batchfile ( GO.BAT )

if not exist obj md obj
c:\bcc55\bin\make -f makefile.rmk

The Makefile ( MAKEFILE.RMK )

HBDIR=c:\xharbour
BCDIR=c:\bcc55
FWDIR=c:\fwh

.path.OBJ = .\obj
.path.PRG = .\
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\

PRG = \
btntools.PRG \
b_funk1.PRG \
b_bar.PRG \
b_butt1.PRG \
b_butt2.PRG \
b_butt3.PRG \
b_source.PRG


# C = \
# two.C

PROJECT : BtnTools.exe

# define EXE and Resource

btntools.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) btntools.res
echo off
echo $(BCDIR)\bin\c0w32.obj + > b32.bc

# OBJ-List
# -------------
echo obj\btntools.obj \
obj\b_funk1.obj \
obj\b_bar.obj \
obj\b_butt1.obj \
obj\b_butt2.obj \
obj\b_butt3.obj \
obj\b_source.obj, + >> b32.bc


echo btntools.exe, + >> b32.bc
echo btntools.map, + >> b32.bc


# Fivewin Lib`s for xHARBOUR
# --------------------------------------

echo $(FWDIR)\lib\Fivehx.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc

# xHARBOUR-Lib`s
# -----------------------

echo $(HBDIR)\lib\rtl.lib + >> b32.bc
echo $(HBDIR)\lib\vm.lib + >> b32.bc
echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
echo $(HBDIR)\lib\lang.lib + >> b32.bc
echo $(HBDIR)\lib\macro.lib + >> b32.bc
echo $(HBDIR)\lib\rdd.lib + >> b32.bc
echo $(HBDIR)\lib\dbfntx.lib + >> b32.bc
echo $(HBDIR)\lib\dbfcdx.lib + >> b32.bc
echo $(HBDIR)\lib\dbffpt.lib + >> b32.bc
echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
echo $(HBDIR)\lib\debug.lib + >> b32.bc
echo $(HBDIR)\lib\common.lib + >> b32.bc
echo $(HBDIR)\lib\pp.lib + >> b32.bc
echo $(HBDIR)\lib\codepage.lib + >> b32.bc
echo $(HBDIR)\lib\pcrepos.lib + >> b32.bc

# Uncomment these two lines to use Advantage RDD
# echo $(HBDIR)\lib\rddads.lib + >> b32.bc
# echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

echo $(BCDIR)\lib\cw32.lib + >> b32.bc
echo $(BCDIR)\lib\import32.lib + >> b32.bc
echo $(BCDIR)\lib\uuid.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\rasapi32.lib, >> b32.bc

# Dbfstruct.res includes Symbol ICON : favorite.ico
# ------------------------------------------------------------------------------------

IF EXIST btntools.res echo btntools.res >> b32.bc
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
# $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
del b32.bc

.PRG.OBJ:
$(HBDIR)\bin\harbour $< /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include > clip.log
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp

btntools.res : btntools.rc
$(BCDIR)\bin\brc32.exe -r btntools.rc

Best Regards
Uwe :lol:
Last edited by ukoenig on Thu Jun 10, 2010 3:43 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Batch for compiling and linking with Harbour

Postby Massimo Linossi » Thu Jun 10, 2010 3:41 pm

Thanks a lot. I'll try it.
Have a nice evening.
Massimo.
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 100 guests