Right now my problem is that after editing a PRG, neither the OBJ or the C files are updated by the make file. So, until I solve this I am forced to delete the OBJ and C file manually. Then they are generated by the make file. Not a good solution.
First, it is my understanding that if the PRG is newer than either the OBJ or C file, then the OBJ and C files should be regenerated automatically. At least that is how the old Clipper Rmake.exe worked.
I have read all the documentation I could find, but there are only a few examples and none discuss or show how to setup the dependencies.
I am assuming this line in the sample make file that comes with FWH is supposed to setup the dependencies:
- Code: Select all Expand view
- arw.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) arw.res
Am I correct? If so, then what is wrong with it? If that is not the line, then which line is it?
Here is my complete make file if it will help:
- Code: Select all Expand view
- #Borland Make file
#Assumes PRGs are in parent directory, and OBJs and Cs are in .\obj
#Using FiveWin, xHarbour, and Borland C++
#Date: 04/13/2017 05:29:45 pm
HBDIR=c:\xharbour
BCDIR=c:\bcc7
FWDIR=c:\fwh
.path.obj = .\obj
.path.prg = .\
.path.ch = $(FWDIR)\include;$(HBDIR)\include;$(BCDIR)\include
.path.c = .\obj
.path.rc = .\
#important: Use Uppercase for filename extensions, in the next two rules!
#But, just for the designation (PRG =) not for the filename's extension.
PRG = \
arw.prg \
invpost.prg \
arjournl.prg \
log.prg\
project.prg\
reorder.prg\
rptproj.prg\
tcharge.prg\
tclient.prg\
texpense.prg\
tinvhist.prg\
tinvoice.prg\
tpayment.prg\
tproject.prg\
logpost.prg\
unbilled.prg
OBJ=$(PRG:.prg=.obj)
OBJS=$(OBJ:.\=.\obj\)
#OBJS=$(.\obj\)
PROJECT : arw.exe
#arw.exe : $(OBJS) arw.res
arw.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) arw.res
echo off
echo $(BCDIR)\lib\c0w32.obj + > b32.bc
echo $(OBJS), + >> b32.bc
echo arw.exe, + >> b32.bc
echo arw.map, + >> b32.bc
echo $(FWDIR)\lib\FiveHx.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
echo $(FWDIR)\lib\jb32.lib + >> b32.bc
echo $(FWDIR)\lib\tdata32.lib + >> b32.bc
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\pcrepos.lib + >> b32.bc
echo $(HBDIR)\lib\ct.lib + >> b32.bc
echo $(HBDIR)\lib\zlib.lib + >> b32.bc
echo $(HBDIR)\lib\hbzip.lib + >> b32.bc
echo $(HBDIR)\lib\libmisc.lib + >> b32.bc
echo $(HBDIR)\lib\tip.lib + >> b32.bc
echo $(HBDIR)\lib\png.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\ws2_32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc
echo arw.res >> b32.bc
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s -v -jobj\ @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
$(BCDIR)\bin\bcc32 -c -tWM -I$(BCDIR)\include;$(HBDIR)\include -Oobj\$& obj\$&.c
#$(BCDIR)\bin\bcc32 -c -tWM -I$(BCDIR)\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
arw.res : arw.rc
$(BCDIR)\bin\brc32.exe -r -Ic:\bcc7\include\windows\sdk arw.rc
Regards,
James