delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2006/04/29/16:31:45

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Martin Boulte" <martin DOT boulte AT free DOT fr>
Newsgroups: comp.os.msdos.djgpp
Subject: Linking problem
Date: Sat, 29 Apr 2006 22:28:31 +0200
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Lines: 143
Message-ID: <4453cc79$0$16727$626a54ce@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 29 Apr 2006 22:28:41 MEST
NNTP-Posting-Host: 81.57.84.181
X-Trace: 1146342521 nnrp1-1.free.fr 16727 81.57.84.181:2735
X-Complaints-To: abuse AT proxad DOT net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi guys,

Could you have a look to my makefile and explain me :

Is it correct to invoke the linker with a comman file as I do :
$(ILINK_EXE) -t @build.tmp ?
Why the result of linking path is always : cannot find -lgtnul
If I change the order of -lgtnul in the library lit, for example with llang,
the error massage will become : cannot find -llang

Thanks for explanation ;))

Martin


#
#  @(#) $Id:  $
#
MonAppli     = prcEnum.exe

WORKING_DIR  = C:\Workshop\AtelierHb
SPECIFICLIB  = libAtelier.a
COREADMLIB   = libCoreAdm.a
PRG_DIR      = $(WORKING_DIR)\HbToolsPrg
INC_DIR      = $(WORKING_DIR)\HbToolsPrg
OBJ_DIR      = $(WORKING_DIR)\HbToolsPrg
C_DIR      = $(WORKING_DIR)\HbToolsPrg

EXE_DIR      = $(WORKING_DIR)\HbToolsPrg

SPECIFIC_LIB_DIR = $(WORKING_DIR)\Lib
SYSTEM_TABLE_DIR = $(WORKING_DIR)\Systeme

CORE_PRG     = C:\Workshop\coreAdm\prg
CORE_C      = C:\Workshop\coreAdm\CSrc
CORE_OBJ     = C:\Workshop\coreAdm\Obj
CORE_LIB     = C:\Workshop\coreAdm\bin

CC_LIB      = C:\Djgpp\lib
CC_INC      = C:\Djgpp\Include
CC_DIR      = C:\Djgpp
CC_Compiler = $(CC_DIR)\bin\gcc.exe
LIB_EXE      = $(CC_DIR)\bin\ar.exe
REDIR_EXE    = $(CC_DIR)\bin\redir.exe

ILINK_EXE    = $(CC_DIR)\bin\gcc.exe
#ILINK_EXE    = $(CC_DIR)\bin\ld.exe

HB_DIR       = C:\xHarbour
HB_INC       = $(HB_DIR)\include
HB_COMPILER  = $(HB_DIR)\bin\harbour
HB_LIB      = $(HB_DIR)\lib
HB_GT_LIB    = gtdos

HB_FLAGS    = -n -i$(HB_DIR)\include -i$(INC_DIR)\include
CC_FLAGS     = -c -I$(CC_INC) -I$(HB_INC)
LINK_FLAGS   = -L$(CC_LIB) -L$(HB_LIB)

SUFFIXES := .a .obj .c .prg .DBF .inc .ch .tmp
vpath %.prg $(PRG_DIR)
vpath %.DBF $(PRG_DIR)
vpath %.inc $(INC_DIR) $(CC_INC) $(HB_INC)
vpath %.ch $(INC_DIR) $(CC_INC) $(HB_INC)
vpath %.c $(C_DIR)
vpath %.obj $(OBJ_DIR)
vpath %.a $(CC_LIB) $(HB_LIB)
vpath %.tmp $(EXE_DIR)

%.c : %.prg
 @echo ------------------- Compilation Harbour $<
 @echo ------------------- Les dépendances PROCDB.DBF et PARAMETR.DBF sont
consultées dans $(PRG_DIR)
 @echo ------------------- Compilation Harbour $< >> HBCompil.log
 @echo ------------------- Les dépendances PROCDB.DBF et PARAMETR.DBF sont
consultées dans $(PRG_DIR) >> HBCompil.log
 @$(HB_COMPILER) $(HB_FLAGS) $< -o$(C_DIR)\$@ >> HBCompil.log
 @echo ------------------- Fin compilation Harbour $< >> HBCompil.log

%.obj : %.c
# Le nom du fichier à compiler est reconstruit par $(C_DIR)\$(<F) car on
constate que
# $< a bien pour valeur la cible et le bon path dans la règle %.c : %.prg
# $< ne positionne pas le bon path dans la règle %.obj : %.c lorsque la
règle précédante
# vient d'être exécutée
# $< a bien pour valeur la cible et le bon path dans la règle %.obj : %.c
lorsque c'est la
# première règle à être exécutée
#

 @echo ------------------- Compilation Djgpp $<
 @echo ------------------- Compilation Djgpp $< >> HBCompil.log
 @echo $(CC_Compiler) $(CC_FLAGS) -o$@ $*.c
 @$(CC_Compiler) $(CC_FLAGS) -o$@ $<
 @echo ------------------- Fin compilation Djgpp $<
 @echo ------------------- Fin compilation Djgpp $< >> HBCompil.log

all : clean exeFile
exeFile : $(MonAppli)

$(MonAppli) : prcEnum.obj

 @echo ------------------- Production image mémoire de $(MonAppli)
 @echo ------------------- Production image memoire de $(MonAppli)>>
HBCompil.log
 @echo $(OBJ_DIR)\prcEnum.obj > build.tmp
 @echo -o$(MonAppli) >> build.tmp
 @echo $(LINK_FLAGS) >> build.tmp
 @echo -lvm  >> build.tmp
 @echo -lrtl >> build.tmp
 @echo -lgtnul >> build.tmp
 @echo -llang >> build.tmp
 @echo -lrdd >> build.tmp
 @echo -lmacro >> build.tmp
 @echo -ldbfntx >> build.tmp
 @echo -lpp >> build.tmp
 @echo -ldbfcdx >> build.tmp
 @echo -ldbffpt >> build.tmp
 @echo -lcommon >> build.tmp
 @echo -lcodepage >> build.tmp
 @echo -lm >> build.tmp
 @echo -lgtstd >> build.tmp
 @echo -lct >> build.tmp
 @echo -l$(HB_GT_LIB) >> build.tmp
 @echo -ldebug >> build.tmp
 @$(REDIR_EXE) -oa $(EXE_DIR)\HBCompil.log -eo $(ILINK_EXE) -t @build.tmp
 @echo  ------------------- Exécution de $(MonAppli)
 @echo  ------------------- Exécution de $(MonAppli) >> HBCompil.log
 @call $(EXE_DIR)\prcEnum.exe HBCompil.log $(WORKING_DIR)
$(WORKING_DIR)\HbToolsPrg


prcEnum.c : prcEnum.prg PROCDB.DBF PARAMETR.DBF
prcEnum.obj : prcEnum.c

clean :
 @echo ------------------- Effacement
 @echo ------------------- Effacement >> HBCompil.log
 @del $(OBJ_DIR)\*.obj
 @del $(C_DIR)\*.c
 @del $(EXE_DIR)\$(MonAppli)


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019