Ist there aMaximum Number of Prgs for a Makefile?

Ist there aMaximum Number of Prgs for a Makefile?

Postby gkuhnert » Wed May 13, 2009 10:39 am

Hello,

momentarily we have in a project 94 .prg-files and 25 libs in a makefile for compiling. As soon as we ad a lib or a prg, the resources are not available in the program. If we ad even 2 prgs or libs, the program won't compile at all. If we combine 2 prg-files to one, another lib or prg-file can be added, if we exclude a lib file, also another prg oder lib can be added to the project. So the number of files used for compiling seems to be restricted to 94+25 = 119. Is there any limit known?
Or, on the other hand, the ilink-command is called with 9 parameters + all objects (same number of prgs) + all libs = 128 <= is this maybe the limitation? And if yes, are there posibilities to avoid it? (other than combining prg-files together)

Code: Select all  Expand view
The ilink-command:
ilink32 -L\fw808\xharbour\lib;\fw808\fwh\lib;\fw808\bcc55\LIB\PSDK -Gn -aa -Tpe -s $(OBJS) c0w32.obj,eho.exe,eho.map, $(LIBS),, eho.res
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
gkuhnert
 
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands

Re: Ist there aMaximum Number of Prgs for a Makefile?

Postby ukoenig » Wed May 13, 2009 1:55 pm

Hello Gilbert,

I use a Application, to combine my small prg's to a single prg, before compiling.
It is easy to use. The application I found, is Freeware and I can add any Extension I need ( .prg )
I don't need to select each prg-file, just the directory.
On Top of the first PRG, the Include-Files are defined.
You can add a seperator like : //------------------ between each PRG if You like.
To keep all PRG's in one Textfile ( for archiving ), You don't have to activate < No Filename >.
Normally each combined Prg includes the Prg-Name on Top.

If there is a limit of Prg-files, You can use the link, in case You want to use the same solution.

Image

Look for TxtCollector at the end of the download-list.
( Txt means ASC-Files, You can define any Extension )

http://bluefive.pair.com/free_computer_software.htm

Regards
Uwe :lol:
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: Ist there aMaximum Number of Prgs for a Makefile?

Postby StefanHaupt » Thu May 14, 2009 7:42 am

Gilbert,

do you use Vista ? I noticed a similar problem under Vista. If I add a new lib to replace a function of the original libs, the new lib is not known in the exe after compiling and the functions are not replaced.

I only have this with many files in the link script and only with Vista. The same configuration runs perfectly with XP.

I don´t know, what´s going wrong.

Can anyone else confirm this problem ?
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Ist there aMaximum Number of Prgs for a Makefile?

Postby Carlos Mora » Thu May 14, 2009 9:05 pm

Gilbert,

I use Borland's make with a makefile that builds a temp file with the linker's parameters, including objs and libs. There are several parametrized options so I'm sure you can adapt it to your needs to make a test, in case the problem is the lenght of the command line.

Code: Select all  Expand view


# Make directives ############################################################

.autodepend
.swap
.suffixes: .prg .hrb

# Flags for modules to include: YES | NO (must be UPPERCASE)##################

RES_FILE      = YES
LNK_DBFNTX    = YES
LNK_DBFCDX    = YES
LNK_FIVEWIN   = YES
LNK_DEBUG     = NO
LNK_ADVANTAGE = NO
LNK_ODBC      = NO
LNK_XLS       = NO
MAP_FILE      = NO
USE_XHARBOUR  = YES

# Application directories & filenames ########################################

APP_NAME         = testbar # (Your EXE name without extension)
APP_PRG_DIR      = .
APP_OBJ_DIR      = obj  # (create the app\obj directory first)
APP_INCLUDE_DIR  = .
APP_EXE_DIR      = $(APP_PRG_DIR)
APP_RES_DIR      = $(APP_PRG_DIR)

APP_EXE  = $(APP_EXE_DIR)\$(APP_NAME).exe
APP_RC   = $(APP_RES_DIR)\$(APP_NAME).rc
APP_RES  = $(APP_RES_DIR)\$(APP_NAME).res
APP_MAP  = $(APP_RES_DIR)\$(APP_NAME).map

# Paths for dependent files ##################################################

.path.prg = $(APP_PRG_DIR)
.path.hrb = $(APP_OBJ_DIR)
.path.obj = $(APP_OBJ_DIR)

# Application PRG files (your PRG files go here) #############################

APP_PRG_LIST = testbar.prg RibbonTab.prg RibbonUtil.prg \
                              Ribbon0.prg
APP_C_LIST = Skins.c

# button.prg testoutl.prg
# Contruction of the rest dependency lists ###################################

APP_PRGS = $(APP_PRG_LIST)
APP_HRBS = $(APP_PRG_LIST:.prg=.hrb)

APP_OBJS = $(APP_PRG_LIST:.prg=.obj) $(APP_C_LIST:.c=.obj)

# Fivewin directories ########################################################

FIVEWIN_DIR         = c:\fwh707
FIVEWIN_INCLUDE_DIR = $(FIVEWIN_DIR)\include
FIVEWIN_LIB_DIR     = $(FIVEWIN_DIR)\lib

# Fivewin libraries ##########################################################

!if $(USE_XHARBOUR) == YES
FIVE_LIB  = $(FIVEWIN_LIB_DIR)\fiveHx.lib
!else
FIVE_LIB  = $(FIVEWIN_LIB_DIR)\fiveH.lib
!endif

FIVEC_LIB = $(FIVEWIN_LIB_DIR)\fiveHC.lib

# Harbour directories & flags ################################################

!if $(USE_XHARBOUR) == YES
HARBOUR_DIR         = c:\xharbour
!else
HARBOUR_DIR         = c:\harbour712
!endif
HARBOUR_INCLUDE_DIR = $(HARBOUR_DIR)\include
HARBOUR_EXE_DIR     = $(HARBOUR_DIR)\bin
HARBOUR_LIB_DIR     = $(HARBOUR_DIR)\lib
HARBOUR_FLAGS       = -i$(APP_INCLUDE_DIR);$(FIVEWIN_INCLUDE_DIR);$(HARBOUR_INCLUDE_DIR) -n -m -q -es2 -gc0 -w
#HARBOUR_FLAGS      = -i$(APP_INCLUDE_DIR);$(HARBOUR_INCLUDE_DIR) -n
HARBOUR_EXE         = $(HARBOUR_EXE_DIR)\harbour.exe

# Harbour libraries ##########################################################

RTL_LIB    = $(HARBOUR_LIB_DIR)\rtl.lib
VM_LIB     = $(HARBOUR_LIB_DIR)\vm.lib
GT_LIB     = $(HARBOUR_LIB_DIR)\gtgui.lib
LANG_LIB   = $(HARBOUR_LIB_DIR)\lang.lib
MACRO_LIB  = $(HARBOUR_LIB_DIR)\macro.lib
RDD_LIB    = $(HARBOUR_LIB_DIR)\rdd.lib
DBFNTX_LIB = $(HARBOUR_LIB_DIR)\dbfntx.lib
DBFCDX_LIB = $(HARBOUR_LIB_DIR)\dbfcdx.lib $(HARBOUR_LIB_DIR)\hbsix.lib  $(HARBOUR_LIB_DIR)\dbffpt.lib
DEBUG_LIB  = $(HARBOUR_LIB_DIR)\debug.lib
COMMON_LIB = $(HARBOUR_LIB_DIR)\common.lib $(HARBOUR_LIB_DIR)\pcrepos.lib
PP_LIB     = $(HARBOUR_LIB_DIR)\pp.lib

# Advantage libraries ########################################################

RDDADS_LIB = $(HARBOUR_LIB_DIR)\rddads.lib
ACE32_LIB  = $(HARBOUR_LIB_DIR)\ace32.lib

# Borlanc directories & flags ################################################

BORLANDC_DIR         = c:\Borland\bcc55
BORLANDC_INCLUDE_DIR = $(BORLANDC_DIR)\include
BORLANDC_EXE_DIR     = $(BORLANDC_DIR)\bin
BORLANDC_LIB_DIR     = $(BORLANDC_DIR)\lib
BORLANDC_COMP_FLAGS  = -c -O2 -I$(HARBOUR_INCLUDE_DIR);$(BORLANDC_INCLUDE_DIR)
BORLANDC_COMP_EXE    = $(BORLANDC_EXE_DIR)\bcc32.exe
!if $(LNK_FIVEWIN) == YES
BORLANDC_LINK_FLAGS  = -Gn -aa -Tpe -s -I$(APP_OBJ_DIR)
!else
BORLANDC_LINK_FLAGS  = -Gn -ap -Tpe -s -I$(APP_OBJ_DIR)
!endif
BORLANDC_LINK_EXE    = $(BORLANDC_EXE_DIR)\ilink32.exe
BORLANDC_RES_EXE     = $(BORLANDC_EXE_DIR)\brc32.exe

!if $(MAP_FILE) != YES
   BORLANDC_LINK_FLAGS = $(BORLANDC_LINK_FLAGS) -x
!endif

# Borland libraries & files ##################################################

!if $(LNK_FIVEWIN) == YES
   STARTUP_OBJ  = $(BORLANDC_LIB_DIR)\c0w32.obj
!else
   STARTUP_OBJ  = $(BORLANDC_LIB_DIR)\c0w32.obj
!endif
CW32_LIB     = $(BORLANDC_LIB_DIR)\cw32.lib
IMPORT32_LIB = $(BORLANDC_LIB_DIR)\import32.lib
ODBC32_LIB   = $(BORLANDC_LIB_DIR)\psdk\odbc32.lib

# Dependencies ###############################################################

all: $(APP_OBJS) $(APP_HRBS) $(APP_EXE)  $(APP_C)

!if $(RES_FILE) == YES
all: $(APP_RES)
!endif

# Implicit Rules #############################################################

.prg.hrb:
   $(HARBOUR_EXE) $(HARBOUR_FLAGS) $** -o$@

.hrb.obj:
   $(BORLANDC_COMP_EXE) $(BORLANDC_COMP_FLAGS) -o$@ $**

.c.obj:
   $(BORLANDC_COMP_EXE) $(BORLANDC_COMP_FLAGS) -o$@ $**


# Explicit Rules #############################################################

!if $(RES_FILE) == YES
$(APP_RES) : $(APP_RC)
   "C:\Program Files\PellesC\Bin\PORC.EXE" $**  /I "C:\Program Files\PellesC\include" /I "C:\Program Files\PellesC\include\win"

$(APP_EXE) :: $(APP_RES)
   @if exist $(APP_EXE) del $(APP_EXE) > nul
!endif

$(APP_EXE) :: $(APP_OBJS)
   @echo $(STARTUP_OBJ) + > make.tmp
   @echo $(**), + >> make.tmp
   @echo $(APP_EXE), + >> make.tmp
   @echo $(APP_MAP), + >> make.tmp
!if $(LNK_FIVEWIN) == YES
   @rem echo twbrwhx.lib +
   @echo $(FIVE_LIB) + >> make.tmp
   @echo $(FIVEC_LIB) + >> make.tmp
#   @echo $(FIVEWIN_LIB_DIR)\SBROWSEH.lib + >> make.tmp
#   @echo $(FIVEWIN_LIB_DIR)\BTNGET.lib + >> make.tmp
#    @echo HBOLE.lib + >> make.tmp
!endif
   @echo $(RTL_LIB) + >> make.tmp
   @echo $(VM_LIB) + >> make.tmp
   @echo $(GT_LIB) + >> make.tmp
   @echo $(LANG_LIB) + >> make.tmp
   @echo $(MACRO_LIB) + >> make.tmp
   @echo $(RDD_LIB) + >> make.tmp
#   @echo zlib1.lib ziparchive.lib + >> make.tmp
!if $(LNK_XLS) == YES
   @echo FileXLS.lib + >> make.tmp
!endif
!if $(LNK_DBFNTX) == YES
   @echo $(DBFNTX_LIB) + >> make.tmp
!endif
!if $(LNK_DBFCDX) == YES
   @echo $(DBFCDX_LIB) + >> make.tmp
!endif
!if $(LNK_DEBUG) == YES
   @echo $(DEBUG_LIB) + >> make.tmp
!endif
   @echo $(COMMON_LIB) + >> make.tmp
   @echo $(PP_LIB) + >> make.tmp
!if $(LNK_ADVANTAGE) == YES
   @echo $(RDDADS_LIB) + >> make.tmp
   @echo $(ACE32_LIB) + >> make.tmp
!endif
!if $(LNK_ODBC) == YES
   @echo $(ODBC32_LIB) + >> make.tmp
!endif
   @echo $(CW32_LIB) + >> make.tmp
   @echo $(IMPORT32_LIB) + >> make.tmp
   @echo $(BORLANDC_LIB_DIR)\psdk\msimg32.lib + >> make.tmp
   @echo $(BORLANDC_LIB_DIR)\ole2w32.lib, + >> make.tmp
!if $(RES_FILE) == YES
   @echo ,$(APP_RES) >> make.tmp
!endif
   $(BORLANDC_LINK_EXE) $(BORLANDC_LINK_FLAGS) @make.tmp
   @del $(APP_EXE_DIR)\$(APP_NAME).tds
   @rem del make.tmp
   @if exist INSTALA.BAT call INSTALA.BAT

 


You will find some special details, like using Pelles Resource compiler. The prg list should be added, it can support an unlimited numer of them.

Hope you find this usefull,

Regards.
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Carlos Mora
 
Posts: 989
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: Ist there aMaximum Number of Prgs for a Makefile?

Postby gkuhnert » Tue May 26, 2009 7:30 am

Thanks @all for your replies.

my working solution right now is similar to the proposal of Carlos: I create a temp-file, listing all my obj-files. It seems, that in the linker, the @objs.tmp is taken as one parameter. Before, I listed all objs in my makefile and every obj-file became one parameter. This leads to the maximum of 128 parameter problem.

Thanks for your help!
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
gkuhnert
 
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 37 guests