FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Testing MAKE-file
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Testing MAKE-file
Posted: 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.
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Testing MAKE-file
Posted: Mon Sep 29, 2008 06:47 AM
Uwe,

Here you have a simpler and cleaner version :-)

Makefile
# 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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Testing MAKE-file
Posted: Mon Sep 29, 2008 07:02 AM
Simpler :-)

Makefile
# 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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Make-file test
Posted: Wed Oct 01, 2008 03: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.

Continue the discussion