Testing MAKE-file

Testing MAKE-file

Postby ukoenig » Sun Sep 28, 2008 11:32 pm

Antonio,

The MAKE-file is running now, but there is a message
< MULTIPLE TARGET PATTERN > in this line :
I'm using just : brwtools.prg, errsysw.prg and brwtools.rc

if not exist brwtools.rc $(mingw)\bin\gcc -obrwtools.exe ./obj/brwtools.o ./obj/errsysw.o -Wall -s -mwindows -L$(mingw)\lib -L$(hlibs) -L$(fwh)\lib -mno-cygwin -Wl,--start-group -lfivehg -lfivehgc -lgtgui -ldll -lsocket -luser32 -lwinspool -lcomctl32 -lcomdlg32 -lgdi32 -lole32 -loleaut32 -luuid -lwinmm -lvfw32 -lwsock32 -lmsimg32 -lhbbtree -lhbclipsm -lhbcommon -lhbcpage -lhbcplr -lhbct -lhbcurl -lhbfbird -lhbgd -lhbhpdf -lhbhsx -lhblang -lhbmacro -lhbmainstd -lhbmisc -lhbmsql -lhbmysql -lmysqldll -lhbmzip -lhbnf -lhbodbc -lodbc32 -lhbpcre -lhbpgsql -lhbpp -lhbrdd -lhbrtl -lhbsix -lhbsqlit3 -lhbtip -lhbusrrdd -lhbvm -lhbvpdf -lhbw32 -lhbzlib -lrddado -lrddads -lrddcdx -lrddfpt -lrddntx -lxhb -Wl,--end-group

Because the lines are very long and hard to read,
can it be written with a structure as well ?

Regards
Uwe :lol:


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

Postby Antonio Linares » Mon Sep 29, 2008 6:47 am

Uwe,

Here you have a simpler and cleaner version :-)

Makefile
Code: Select all  Expand view
# gcc make example for Windows, developed by FiveTech Software

hdir=c:\harbour\harbour
hdirc=$(hdir)\source\main\w32\mingw32\harbour.exe
hlibs=$(hdir)\lib\w32\mingw32
fwh=c:\fwh
mingw=c:\mingw
fwfiles=-lfivehg -lfivehgc
w32files=-ldll -lsocket -luser32 -lwinspool -lcomctl32 -lcomdlg32 -lgdi32 -lole32 -loleaut32 -luuid \
         -lwinmm -lvfw32 -lwsock32 -lmsimg32
hbfiles=-lhbbtree -lhbclipsm -lhbcommon -lhbcpage -lhbcplr -lhbct -lhbcurl -lhbfbird -lhbgd -lhbhpdf \
        -lhbhsx -lhblang -lhbmacro -lhbmainstd -lhbmisc -lhbmsql -lhbmysql -lmysqldll -lhbmzip -lhbnf \
        -lhbodbc -lodbc32 -lhbpcre -lhbpgsql -lhbpp -lhbrdd -lhbrtl -lhbsix -lhbsqlit3 -lhbtip \
        -lhbusrrdd -lhbvm -lhbvpdf -lhbw32 -lhbzlib -lrddado -lrddads -lrddcdx -lrddfpt -lrddntx -lxhb

all : test.exe
   test.exe

PRG_OBJS = ./obj/one.c  \
       ./obj/two.c

C_OBJS = ./obj/one.o \
         ./obj/two.o \
         ./obj/three.o

test.exe : $(PRG_OBJS) $(C_OBJS)
   if not exist one.rc $(mingw)\bin\gcc -otest.exe ./obj/one.o ./obj/two.o ./obj/three.o \
   -Wall -s -mwindows -L$(mingw)\lib -L$(hlibs) -L$(fwh)\lib -mno-cygwin -Wl,--start-group \
   $(fwfiles) -lgtgui $(w32files) $(hbfiles) -Wl,--end-group
   if exist one.rc $(mingw)\bin\gcc -otest.exe ./obj/one.o ./obj/two.o ./obj/three.o _one.o \
   -Wall -s -mwindows -L$(mingw)\lib -L$(hlibs) -L$(fwh)\lib -mno-cygwin -Wl,--start-group \
   $(fwfiles) -lgtgui $(w32files) $(hbfiles) -Wl,--end-group

./obj/%.c : %.prg
   if not exist obj mkdir obj
   $(hdir)\source\main\w32\mingw32\harbour.exe $< -o$@ -n -I$(hdir)\include -I$(fwh)\include
   
./obj/%.o : ./obj/%.c
   gcc -c -o$@ -I$(hdir)\include $<   
   
./obj/%.o : %.c
   gcc -c -o$@ -I$(hdir)\include $<   
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Mon Sep 29, 2008 7:02 am

Simpler :-)

Makefile
Code: Select all  Expand view
# gcc make example for Windows, developed by FiveTech Software

hdir=c:\harbour\harbour
hdirc=$(hdir)\source\main\w32\mingw32\harbour.exe
hlibs=$(hdir)\lib\w32\mingw32
fwh=c:\fwh
mingw=c:\mingw
fwfiles=-lfivehg -lfivehgc
w32files=-ldll -lsocket -luser32 -lwinspool -lcomctl32 -lcomdlg32 -lgdi32 -lole32 -loleaut32 -luuid \
         -lwinmm -lvfw32 -lwsock32 -lmsimg32
hbfiles=-lhbbtree -lhbclipsm -lhbcommon -lhbcpage -lhbcplr -lhbct -lhbcurl -lhbfbird -lhbgd -lhbhpdf \
     -lhbhsx -lhblang -lhbmacro -lhbmainstd -lhbmisc -lhbmsql -lhbmysql -lmysqldll -lhbmzip \
     -lhbnf -lhbodbc -lodbc32 -lhbpcre -lhbpgsql -lhbpp -lhbrdd -lhbrtl -lhbsix -lhbsqlit3 \
     -lhbtip -lhbusrrdd -lhbvm -lhbvpdf -lhbw32 -lhbzlib -lrddado -lrddads -lrddcdx -lrddfpt -lrddntx -lxhb
libraries=$(fwfiles) -lgtgui $(w32files) $(hbfiles)
libspath=-L$(mingw)\lib -L$(hlibs) -L$(fwh)\lib

all : test.exe
   test.exe

PRG_OBJS = ./obj/one.c  \
       ./obj/two.c

C_OBJS = ./obj/one.o \
         ./obj/two.o \
         ./obj/three.o

test.exe : $(PRG_OBJS) $(C_OBJS)
   if not exist one.rc $(mingw)\bin\gcc -otest.exe ./obj/one.o ./obj/two.o ./obj/three.o \
   -Wall -s -mwindows $(libspath) -mno-cygwin -Wl,--start-group $(libraries) -Wl,--end-group
   if exist one.rc $(mingw)\bin\gcc -otest.exe ./obj/one.o ./obj/two.o ./obj/three.o _one.o \
   -Wall -s -mwindows $(libspath) -mno-cygwin -Wl,--start-group $(libraries) -Wl,--end-group

./obj/%.c : %.prg
   if not exist obj mkdir obj
   $(hdir)\source\main\w32\mingw32\harbour.exe $< -o$@ -n -I$(hdir)\include -I$(fwh)\include
   
./obj/%.o : ./obj/%.c
   gcc -c -o$@ -I$(hdir)\include $<   
   
./obj/%.o : %.c
   gcc -c -o$@ -I$(hdir)\include $<   
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Make-file test

Postby ukoenig » Wed Oct 01, 2008 3:01 pm

Antonio,

i started again, with testing the make-file.
This time, i used the sample without changes.
It means :
All install-files i moved to c: and using the same files
one.prg, two.prg and three.obj

There is still the same message like in the other tests :

< MULTIPLE TARGET PATTERN > comes from line :

if not exist one.rc $(mingw)\bin\gcc - ....
-----------------------------------------------

My installs and files are 100 % the same like in the make-file.
I don't know, what could be wrong.

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


Return to FiveWin for Harbour/xHarbour

Who is online

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